@webstudio-is/fonts 0.175.0 → 0.181.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,11 +1,239 @@
1
1
  // src/constants.ts
2
2
  var SYSTEM_FONTS = /* @__PURE__ */ new Map([
3
- ["Arial", ["Roboto", "sans-serif"]],
4
- ["Times New Roman", ["sans"]],
5
- ["Courier New", ["monospace"]],
6
- ["system-ui", []],
7
- ["SimSun", ["Songti SC, sans-serif"]],
8
- ["PingFang SC", ["Microsoft Ya Hei", "sans-serif"]]
3
+ [
4
+ "System UI",
5
+ {
6
+ stack: ["system-ui", "sans-serif"],
7
+ description: "System UI fonts are those native to the operating system interface. They are highly legible and easy to read at small sizes, contains many font weights, and is ideal for UI elements."
8
+ }
9
+ ],
10
+ // Modern font stacks
11
+ // https://github.com/system-fonts/modern-font-stacks
12
+ [
13
+ "Transitional",
14
+ {
15
+ stack: ["Charter", "Bitstream Charter", "Sitka Text", "Cambria", "serif"],
16
+ description: "Transitional typefaces are a mix between Old Style and Modern typefaces that was developed during The Enlightenment. One of the most famous examples of a Transitional typeface is Times New Roman, which was developed for the Times of London newspaper."
17
+ }
18
+ ],
19
+ [
20
+ "Old Style",
21
+ {
22
+ stack: [
23
+ "Iowan Old Style",
24
+ "Palatino Linotype",
25
+ "URW Palladio L",
26
+ "P052",
27
+ "serif"
28
+ ],
29
+ description: "Old Style typefaces are characterized by diagonal stress, low contrast between thick and thin strokes, and rounded serifs, and were developed in the Renaissance period. One of the most famous examples of an Old Style typeface is Garamond."
30
+ }
31
+ ],
32
+ [
33
+ "Humanist",
34
+ {
35
+ stack: [
36
+ "Seravek",
37
+ "Gill Sans Nova",
38
+ "Ubuntu",
39
+ "Calibri",
40
+ "DejaVu Sans",
41
+ "source-sans-pro",
42
+ "sans-serif"
43
+ ],
44
+ description: "Humanist typefaces are characterized by their organic, calligraphic forms and low contrast between thick and thin strokes. These typefaces are inspired by the handwriting of the Renaissance period and are often considered to be more legible and easier to read than other sans-serif typefaces."
45
+ }
46
+ ],
47
+ [
48
+ "Geometric Humanist",
49
+ {
50
+ stack: [
51
+ "Avenir",
52
+ "Montserrat",
53
+ "Corbel",
54
+ "URW Gothic",
55
+ "source-sans-pro",
56
+ "sans-serif"
57
+ ],
58
+ description: "Geometric Humanist typefaces are characterized by their clean, geometric forms and uniform stroke widths. These typefaces are often considered to be modern and sleek in appearance, and are often used for headlines and other display purposes. Futura is a famous example of this classification."
59
+ }
60
+ ],
61
+ [
62
+ "Classical Humanist",
63
+ {
64
+ stack: [
65
+ "Optima",
66
+ "Candara",
67
+ "Noto Sans",
68
+ "source-sans-pro",
69
+ "sans-serif"
70
+ ],
71
+ description: "Classical Humanist typefaces are characterized by how the strokes subtly widen as they reach the stroke terminals without ending in a serif. These typefaces are inspired by classical Roman capitals and the stone-carving on Renaissance-period tombstones."
72
+ }
73
+ ],
74
+ [
75
+ "Neo-Grotesque",
76
+ {
77
+ stack: [
78
+ "Inter",
79
+ "Roboto",
80
+ "Helvetica Neue",
81
+ "Arial Nova",
82
+ "Nimbus Sans",
83
+ "Arial",
84
+ "sans-serif"
85
+ ],
86
+ description: "Neo-Grotesque typefaces are a style of sans-serif that was developed in the late 19th and early 20th centuries and is characterized by its clean, geometric forms and uniform stroke widths. One of the most famous examples of a Neo-Grotesque typeface is Helvetica."
87
+ }
88
+ ],
89
+ [
90
+ "Monospace Slab Serif",
91
+ {
92
+ stack: ["Nimbus Mono PS", "Courier New", "monospace"],
93
+ description: "Monospace Slab Serif typefaces are characterized by their fixed-width letters, which have the same width regardless of their shape, and its simple, geometric forms. Used to emulate typewriter output for reports, tabular work and technical documentation."
94
+ }
95
+ ],
96
+ [
97
+ "Monospace Code",
98
+ {
99
+ stack: [
100
+ "ui-monospace",
101
+ "Cascadia Code",
102
+ "Source Code Pro",
103
+ "Menlo",
104
+ "Consolas",
105
+ "DejaVu Sans Mono",
106
+ "monospace"
107
+ ],
108
+ description: "Monospace Code typefaces are specifically designed for use in programming and other technical applications. These typefaces are characterized by their monospaced design, which means that all letters and characters have the same width, and their clear, legible forms."
109
+ }
110
+ ],
111
+ [
112
+ "Industrial",
113
+ {
114
+ stack: [
115
+ "Bahnschrift",
116
+ "DIN Alternate",
117
+ "Franklin Gothic Medium",
118
+ "Nimbus Sans Narrow",
119
+ "sans-serif-condensed",
120
+ "sans-serif"
121
+ ],
122
+ description: "Industrial typefaces originated in the late 19th century and was heavily influenced by the advancements in technology and industry during that time. Industrial typefaces are characterized by their bold, sans-serif letterforms, simple and straightforward appearance, and the use of straight lines and geometric shapes."
123
+ }
124
+ ],
125
+ [
126
+ "Rounded Sans",
127
+ {
128
+ stack: [
129
+ "ui-rounded",
130
+ "Hiragino Maru Gothic ProN",
131
+ "Quicksand",
132
+ "Comfortaa",
133
+ "Manjari",
134
+ "Arial Rounded MT",
135
+ "Arial Rounded MT Bold",
136
+ "Calibri",
137
+ "source-sans-pro",
138
+ "sans-serif"
139
+ ],
140
+ description: "Rounded typefaces are characterized by the rounded curved letterforms and give a softer, friendlier appearance. The rounded edges give the typeface a more organic and playful feel, making it suitable for use in informal or child-friendly designs. The rounded sans-serif style has been popular since the 1950s, and it continues to be widely used in advertising, branding, and other forms of graphic design."
141
+ }
142
+ ],
143
+ [
144
+ "Slab Serif",
145
+ {
146
+ stack: [
147
+ "Rockwell",
148
+ "Rockwell Nova",
149
+ "Roboto Slab",
150
+ "DejaVu Serif",
151
+ "Sitka Small",
152
+ "serif"
153
+ ],
154
+ description: "Slab Serif typefaces are characterized by the presence of thick, block-like serifs on the ends of each letterform. These serifs are usually unbracketed, meaning they do not have any curved or tapered transitions to the main stroke of the letter."
155
+ }
156
+ ],
157
+ [
158
+ "Antique",
159
+ {
160
+ stack: [
161
+ "Superclarendon",
162
+ "Bookman Old Style",
163
+ "URW Bookman",
164
+ "URW Bookman L",
165
+ "Georgia Pro",
166
+ "Georgia",
167
+ "serif"
168
+ ],
169
+ description: "Antique typefaces, also known as Egyptians, are a subset of serif typefaces that were popular in the 19th century. They are characterized by their block-like serifs and thick uniform stroke weight."
170
+ }
171
+ ],
172
+ [
173
+ "Didone",
174
+ {
175
+ stack: [
176
+ "Didot",
177
+ "Bodoni MT",
178
+ "Noto Serif Display",
179
+ "URW Palladio L",
180
+ "P052",
181
+ "Sylfaen",
182
+ "serif"
183
+ ],
184
+ description: "Didone typefaces, also known as Modern typefaces, are characterized by the high contrast between thick and thin strokes, vertical stress, and hairline serifs with no bracketing. The Didone style emerged in the late 18th century and gained popularity during the 19th century."
185
+ }
186
+ ],
187
+ [
188
+ "Handwritten",
189
+ {
190
+ stack: [
191
+ "Segoe Print",
192
+ "Bradley Hand",
193
+ "Chilanka",
194
+ "TSCu_Comic",
195
+ "casual",
196
+ "cursive"
197
+ ],
198
+ description: "Handwritten typefaces are designed to mimic the look and feel of handwriting. Despite the vast array of handwriting styles, this font stack tend to adopt a more informal and everyday style of handwriting."
199
+ }
200
+ ],
201
+ [
202
+ "Arial",
203
+ {
204
+ stack: ["Arial", "Roboto", "sans-serif"],
205
+ description: "A clean, sans-serif font designed for legibility and versatility. Ideal for modern, minimalistic designs or digital content that requires simplicity."
206
+ }
207
+ ],
208
+ [
209
+ "Times New Roman",
210
+ {
211
+ stack: ["Times New Roman", "sans"],
212
+ description: "A classic serif font known for its formal, professional appearance. Best suited for traditional documents, reports, and academic writing."
213
+ }
214
+ ],
215
+ [
216
+ "Courier New",
217
+ {
218
+ stack: ["Courier New", "monospace"],
219
+ description: "A monospaced serif font with uniform spacing, mimicking typewriter text. Perfect for coding, technical documents, or retro-styled designs."
220
+ }
221
+ ],
222
+ // Chineese fonts
223
+ [
224
+ "SimSun",
225
+ {
226
+ stack: ["SimSun", "Songti SC, sans-serif"],
227
+ description: "A traditional serif font designed for Chinese characters, offering clear and readable text. Ideal for formal Chinese documents or multilingual content requiring both Chinese and Latin text."
228
+ }
229
+ ],
230
+ [
231
+ "PingFang SC",
232
+ {
233
+ stack: ["PingFang SC", "Microsoft Ya Hei", "sans-serif"],
234
+ description: "A modern sans-serif font designed for simplified Chinese characters. Sleek and clean, it\u2019s best for digital content and interfaces where modern, streamlined design is needed."
235
+ }
236
+ ]
9
237
  ]);
10
238
  var DEFAULT_FONT_FALLBACK = "sans-serif";
11
239
  var FONT_FORMATS = /* @__PURE__ */ new Map([
@@ -1,5 +1,8 @@
1
1
  import type { FontFormat } from "./schema";
2
- export declare const SYSTEM_FONTS: Map<string, string[]>;
2
+ export declare const SYSTEM_FONTS: Map<string, {
3
+ stack: string[];
4
+ description: string;
5
+ }>;
3
6
  export declare const DEFAULT_FONT_FALLBACK = "sans-serif";
4
7
  export declare const FONT_FORMATS: Map<FontFormat, string>;
5
8
  export declare const FONT_MIME_TYPES: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/fonts",
3
- "version": "0.175.0",
3
+ "version": "0.181.0",
4
4
  "description": "Fonts utils",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -9,8 +9,8 @@
9
9
  "@jest/globals": "^29.7.0",
10
10
  "typescript": "5.5.2",
11
11
  "zod": "^3.22.4",
12
- "@webstudio-is/tsconfig": "1.0.7",
13
- "@webstudio-is/jest-config": "1.0.7"
12
+ "@webstudio-is/jest-config": "1.0.7",
13
+ "@webstudio-is/tsconfig": "1.0.7"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "zod": "^3.19.1"