Werner Lemberg pushed to branch API-organization at FreeType / FreeType
Commits:
-
8154d8e2
by Ben Wagner at 2023-04-19T13:48:59-04:00
-
9806414c
by suzuki toshiya at 2023-04-24T13:36:30+09:00
-
f312b340
by suzuki toshiya at 2023-04-24T14:06:09+09:00
-
40676afc
by Werner Lemberg at 2023-04-25T11:47:18+02:00
-
0a3836c9
by Werner Lemberg at 2023-04-25T11:47:18+02:00
-
7ab541a2
by Alexei Podtelezhnikov at 2023-04-26T23:15:24-04:00
-
cfe54d6a
by Werner Lemberg at 2023-04-27T06:24:48+02:00
-
9a3d05d9
by Werner Lemberg at 2023-04-27T06:24:48+02:00
-
13df1c7d
by Werner Lemberg at 2023-04-28T06:39:32+02:00
-
4908c1e8
by Werner Lemberg at 2023-04-28T06:54:25+02:00
-
17a0c5df
by Werner Lemberg at 2023-04-28T10:40:41+02:00
-
966ff5a5
by Werner Lemberg at 2023-04-28T15:25:20+02:00
-
08268691
by Werner Lemberg at 2023-04-28T15:33:58+02:00
-
36a086b6
by Alexei Podtelezhnikov at 2023-04-28T19:40:35-04:00
-
77bbfc59
by Werner Lemberg at 2023-04-30T14:42:11+00:00
27 changed files:
- docs/CHANGES
- docs/formats.txt
- include/freetype/freetype.h
- include/freetype/ftchapters.h
- include/freetype/ftdriver.h
- include/freetype/ftimage.h
- include/freetype/ftoutln.h
- include/freetype/internal/services/svmetric.h
- include/freetype/internal/tttypes.h
- src/autofit/afblue.dat
- src/autofit/aflatin.c
- src/autofit/afshaper.c
- src/base/ftcalc.c
- src/base/ftsystem.c
- src/bdf/bdf.h
- src/bdf/bdflib.c
- src/cff/cffdrivr.c
- src/cff/cffload.c
- src/cff/cffparse.c
- src/cid/cidgload.c
- src/pshinter/pshalgo.c
- src/sdf/ftsdf.c
- src/sfnt/pngshim.c
- src/sfnt/sfdriver.c
- src/sfnt/ttload.c
- src/truetype/ttgxvar.c
- src/truetype/ttinterp.c
Changes:
... | ... | @@ -2424,7 +2424,7 @@ CHANGES BETWEEN 2.3.8 and 2.3.7 |
2424 | 2424 | is provided for x86 and ARM. See FT_CONFIG_OPTION_INLINE_MULFIX
|
2425 | 2425 | and FT_CONFIG_OPTION_NO_ASSEMBLER (in ftoption.h) for more.
|
2426 | 2426 | |
2427 | - - The handling of `tricky' fonts (this is, fonts which don't work
|
|
2427 | + - The handling of `tricky' fonts (that is, fonts which don't work
|
|
2428 | 2428 | with the autohinter, needing the font format's hinting engine)
|
2429 | 2429 | has been generalized and changed slightly:
|
2430 | 2430 | |
... | ... | @@ -2881,7 +2881,7 @@ CHANGES BETWEEN 2.2 and 2.1.10 |
2881 | 2881 | |
2882 | 2882 | II. IMPORTANT CHANGES
|
2883 | 2883 | |
2884 | - - Version 2.2 no longer exposes its internals, this is, the header
|
|
2884 | + - Version 2.2 no longer exposes its internals, that is, the header
|
|
2885 | 2885 | files located in the `include/freetype/internal' directory of
|
2886 | 2886 | the source package are not copied anymore by the `make install'
|
2887 | 2887 | command. Consequently, a number of rogue clients which directly
|
... | ... | @@ -57,7 +57,7 @@ Notes |
57 | 57 | (`*') in the table below.
|
58 | 58 | |
59 | 59 | FreeType can be configured to support Mac files (on older Mac OS
|
60 | - versions, a `file' is stored as a data and a resource fork, this is,
|
|
60 | + versions, a `file' is stored as a data and a resource fork, that is,
|
|
61 | 61 | within two separate data chunks). If a file can't be opened as a
|
62 | 62 | font, FreeType then checks whether it is a resource fork, trying to
|
63 | 63 | extract the contained font data from either a `POST' or `sfnt'
|
... | ... | @@ -102,61 +102,25 @@ FT_BEGIN_HEADER |
102 | 102 | */
|
103 | 103 | |
104 | 104 | |
105 | - |
|
106 | - /*************************************************************************/
|
|
107 | - /*************************************************************************/
|
|
108 | - /* */
|
|
109 | - /* B A S I C T Y P E S */
|
|
110 | - /* */
|
|
111 | - /*************************************************************************/
|
|
112 | - /*************************************************************************/
|
|
113 | - |
|
114 | - |
|
115 | 105 | /**************************************************************************
|
116 | 106 | *
|
117 | 107 | * @section:
|
118 | - * base_interface
|
|
108 | + * font_testing_macros
|
|
119 | 109 | *
|
120 | 110 | * @title:
|
121 | - * Base Interface
|
|
111 | + * Font Testing Macros
|
|
122 | 112 | *
|
123 | 113 | * @abstract:
|
124 | - * The FreeType~2 base font interface.
|
|
114 | + * Macros to test various properties of fonts.
|
|
125 | 115 | *
|
126 | 116 | * @description:
|
127 | - * This section describes the most important public high-level API
|
|
128 | - * functions of FreeType~2.
|
|
117 | + * Macros to test the most important font properties.
|
|
129 | 118 | *
|
130 | - * @order:
|
|
131 | - * FT_Library
|
|
132 | - * FT_Face
|
|
133 | - * FT_Size
|
|
134 | - * FT_GlyphSlot
|
|
135 | - * FT_CharMap
|
|
136 | - * FT_Encoding
|
|
137 | - * FT_ENC_TAG
|
|
138 | - *
|
|
139 | - * FT_FaceRec
|
|
140 | - *
|
|
141 | - * FT_FACE_FLAG_SCALABLE
|
|
142 | - * FT_FACE_FLAG_FIXED_SIZES
|
|
143 | - * FT_FACE_FLAG_FIXED_WIDTH
|
|
144 | - * FT_FACE_FLAG_HORIZONTAL
|
|
145 | - * FT_FACE_FLAG_VERTICAL
|
|
146 | - * FT_FACE_FLAG_COLOR
|
|
147 | - * FT_FACE_FLAG_SFNT
|
|
148 | - * FT_FACE_FLAG_CID_KEYED
|
|
149 | - * FT_FACE_FLAG_TRICKY
|
|
150 | - * FT_FACE_FLAG_KERNING
|
|
151 | - * FT_FACE_FLAG_MULTIPLE_MASTERS
|
|
152 | - * FT_FACE_FLAG_VARIATION
|
|
153 | - * FT_FACE_FLAG_GLYPH_NAMES
|
|
154 | - * FT_FACE_FLAG_EXTERNAL_STREAM
|
|
155 | - * FT_FACE_FLAG_HINTER
|
|
156 | - * FT_FACE_FLAG_SVG
|
|
157 | - * FT_FACE_FLAG_SBIX
|
|
158 | - * FT_FACE_FLAG_SBIX_OVERLAY
|
|
119 | + * It is recommended to use these high-level macros instead of directly
|
|
120 | + * testing the corresponding flags, which are scattered over various
|
|
121 | + * structures.
|
|
159 | 122 | *
|
123 | + * @order:
|
|
160 | 124 | * FT_HAS_HORIZONTAL
|
161 | 125 | * FT_HAS_VERTICAL
|
162 | 126 | * FT_HAS_KERNING
|
... | ... | @@ -176,21 +140,59 @@ FT_BEGIN_HEADER |
176 | 140 | * FT_IS_NAMED_INSTANCE
|
177 | 141 | * FT_IS_VARIATION
|
178 | 142 | *
|
179 | - * FT_STYLE_FLAG_BOLD
|
|
180 | - * FT_STYLE_FLAG_ITALIC
|
|
143 | + */
|
|
144 | + |
|
145 | + |
|
146 | + /**************************************************************************
|
|
147 | + *
|
|
148 | + * @section:
|
|
149 | + * library_setup
|
|
181 | 150 | *
|
182 | - * FT_SizeRec
|
|
183 | - * FT_Size_Metrics
|
|
151 | + * @title:
|
|
152 | + * Library Setup
|
|
184 | 153 | *
|
185 | - * FT_GlyphSlotRec
|
|
186 | - * FT_Glyph_Metrics
|
|
187 | - * FT_SubGlyph
|
|
154 | + * @abstract:
|
|
155 | + * Functions to start and end the usage of the FreeType library.
|
|
188 | 156 | *
|
189 | - * FT_Bitmap_Size
|
|
157 | + * @description:
|
|
158 | + * Functions to start and end the usage of the FreeType library.
|
|
159 | + *
|
|
160 | + * Note that @FT_Library_Version and @FREETYPE_XXX are of limited use
|
|
161 | + * because even a new release of FreeType with only documentation
|
|
162 | + * changes increases the version number.
|
|
190 | 163 | *
|
164 | + * @order:
|
|
165 | + * FT_Library
|
|
191 | 166 | * FT_Init_FreeType
|
192 | 167 | * FT_Done_FreeType
|
193 | 168 | *
|
169 | + * FT_Library_Version
|
|
170 | + * FREETYPE_XXX
|
|
171 | + *
|
|
172 | + */
|
|
173 | + |
|
174 | + |
|
175 | + /**************************************************************************
|
|
176 | + *
|
|
177 | + * @section:
|
|
178 | + * face_creation
|
|
179 | + *
|
|
180 | + * @title:
|
|
181 | + * Face Creation
|
|
182 | + *
|
|
183 | + * @abstract:
|
|
184 | + * Functions to manage fonts.
|
|
185 | + *
|
|
186 | + * @description:
|
|
187 | + * The functions and structures collected in this section operate on
|
|
188 | + * fonts globally.
|
|
189 | + *
|
|
190 | + * @order:
|
|
191 | + * FT_Face
|
|
192 | + * FT_FaceRec
|
|
193 | + * FT_FACE_FLAG_XXX
|
|
194 | + * FT_STYLE_FLAG_XXX
|
|
195 | + *
|
|
194 | 196 | * FT_New_Face
|
195 | 197 | * FT_Done_Face
|
196 | 198 | * FT_Reference_Face
|
... | ... | @@ -198,10 +200,36 @@ FT_BEGIN_HEADER |
198 | 200 | * FT_Face_Properties
|
199 | 201 | * FT_Open_Face
|
200 | 202 | * FT_Open_Args
|
203 | + * FT_OPEN_XXX
|
|
201 | 204 | * FT_Parameter
|
202 | 205 | * FT_Attach_File
|
203 | 206 | * FT_Attach_Stream
|
204 | 207 | *
|
208 | + */
|
|
209 | + |
|
210 | + |
|
211 | + /**************************************************************************
|
|
212 | + *
|
|
213 | + * @section:
|
|
214 | + * sizing_and_scaling
|
|
215 | + *
|
|
216 | + * @title:
|
|
217 | + * Sizing and Scaling
|
|
218 | + *
|
|
219 | + * @abstract:
|
|
220 | + * Functions to manage font sizes.
|
|
221 | + *
|
|
222 | + * @description:
|
|
223 | + * The functions and structures collected in this section are related to
|
|
224 | + * selecting and manipulating the size of a font globally.
|
|
225 | + *
|
|
226 | + * @order:
|
|
227 | + * FT_Size
|
|
228 | + * FT_SizeRec
|
|
229 | + * FT_Size_Metrics
|
|
230 | + *
|
|
231 | + * FT_Bitmap_Size
|
|
232 | + *
|
|
205 | 233 | * FT_Set_Char_Size
|
206 | 234 | * FT_Set_Pixel_Sizes
|
207 | 235 | * FT_Request_Size
|
... | ... | @@ -209,44 +237,37 @@ FT_BEGIN_HEADER |
209 | 237 | * FT_Size_Request_Type
|
210 | 238 | * FT_Size_RequestRec
|
211 | 239 | * FT_Size_Request
|
240 | + *
|
|
212 | 241 | * FT_Set_Transform
|
213 | 242 | * FT_Get_Transform
|
214 | - * FT_Load_Glyph
|
|
215 | - * FT_Get_Char_Index
|
|
216 | - * FT_Get_First_Char
|
|
217 | - * FT_Get_Next_Char
|
|
218 | - * FT_Load_Char
|
|
219 | 243 | *
|
220 | - * FT_OPEN_MEMORY
|
|
221 | - * FT_OPEN_STREAM
|
|
222 | - * FT_OPEN_PATHNAME
|
|
223 | - * FT_OPEN_DRIVER
|
|
224 | - * FT_OPEN_PARAMS
|
|
225 | - *
|
|
226 | - * FT_LOAD_DEFAULT
|
|
227 | - * FT_LOAD_RENDER
|
|
228 | - * FT_LOAD_MONOCHROME
|
|
229 | - * FT_LOAD_LINEAR_DESIGN
|
|
230 | - * FT_LOAD_NO_SCALE
|
|
231 | - * FT_LOAD_NO_HINTING
|
|
232 | - * FT_LOAD_NO_BITMAP
|
|
233 | - * FT_LOAD_SBITS_ONLY
|
|
234 | - * FT_LOAD_NO_AUTOHINT
|
|
235 | - * FT_LOAD_COLOR
|
|
236 | - *
|
|
237 | - * FT_LOAD_VERTICAL_LAYOUT
|
|
238 | - * FT_LOAD_IGNORE_TRANSFORM
|
|
239 | - * FT_LOAD_FORCE_AUTOHINT
|
|
240 | - * FT_LOAD_NO_RECURSE
|
|
241 | - * FT_LOAD_PEDANTIC
|
|
242 | - *
|
|
243 | - * FT_LOAD_TARGET_NORMAL
|
|
244 | - * FT_LOAD_TARGET_LIGHT
|
|
245 | - * FT_LOAD_TARGET_MONO
|
|
246 | - * FT_LOAD_TARGET_LCD
|
|
247 | - * FT_LOAD_TARGET_LCD_V
|
|
244 | + */
|
|
245 | + |
|
246 | + |
|
247 | + /**************************************************************************
|
|
248 | + *
|
|
249 | + * @section:
|
|
250 | + * glyph_retrieval
|
|
251 | + *
|
|
252 | + * @title:
|
|
253 | + * Glyph Retrieval
|
|
254 | + *
|
|
255 | + * @abstract:
|
|
256 | + * Functions to manage glyphs.
|
|
257 | + *
|
|
258 | + * @description:
|
|
259 | + * The functions and structures collected in this section operate on
|
|
260 | + * single glyphs, of which @FT_Load_Glyph is most important.
|
|
248 | 261 | *
|
262 | + * @order:
|
|
263 | + * FT_GlyphSlot
|
|
264 | + * FT_GlyphSlotRec
|
|
265 | + * FT_Glyph_Metrics
|
|
266 | + *
|
|
267 | + * FT_Load_Glyph
|
|
268 | + * FT_LOAD_XXX
|
|
249 | 269 | * FT_LOAD_TARGET_MODE
|
270 | + * FT_LOAD_TARGET_XXX
|
|
250 | 271 | *
|
251 | 272 | * FT_Render_Glyph
|
252 | 273 | * FT_Render_Mode
|
... | ... | @@ -254,34 +275,121 @@ FT_BEGIN_HEADER |
254 | 275 | * FT_Kerning_Mode
|
255 | 276 | * FT_Get_Track_Kerning
|
256 | 277 | *
|
278 | + */
|
|
279 | + |
|
280 | + |
|
281 | + /**************************************************************************
|
|
282 | + *
|
|
283 | + * @section:
|
|
284 | + * character_mapping
|
|
285 | + *
|
|
286 | + * @title:
|
|
287 | + * Character Mapping
|
|
288 | + *
|
|
289 | + * @abstract:
|
|
290 | + * Functions to manage character-to-glyph maps.
|
|
291 | + *
|
|
292 | + * @description:
|
|
293 | + * This section holds functions and structures that are related to
|
|
294 | + * mapping character input codes to glyph indices.
|
|
295 | + *
|
|
296 | + * Note that for many scripts the simplistic approach used by FreeType
|
|
297 | + * of mapping a single character to a single glyph is not valid or
|
|
298 | + * possible! In general, a higher-level library like HarfBuzz or ICU
|
|
299 | + * should be used for handling text strings.
|
|
300 | + *
|
|
301 | + * @order:
|
|
302 | + * FT_CharMap
|
|
257 | 303 | * FT_CharMapRec
|
304 | + * FT_Encoding
|
|
305 | + * FT_ENC_TAG
|
|
306 | + *
|
|
258 | 307 | * FT_Select_Charmap
|
259 | 308 | * FT_Set_Charmap
|
260 | 309 | * FT_Get_Charmap_Index
|
261 | 310 | *
|
311 | + * FT_Get_Char_Index
|
|
312 | + * FT_Get_First_Char
|
|
313 | + * FT_Get_Next_Char
|
|
314 | + * FT_Load_Char
|
|
315 | + *
|
|
316 | + */
|
|
317 | + |
|
318 | + |
|
319 | + /**************************************************************************
|
|
320 | + *
|
|
321 | + * @section:
|
|
322 | + * information_retrieval
|
|
323 | + *
|
|
324 | + * @title:
|
|
325 | + * Information Retrieval
|
|
326 | + *
|
|
327 | + * @abstract:
|
|
328 | + * Functions to retrieve font and glyph information.
|
|
329 | + *
|
|
330 | + * @description:
|
|
331 | + * Functions to retrieve font and glyph information. Only some very
|
|
332 | + * basic data is covered; see also the chapter on the format-specific
|
|
333 | + * API for more.
|
|
334 | + *
|
|
335 | + *
|
|
336 | + * @order:
|
|
262 | 337 | * FT_Get_Name_Index
|
263 | 338 | * FT_Get_Glyph_Name
|
264 | 339 | * FT_Get_Postscript_Name
|
265 | 340 | * FT_Get_FSType_Flags
|
341 | + * FT_FSTYPE_XXX
|
|
266 | 342 | * FT_Get_SubGlyph_Info
|
343 | + * FT_SUBGLYPH_FLAG_XXX
|
|
344 | + *
|
|
345 | + */
|
|
346 | + |
|
347 | + |
|
348 | + /**************************************************************************
|
|
349 | + *
|
|
350 | + * @section:
|
|
351 | + * other_api_data
|
|
352 | + *
|
|
353 | + * @title:
|
|
354 | + * Other API Data
|
|
355 | + *
|
|
356 | + * @abstract:
|
|
357 | + * Other structures, enumerations, and macros.
|
|
267 | 358 | *
|
359 | + * @description:
|
|
360 | + * Other structures, enumerations, and macros. Deprecated functions are
|
|
361 | + * also listed here.
|
|
362 | + *
|
|
363 | + * @order:
|
|
268 | 364 | * FT_Face_Internal
|
269 | 365 | * FT_Size_Internal
|
270 | 366 | * FT_Slot_Internal
|
271 | 367 | *
|
272 | - * FT_FACE_FLAG_XXX
|
|
273 | - * FT_STYLE_FLAG_XXX
|
|
274 | - * FT_OPEN_XXX
|
|
275 | - * FT_LOAD_XXX
|
|
276 | - * FT_LOAD_TARGET_XXX
|
|
277 | - * FT_SUBGLYPH_FLAG_XXX
|
|
278 | - * FT_FSTYPE_XXX
|
|
368 | + * FT_SubGlyph
|
|
279 | 369 | *
|
280 | 370 | * FT_HAS_FAST_GLYPHS
|
371 | + * FT_Face_CheckTrueTypePatents
|
|
372 | + * FT_Face_SetUnpatentedHinting
|
|
281 | 373 | *
|
282 | 374 | */
|
283 | 375 | |
284 | 376 | |
377 | + /*************************************************************************/
|
|
378 | + /*************************************************************************/
|
|
379 | + /* */
|
|
380 | + /* B A S I C T Y P E S */
|
|
381 | + /* */
|
|
382 | + /*************************************************************************/
|
|
383 | + /*************************************************************************/
|
|
384 | + |
|
385 | + |
|
386 | + /**************************************************************************
|
|
387 | + *
|
|
388 | + * @section:
|
|
389 | + * glyph_retrieval
|
|
390 | + *
|
|
391 | + */
|
|
392 | + |
|
285 | 393 | /**************************************************************************
|
286 | 394 | *
|
287 | 395 | * @struct:
|
... | ... | @@ -349,6 +457,13 @@ FT_BEGIN_HEADER |
349 | 457 | } FT_Glyph_Metrics;
|
350 | 458 | |
351 | 459 | |
460 | + /**************************************************************************
|
|
461 | + *
|
|
462 | + * @section:
|
|
463 | + * sizing_and_scaling
|
|
464 | + *
|
|
465 | + */
|
|
466 | + |
|
352 | 467 | /**************************************************************************
|
353 | 468 | *
|
354 | 469 | * @struct:
|
... | ... | @@ -409,6 +524,13 @@ FT_BEGIN_HEADER |
409 | 524 | /*************************************************************************/
|
410 | 525 | /*************************************************************************/
|
411 | 526 | |
527 | + /**************************************************************************
|
|
528 | + *
|
|
529 | + * @section:
|
|
530 | + * library_setup
|
|
531 | + *
|
|
532 | + */
|
|
533 | + |
|
412 | 534 | /**************************************************************************
|
413 | 535 | *
|
414 | 536 | * @type:
|
... | ... | @@ -483,7 +605,7 @@ FT_BEGIN_HEADER |
483 | 605 | /**************************************************************************
|
484 | 606 | *
|
485 | 607 | * @section:
|
486 | - * base_interface
|
|
608 | + * face_creation
|
|
487 | 609 | *
|
488 | 610 | */
|
489 | 611 | |
... | ... | @@ -519,6 +641,13 @@ FT_BEGIN_HEADER |
519 | 641 | typedef struct FT_FaceRec_* FT_Face;
|
520 | 642 | |
521 | 643 | |
644 | + /**************************************************************************
|
|
645 | + *
|
|
646 | + * @section:
|
|
647 | + * sizing_and_scaling
|
|
648 | + *
|
|
649 | + */
|
|
650 | + |
|
522 | 651 | /**************************************************************************
|
523 | 652 | *
|
524 | 653 | * @type:
|
... | ... | @@ -551,6 +680,13 @@ FT_BEGIN_HEADER |
551 | 680 | typedef struct FT_SizeRec_* FT_Size;
|
552 | 681 | |
553 | 682 | |
683 | + /**************************************************************************
|
|
684 | + *
|
|
685 | + * @section:
|
|
686 | + * glyph_retrieval
|
|
687 | + *
|
|
688 | + */
|
|
689 | + |
|
554 | 690 | /**************************************************************************
|
555 | 691 | *
|
556 | 692 | * @type:
|
... | ... | @@ -570,6 +706,13 @@ FT_BEGIN_HEADER |
570 | 706 | typedef struct FT_GlyphSlotRec_* FT_GlyphSlot;
|
571 | 707 | |
572 | 708 | |
709 | + /**************************************************************************
|
|
710 | + *
|
|
711 | + * @section:
|
|
712 | + * character_mapping
|
|
713 | + *
|
|
714 | + */
|
|
715 | + |
|
573 | 716 | /**************************************************************************
|
574 | 717 | *
|
575 | 718 | * @type:
|
... | ... | @@ -877,6 +1020,13 @@ FT_BEGIN_HEADER |
877 | 1020 | /*************************************************************************/
|
878 | 1021 | |
879 | 1022 | |
1023 | + /**************************************************************************
|
|
1024 | + *
|
|
1025 | + * @section:
|
|
1026 | + * other_api_data
|
|
1027 | + *
|
|
1028 | + */
|
|
1029 | + |
|
880 | 1030 | /**************************************************************************
|
881 | 1031 | *
|
882 | 1032 | * @type:
|
... | ... | @@ -892,6 +1042,13 @@ FT_BEGIN_HEADER |
892 | 1042 | typedef struct FT_Face_InternalRec_* FT_Face_Internal;
|
893 | 1043 | |
894 | 1044 | |
1045 | + /**************************************************************************
|
|
1046 | + *
|
|
1047 | + * @section:
|
|
1048 | + * face_creation
|
|
1049 | + *
|
|
1050 | + */
|
|
1051 | + |
|
895 | 1052 | /**************************************************************************
|
896 | 1053 | *
|
897 | 1054 | * @struct:
|
... | ... | @@ -918,7 +1075,7 @@ FT_BEGIN_HEADER |
918 | 1075 | * If we have the third named instance of face~4, say, `face_index` is
|
919 | 1076 | * set to 0x00030004.
|
920 | 1077 | *
|
921 | - * Bit 31 is always zero (this is, `face_index` is always a positive
|
|
1078 | + * Bit 31 is always zero (that is, `face_index` is always a positive
|
|
922 | 1079 | * value).
|
923 | 1080 | *
|
924 | 1081 | * [Since 2.9] Changing the design coordinates with
|
... | ... | @@ -936,7 +1093,7 @@ FT_BEGIN_HEADER |
936 | 1093 | *
|
937 | 1094 | * [Since 2.6.1] Bits 16-30 hold the number of named instances
|
938 | 1095 | * available for the current face if we have a GX or OpenType variation
|
939 | - * (sub)font. Bit 31 is always zero (this is, `style_flags` is always
|
|
1096 | + * (sub)font. Bit 31 is always zero (that is, `style_flags` is always
|
|
940 | 1097 | * a positive value). Note that a variation font has always at least
|
941 | 1098 | * one named instance, namely the default instance.
|
942 | 1099 | *
|
... | ... | @@ -1002,7 +1159,7 @@ FT_BEGIN_HEADER |
1002 | 1159 | * Note that the bounding box might be off by (at least) one pixel for
|
1003 | 1160 | * hinted fonts. See @FT_Size_Metrics for further discussion.
|
1004 | 1161 | *
|
1005 | - * Note that the bounding box does not vary in OpenType variable fonts
|
|
1162 | + * Note that the bounding box does not vary in OpenType variation fonts
|
|
1006 | 1163 | * and should only be used in relation to the default instance.
|
1007 | 1164 | *
|
1008 | 1165 | * units_per_EM ::
|
... | ... | @@ -1090,9 +1247,9 @@ FT_BEGIN_HEADER |
1090 | 1247 | |
1091 | 1248 | FT_Generic generic;
|
1092 | 1249 | |
1093 | - /*# The following member variables (down to `underline_thickness`) */
|
|
1094 | - /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */
|
|
1095 | - /*# for bitmap fonts. */
|
|
1250 | + /* The following member variables (down to `underline_thickness`) */
|
|
1251 | + /* are only relevant to scalable outlines; cf. @FT_Bitmap_Size */
|
|
1252 | + /* for bitmap fonts. */
|
|
1096 | 1253 | FT_BBox bbox;
|
1097 | 1254 | |
1098 | 1255 | FT_UShort units_per_EM;
|
... | ... | @@ -1110,7 +1267,7 @@ FT_BEGIN_HEADER |
1110 | 1267 | FT_Size size;
|
1111 | 1268 | FT_CharMap charmap;
|
1112 | 1269 | |
1113 | - /*@private begin */
|
|
1270 | + /* private fields, internal to FreeType */
|
|
1114 | 1271 | |
1115 | 1272 | FT_Driver driver;
|
1116 | 1273 | FT_Memory memory;
|
... | ... | @@ -1123,8 +1280,6 @@ FT_BEGIN_HEADER |
1123 | 1280 | |
1124 | 1281 | FT_Face_Internal internal;
|
1125 | 1282 | |
1126 | - /*@private end */
|
|
1127 | - |
|
1128 | 1283 | } FT_FaceRec;
|
1129 | 1284 | |
1130 | 1285 | |
... | ... | @@ -1207,13 +1362,13 @@ FT_BEGIN_HEADER |
1207 | 1362 | * successfully; in all other cases you get an
|
1208 | 1363 | * `FT_Err_Invalid_Argument` error.
|
1209 | 1364 | *
|
1210 | - * Note that CID-keyed fonts that are in an SFNT wrapper (this is, all
|
|
1365 | + * Note that CID-keyed fonts that are in an SFNT wrapper (that is, all
|
|
1211 | 1366 | * OpenType/CFF fonts) don't have this flag set since the glyphs are
|
1212 | 1367 | * accessed in the normal way (using contiguous indices); the
|
1213 | 1368 | * 'CID-ness' isn't visible to the application.
|
1214 | 1369 | *
|
1215 | 1370 | * FT_FACE_FLAG_TRICKY ::
|
1216 | - * The face is 'tricky', this is, it always needs the font format's
|
|
1371 | + * The face is 'tricky', that is, it always needs the font format's
|
|
1217 | 1372 | * native hinting engine to get a reasonable result. A typical example
|
1218 | 1373 | * is the old Chinese font `mingli.ttf` (but not `mingliu.ttc`) that
|
1219 | 1374 | * uses TrueType bytecode instructions to move and scale all of its
|
... | ... | @@ -1235,8 +1390,8 @@ FT_BEGIN_HEADER |
1235 | 1390 | * FT_FACE_FLAG_VARIATION ::
|
1236 | 1391 | * [Since 2.9] Set if the current face (or named instance) has been
|
1237 | 1392 | * altered with @FT_Set_MM_Design_Coordinates,
|
1238 | - * @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates.
|
|
1239 | - * This flag is unset by a call to @FT_Set_Named_Instance.
|
|
1393 | + * @FT_Set_Var_Design_Coordinates, @FT_Set_Var_Blend_Coordinates, or
|
|
1394 | + * @FT_Set_MM_WeightVector to select a non-default instance.
|
|
1240 | 1395 | *
|
1241 | 1396 | * FT_FACE_FLAG_SVG ::
|
1242 | 1397 | * [Since 2.12] The face has an 'SVG~' OpenType table.
|
... | ... | @@ -1272,6 +1427,13 @@ FT_BEGIN_HEADER |
1272 | 1427 | #define FT_FACE_FLAG_SBIX_OVERLAY ( 1L << 18 )
|
1273 | 1428 | |
1274 | 1429 | |
1430 | + /**************************************************************************
|
|
1431 | + *
|
|
1432 | + * @section:
|
|
1433 | + * font_testing_macros
|
|
1434 | + *
|
|
1435 | + */
|
|
1436 | + |
|
1275 | 1437 | /**************************************************************************
|
1276 | 1438 | *
|
1277 | 1439 | * @macro:
|
... | ... | @@ -1381,6 +1543,13 @@ FT_BEGIN_HEADER |
1381 | 1543 | ( !!( (face)->face_flags & FT_FACE_FLAG_FIXED_SIZES ) )
|
1382 | 1544 | |
1383 | 1545 | |
1546 | + /**************************************************************************
|
|
1547 | + *
|
|
1548 | + * @section:
|
|
1549 | + * other_api_data
|
|
1550 | + *
|
|
1551 | + */
|
|
1552 | + |
|
1384 | 1553 | /**************************************************************************
|
1385 | 1554 | *
|
1386 | 1555 | * @macro:
|
... | ... | @@ -1393,6 +1562,13 @@ FT_BEGIN_HEADER |
1393 | 1562 | #define FT_HAS_FAST_GLYPHS( face ) 0
|
1394 | 1563 | |
1395 | 1564 | |
1565 | + /**************************************************************************
|
|
1566 | + *
|
|
1567 | + * @section:
|
|
1568 | + * font_testing_macros
|
|
1569 | + *
|
|
1570 | + */
|
|
1571 | + |
|
1396 | 1572 | /**************************************************************************
|
1397 | 1573 | *
|
1398 | 1574 | * @macro:
|
... | ... | @@ -1451,8 +1627,8 @@ FT_BEGIN_HEADER |
1451 | 1627 | *
|
1452 | 1628 | * @description:
|
1453 | 1629 | * A macro that returns true whenever a face object has been altered by
|
1454 | - * @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
|
|
1455 | - * @FT_Set_Var_Blend_Coordinates.
|
|
1630 | + * @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates,
|
|
1631 | + * @FT_Set_Var_Blend_Coordinates, or @FT_Set_MM_WeightVector.
|
|
1456 | 1632 | *
|
1457 | 1633 | * @since:
|
1458 | 1634 | * 2.9
|
... | ... | @@ -1628,6 +1804,13 @@ FT_BEGIN_HEADER |
1628 | 1804 | ( !!( (face)->face_flags & FT_FACE_FLAG_SBIX_OVERLAY ) )
|
1629 | 1805 | |
1630 | 1806 | |
1807 | + /**************************************************************************
|
|
1808 | + *
|
|
1809 | + * @section:
|
|
1810 | + * face_creation
|
|
1811 | + *
|
|
1812 | + */
|
|
1813 | + |
|
1631 | 1814 | /**************************************************************************
|
1632 | 1815 | *
|
1633 | 1816 | * @enum:
|
... | ... | @@ -1654,6 +1837,13 @@ FT_BEGIN_HEADER |
1654 | 1837 | #define FT_STYLE_FLAG_BOLD ( 1 << 1 )
|
1655 | 1838 | |
1656 | 1839 | |
1840 | + /**************************************************************************
|
|
1841 | + *
|
|
1842 | + * @section:
|
|
1843 | + * other_api_data
|
|
1844 | + *
|
|
1845 | + */
|
|
1846 | + |
|
1657 | 1847 | /**************************************************************************
|
1658 | 1848 | *
|
1659 | 1849 | * @type:
|
... | ... | @@ -1666,6 +1856,13 @@ FT_BEGIN_HEADER |
1666 | 1856 | typedef struct FT_Size_InternalRec_* FT_Size_Internal;
|
1667 | 1857 | |
1668 | 1858 | |
1859 | + /**************************************************************************
|
|
1860 | + *
|
|
1861 | + * @section:
|
|
1862 | + * sizing_and_scaling
|
|
1863 | + *
|
|
1864 | + */
|
|
1865 | + |
|
1669 | 1866 | /**************************************************************************
|
1670 | 1867 | *
|
1671 | 1868 | * @struct:
|
... | ... | @@ -1817,6 +2014,13 @@ FT_BEGIN_HEADER |
1817 | 2014 | } FT_SizeRec;
|
1818 | 2015 | |
1819 | 2016 | |
2017 | + /**************************************************************************
|
|
2018 | + *
|
|
2019 | + * @section:
|
|
2020 | + * other_api_data
|
|
2021 | + *
|
|
2022 | + */
|
|
2023 | + |
|
1820 | 2024 | /**************************************************************************
|
1821 | 2025 | *
|
1822 | 2026 | * @struct:
|
... | ... | @@ -1848,6 +2052,13 @@ FT_BEGIN_HEADER |
1848 | 2052 | typedef struct FT_Slot_InternalRec_* FT_Slot_Internal;
|
1849 | 2053 | |
1850 | 2054 | |
2055 | + /**************************************************************************
|
|
2056 | + *
|
|
2057 | + * @section:
|
|
2058 | + * glyph_retrieval
|
|
2059 | + *
|
|
2060 | + */
|
|
2061 | + |
|
1851 | 2062 | /**************************************************************************
|
1852 | 2063 | *
|
1853 | 2064 | * @struct:
|
... | ... | @@ -2092,6 +2303,13 @@ FT_BEGIN_HEADER |
2092 | 2303 | /*************************************************************************/
|
2093 | 2304 | |
2094 | 2305 | |
2306 | + /**************************************************************************
|
|
2307 | + *
|
|
2308 | + * @section:
|
|
2309 | + * library_setup
|
|
2310 | + *
|
|
2311 | + */
|
|
2312 | + |
|
2095 | 2313 | /**************************************************************************
|
2096 | 2314 | *
|
2097 | 2315 | * @function:
|
... | ... | @@ -2149,6 +2367,13 @@ FT_BEGIN_HEADER |
2149 | 2367 | FT_Done_FreeType( FT_Library library );
|
2150 | 2368 | |
2151 | 2369 | |
2370 | + /**************************************************************************
|
|
2371 | + *
|
|
2372 | + * @section:
|
|
2373 | + * face_creation
|
|
2374 | + *
|
|
2375 | + */
|
|
2376 | + |
|
2152 | 2377 | /**************************************************************************
|
2153 | 2378 | *
|
2154 | 2379 | * @enum:
|
... | ... | @@ -2451,7 +2676,7 @@ FT_BEGIN_HEADER |
2451 | 2676 | * Each new face object created with this function also owns a default
|
2452 | 2677 | * @FT_Size object, accessible as `face->size`.
|
2453 | 2678 | *
|
2454 | - * One @FT_Library instance can have multiple face objects, this is,
|
|
2679 | + * One @FT_Library instance can have multiple face objects, that is,
|
|
2455 | 2680 | * @FT_Open_Face and its siblings can be called multiple times using the
|
2456 | 2681 | * same `library` argument.
|
2457 | 2682 | *
|
... | ... | @@ -2650,6 +2875,13 @@ FT_BEGIN_HEADER |
2650 | 2875 | FT_Done_Face( FT_Face face );
|
2651 | 2876 | |
2652 | 2877 | |
2878 | + /**************************************************************************
|
|
2879 | + *
|
|
2880 | + * @section:
|
|
2881 | + * sizing_and_scaling
|
|
2882 | + *
|
|
2883 | + */
|
|
2884 | + |
|
2653 | 2885 | /**************************************************************************
|
2654 | 2886 | *
|
2655 | 2887 | * @function:
|
... | ... | @@ -2679,7 +2911,7 @@ FT_BEGIN_HEADER |
2679 | 2911 | * silently uses outlines if there is no bitmap for a given glyph index.
|
2680 | 2912 | *
|
2681 | 2913 | * For GX and OpenType variation fonts, a bitmap strike makes sense only
|
2682 | - * if the default instance is active (this is, no glyph variation takes
|
|
2914 | + * if the default instance is active (that is, no glyph variation takes
|
|
2683 | 2915 | * place); otherwise, FreeType simply ignores bitmap strikes. The same
|
2684 | 2916 | * is true for all named instances that are different from the default
|
2685 | 2917 | * instance.
|
... | ... | @@ -2942,6 +3174,13 @@ FT_BEGIN_HEADER |
2942 | 3174 | FT_UInt pixel_height );
|
2943 | 3175 | |
2944 | 3176 | |
3177 | + /**************************************************************************
|
|
3178 | + *
|
|
3179 | + * @section:
|
|
3180 | + * glyph_retrieval
|
|
3181 | + *
|
|
3182 | + */
|
|
3183 | + |
|
2945 | 3184 | /**************************************************************************
|
2946 | 3185 | *
|
2947 | 3186 | * @function:
|
... | ... | @@ -2976,7 +3215,7 @@ FT_BEGIN_HEADER |
2976 | 3215 | * glyph may be transformed. See @FT_Set_Transform for the details.
|
2977 | 3216 | *
|
2978 | 3217 | * For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument` is returned
|
2979 | - * for invalid CID values (this is, for CID values that don't have a
|
|
3218 | + * for invalid CID values (that is, for CID values that don't have a
|
|
2980 | 3219 | * corresponding glyph in the font). See the discussion of the
|
2981 | 3220 | * @FT_FACE_FLAG_CID_KEYED flag for more details.
|
2982 | 3221 | *
|
... | ... | @@ -2990,6 +3229,13 @@ FT_BEGIN_HEADER |
2990 | 3229 | FT_Int32 load_flags );
|
2991 | 3230 | |
2992 | 3231 | |
3232 | + /**************************************************************************
|
|
3233 | + *
|
|
3234 | + * @section:
|
|
3235 | + * character_mapping
|
|
3236 | + *
|
|
3237 | + */
|
|
3238 | + |
|
2993 | 3239 | /**************************************************************************
|
2994 | 3240 | *
|
2995 | 3241 | * @function:
|
... | ... | @@ -3033,6 +3279,13 @@ FT_BEGIN_HEADER |
3033 | 3279 | FT_Int32 load_flags );
|
3034 | 3280 | |
3035 | 3281 | |
3282 | + /**************************************************************************
|
|
3283 | + *
|
|
3284 | + * @section:
|
|
3285 | + * glyph_retrieval
|
|
3286 | + *
|
|
3287 | + */
|
|
3288 | + |
|
3036 | 3289 | /**************************************************************************
|
3037 | 3290 | *
|
3038 | 3291 | * @enum:
|
... | ... | @@ -3372,6 +3625,13 @@ FT_BEGIN_HEADER |
3372 | 3625 | FT_STATIC_CAST( FT_Render_Mode, ( (x) >> 16 ) & 15 )
|
3373 | 3626 | |
3374 | 3627 | |
3628 | + /**************************************************************************
|
|
3629 | + *
|
|
3630 | + * @section:
|
|
3631 | + * sizing_and_scaling
|
|
3632 | + *
|
|
3633 | + */
|
|
3634 | + |
|
3375 | 3635 | /**************************************************************************
|
3376 | 3636 | *
|
3377 | 3637 | * @function:
|
... | ... | @@ -3447,6 +3707,13 @@ FT_BEGIN_HEADER |
3447 | 3707 | FT_Vector* delta );
|
3448 | 3708 | |
3449 | 3709 | |
3710 | + /**************************************************************************
|
|
3711 | + *
|
|
3712 | + * @section:
|
|
3713 | + * glyph_retrieval
|
|
3714 | + *
|
|
3715 | + */
|
|
3716 | + |
|
3450 | 3717 | /**************************************************************************
|
3451 | 3718 | *
|
3452 | 3719 | * @enum:
|
... | ... | @@ -3841,6 +4108,13 @@ FT_BEGIN_HEADER |
3841 | 4108 | FT_Fixed* akerning );
|
3842 | 4109 | |
3843 | 4110 | |
4111 | + /**************************************************************************
|
|
4112 | + *
|
|
4113 | + * @section:
|
|
4114 | + * character_mapping
|
|
4115 | + *
|
|
4116 | + */
|
|
4117 | + |
|
3844 | 4118 | /**************************************************************************
|
3845 | 4119 | *
|
3846 | 4120 | * @function:
|
... | ... | @@ -4057,6 +4331,13 @@ FT_BEGIN_HEADER |
4057 | 4331 | FT_UInt *agindex );
|
4058 | 4332 | |
4059 | 4333 | |
4334 | + /**************************************************************************
|
|
4335 | + *
|
|
4336 | + * @section:
|
|
4337 | + * face_creation
|
|
4338 | + *
|
|
4339 | + */
|
|
4340 | + |
|
4060 | 4341 | /**************************************************************************
|
4061 | 4342 | *
|
4062 | 4343 | * @function:
|
... | ... | @@ -4155,6 +4436,13 @@ FT_BEGIN_HEADER |
4155 | 4436 | FT_Parameter* properties );
|
4156 | 4437 | |
4157 | 4438 | |
4439 | + /**************************************************************************
|
|
4440 | + *
|
|
4441 | + * @section:
|
|
4442 | + * information_retrieval
|
|
4443 | + *
|
|
4444 | + */
|
|
4445 | + |
|
4158 | 4446 | /**************************************************************************
|
4159 | 4447 | *
|
4160 | 4448 | * @function:
|
... | ... | @@ -4266,9 +4554,10 @@ FT_BEGIN_HEADER |
4266 | 4554 | *
|
4267 | 4555 | * [Since 2.9] Special PostScript names for named instances are only
|
4268 | 4556 | * returned if the named instance is set with @FT_Set_Named_Instance (and
|
4269 | - * the font has corresponding entries in its 'fvar' table). If
|
|
4270 | - * @FT_IS_VARIATION returns true, the algorithmically derived PostScript
|
|
4271 | - * name is provided, not looking up special entries for named instances.
|
|
4557 | + * the font has corresponding entries in its 'fvar' table or is the
|
|
4558 | + * default named instance). If @FT_IS_VARIATION returns true, the
|
|
4559 | + * algorithmically derived PostScript name is provided, not looking up
|
|
4560 | + * special entries for named instances.
|
|
4272 | 4561 | */
|
4273 | 4562 | FT_EXPORT( const char* )
|
4274 | 4563 | FT_Get_Postscript_Name( FT_Face face );
|
... | ... | @@ -4900,32 +5189,10 @@ FT_BEGIN_HEADER |
4900 | 5189 | /**************************************************************************
|
4901 | 5190 | *
|
4902 | 5191 | * @section:
|
4903 | - * version
|
|
4904 | - *
|
|
4905 | - * @title:
|
|
4906 | - * FreeType Version
|
|
4907 | - *
|
|
4908 | - * @abstract:
|
|
4909 | - * Functions and macros related to FreeType versions.
|
|
4910 | - *
|
|
4911 | - * @description:
|
|
4912 | - * Note that those functions and macros are of limited use because even a
|
|
4913 | - * new release of FreeType with only documentation changes increases the
|
|
4914 | - * version number.
|
|
4915 | - *
|
|
4916 | - * @order:
|
|
4917 | - * FT_Library_Version
|
|
4918 | - *
|
|
4919 | - * FREETYPE_MAJOR
|
|
4920 | - * FREETYPE_MINOR
|
|
4921 | - * FREETYPE_PATCH
|
|
4922 | - *
|
|
4923 | - * FT_Face_CheckTrueTypePatents
|
|
4924 | - * FT_Face_SetUnpatentedHinting
|
|
5192 | + * library_setup
|
|
4925 | 5193 | *
|
4926 | 5194 | */
|
4927 | 5195 | |
4928 | - |
|
4929 | 5196 | /**************************************************************************
|
4930 | 5197 | *
|
4931 | 5198 | * @enum:
|
... | ... | @@ -4992,6 +5259,13 @@ FT_BEGIN_HEADER |
4992 | 5259 | FT_Int *apatch );
|
4993 | 5260 | |
4994 | 5261 | |
5262 | + /**************************************************************************
|
|
5263 | + *
|
|
5264 | + * @section:
|
|
5265 | + * other_api_data
|
|
5266 | + *
|
|
5267 | + */
|
|
5268 | + |
|
4995 | 5269 | /**************************************************************************
|
4996 | 5270 | *
|
4997 | 5271 | * @function:
|
... | ... | @@ -31,9 +31,28 @@ |
31 | 31 | * Core API
|
32 | 32 | *
|
33 | 33 | * @sections:
|
34 | - * version
|
|
35 | 34 | * basic_types
|
36 | - * base_interface
|
|
35 | + * library_setup
|
|
36 | + * face_creation
|
|
37 | + * font_testing_macros
|
|
38 | + * sizing_and_scaling
|
|
39 | + * glyph_retrieval
|
|
40 | + * character_mapping
|
|
41 | + * information_retrieval
|
|
42 | + * other_api_data
|
|
43 | + *
|
|
44 | + */
|
|
45 | + |
|
46 | + |
|
47 | + /**************************************************************************
|
|
48 | + *
|
|
49 | + * @chapter:
|
|
50 | + * extended_api
|
|
51 | + *
|
|
52 | + * @title:
|
|
53 | + * Extended API
|
|
54 | + *
|
|
55 | + * @sections:
|
|
37 | 56 | * glyph_variants
|
38 | 57 | * color_management
|
39 | 58 | * layer_management
|
... | ... | @@ -134,7 +134,7 @@ FT_BEGIN_HEADER |
134 | 134 | * each being rounded to the nearest pixel edge, taking care of overshoot
|
135 | 135 | * suppression at small sizes, stem darkening, and scaling.
|
136 | 136 | *
|
137 | - * Hstems (this is, hint values defined in the font to help align
|
|
137 | + * Hstems (that is, hint values defined in the font to help align
|
|
138 | 138 | * horizontal features) that fall within a blue zone are said to be
|
139 | 139 | * 'captured' and are aligned to that zone. Uncaptured stems are moved
|
140 | 140 | * in one of four ways, top edge up or down, bottom edge up or down.
|
... | ... | @@ -446,7 +446,7 @@ FT_BEGIN_HEADER |
446 | 446 | * at smaller sizes.
|
447 | 447 | *
|
448 | 448 | * For the auto-hinter, stem-darkening is experimental currently and thus
|
449 | - * switched off by default (this is, `no-stem-darkening` is set to TRUE
|
|
449 | + * switched off by default (that is, `no-stem-darkening` is set to TRUE
|
|
450 | 450 | * by default). Total consistency with the CFF driver is not achieved
|
451 | 451 | * right now because the emboldening method differs and glyphs must be
|
452 | 452 | * scaled down on the Y-axis to keep outline points inside their
|
... | ... | @@ -862,7 +862,7 @@ FT_BEGIN_HEADER |
862 | 862 | * @FT_SpanFunc that takes the y~coordinate of the span as a parameter.
|
863 | 863 | *
|
864 | 864 | * The anti-aliased rasterizer produces coverage values from 0 to 255,
|
865 | - * this is, from completely transparent to completely opaque.
|
|
865 | + * that is, from completely transparent to completely opaque.
|
|
866 | 866 | */
|
867 | 867 | typedef struct FT_Span_
|
868 | 868 | {
|
... | ... | @@ -118,7 +118,7 @@ FT_BEGIN_HEADER |
118 | 118 | * attachement.
|
119 | 119 | *
|
120 | 120 | * Similarly, the function returns success for an empty outline also
|
121 | - * (doing nothing, this is, not calling any emitter); if necessary, you
|
|
121 | + * (doing nothing, that is, not calling any emitter); if necessary, you
|
|
122 | 122 | * should filter this out, too.
|
123 | 123 | */
|
124 | 124 | FT_EXPORT( FT_Error )
|
... | ... | @@ -77,7 +77,7 @@ FT_BEGIN_HEADER |
77 | 77 | typedef void
|
78 | 78 | (*FT_Metrics_Adjust_Func)( FT_Face face );
|
79 | 79 | |
80 | - typedef void
|
|
80 | + typedef FT_Error
|
|
81 | 81 | (*FT_Size_Reset_Func)( FT_Size size );
|
82 | 82 | |
83 | 83 |
... | ... | @@ -1200,12 +1200,16 @@ FT_BEGIN_HEADER |
1200 | 1200 | * mm ::
|
1201 | 1201 | * A pointer to the Multiple Masters service.
|
1202 | 1202 | *
|
1203 | - * var ::
|
|
1204 | - * A pointer to the Metrics Variations service.
|
|
1203 | + * tt_var ::
|
|
1204 | + * A pointer to the Metrics Variations service for the "truetype"
|
|
1205 | + * driver.
|
|
1205 | 1206 | *
|
1206 | - * hdmx ::
|
|
1207 | - * The face's horizontal device metrics ('hdmx' table). This table is
|
|
1208 | - * optional in TrueType/OpenType fonts.
|
|
1207 | + * face_var ::
|
|
1208 | + * A pointer to the Metrics Variations service for this `TT_Face`'s
|
|
1209 | + * driver.
|
|
1210 | + *
|
|
1211 | + * psaux ::
|
|
1212 | + * A pointer to the PostScript Auxiliary service.
|
|
1209 | 1213 | *
|
1210 | 1214 | * gasp ::
|
1211 | 1215 | * The grid-fitting and scaling properties table ('gasp'). This table
|
... | ... | @@ -1357,14 +1361,6 @@ FT_BEGIN_HEADER |
1357 | 1361 | * A mapping between the strike indices exposed by the API and the
|
1358 | 1362 | * indices used in the font's sbit table.
|
1359 | 1363 | *
|
1360 | - * cpal ::
|
|
1361 | - * A pointer to data related to the 'CPAL' table. `NULL` if the table
|
|
1362 | - * is not available.
|
|
1363 | - *
|
|
1364 | - * colr ::
|
|
1365 | - * A pointer to data related to the 'COLR' table. `NULL` if the table
|
|
1366 | - * is not available.
|
|
1367 | - *
|
|
1368 | 1364 | * kern_table ::
|
1369 | 1365 | * A pointer to the 'kern' table.
|
1370 | 1366 | *
|
... | ... | @@ -1405,6 +1401,18 @@ FT_BEGIN_HEADER |
1405 | 1401 | *
|
1406 | 1402 | * ebdt_size ::
|
1407 | 1403 | * The size of the sbit data table.
|
1404 | + *
|
|
1405 | + * cpal ::
|
|
1406 | + * A pointer to data related to the 'CPAL' table. `NULL` if the table
|
|
1407 | + * is not available.
|
|
1408 | + *
|
|
1409 | + * colr ::
|
|
1410 | + * A pointer to data related to the 'COLR' table. `NULL` if the table
|
|
1411 | + * is not available.
|
|
1412 | + *
|
|
1413 | + * svg ::
|
|
1414 | + * A pointer to data related to the 'SVG' table. `NULL` if the table
|
|
1415 | + * is not available.
|
|
1408 | 1416 | */
|
1409 | 1417 | typedef struct TT_FaceRec_
|
1410 | 1418 | {
|
... | ... | @@ -1462,7 +1470,7 @@ FT_BEGIN_HEADER |
1462 | 1470 | /* a typeless pointer to the FT_Service_MetricsVariationsRec table */
|
1463 | 1471 | /* used to handle the HVAR, VVAR, and MVAR OpenType tables by this */
|
1464 | 1472 | /* TT_Face's driver */
|
1465 | - void* face_var;
|
|
1473 | + void* face_var; /* since 2.13.1 */
|
|
1466 | 1474 | #endif
|
1467 | 1475 | |
1468 | 1476 | /* a typeless pointer to the PostScript Aux service */
|
... | ... | @@ -89,7 +89,7 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN: |
89 | 89 | "ت ث ط ظ ك"
|
90 | 90 | // We don't necessarily have access to medial forms via Unicode in case
|
91 | 91 | // Arabic presentational forms are missing. The only character that is
|
92 | - // guaranteed to have the same vertical position with joining (this is,
|
|
92 | + // guaranteed to have the same vertical position with joining (that is,
|
|
93 | 93 | // non-isolated) forms is U+0640, ARABIC TATWEEL, which must join both
|
94 | 94 | // round and flat curves.
|
95 | 95 | AF_BLUE_STRING_ARABIC_JOIN
|
... | ... | @@ -2038,7 +2038,7 @@ |
2038 | 2038 | max = seg2->max_coord;
|
2039 | 2039 | |
2040 | 2040 | /* compute maximum coordinate difference of the two segments */
|
2041 | - /* (this is, how much they overlap) */
|
|
2041 | + /* (that is, how much they overlap) */
|
|
2042 | 2042 | len = max - min;
|
2043 | 2043 | if ( len >= len_threshold )
|
2044 | 2044 | {
|
... | ... | @@ -258,7 +258,7 @@ |
258 | 258 | /*
|
259 | 259 | * We now check whether we can construct blue zones, using glyphs
|
260 | 260 | * covered by the feature only. In case there is not a single zone
|
261 | - * (this is, not a single character is covered), we skip this coverage.
|
|
261 | + * (that is, not a single character is covered), we skip this coverage.
|
|
262 | 262 | *
|
263 | 263 | */
|
264 | 264 | if ( style_class->coverage != AF_COVERAGE_DEFAULT )
|
... | ... | @@ -313,9 +313,9 @@ |
313 | 313 | * hinted and usually rendered glyph.
|
314 | 314 | *
|
315 | 315 | * Consider the superscript feature of font `pala.ttf': Some of the
|
316 | - * glyphs are `real', this is, they have a zero vertical offset, but
|
|
316 | + * glyphs are `real', that is, they have a zero vertical offset, but
|
|
317 | 317 | * most of them are small caps glyphs shifted up to the superscript
|
318 | - * position (this is, the `sups' feature is present in both the GSUB and
|
|
318 | + * position (that is, the `sups' feature is present in both the GSUB and
|
|
319 | 319 | * GPOS tables). The code for blue zones computation actually uses a
|
320 | 320 | * feature's y offset so that the `real' glyphs get correct hints. But
|
321 | 321 | * later on it is impossible to decide whether a glyph index belongs to,
|
... | ... | @@ -1061,7 +1061,7 @@ |
1061 | 1061 | /* */
|
1062 | 1062 | /* This approach has the advantage that the angle between */
|
1063 | 1063 | /* `in' and `out' is not checked. In case one of the two */
|
1064 | - /* vectors is `dominant', this is, much larger than the */
|
|
1064 | + /* vectors is `dominant', that is, much larger than the */
|
|
1065 | 1065 | /* other vector, we thus always have a flat corner. */
|
1066 | 1066 | /* */
|
1067 | 1067 | /* hypotenuse */
|
... | ... | @@ -206,7 +206,7 @@ |
206 | 206 | * The number of bytes to read from the stream.
|
207 | 207 | *
|
208 | 208 | * @Return:
|
209 | - * The number of bytes actually read. If `count' is zero (this is,
|
|
209 | + * The number of bytes actually read. If `count' is zero (that is,
|
|
210 | 210 | * the function is used for seeking), a non-zero return value
|
211 | 211 | * indicates an error.
|
212 | 212 | */
|
... | ... | @@ -239,10 +239,6 @@ FT_BEGIN_HEADER |
239 | 239 | FT_LOCAL( void )
|
240 | 240 | bdf_free_font( bdf_font_t* font );
|
241 | 241 | |
242 | - FT_LOCAL( bdf_property_t * )
|
|
243 | - bdf_get_property( char* name,
|
|
244 | - bdf_font_t* font );
|
|
245 | - |
|
246 | 242 | FT_LOCAL( bdf_property_t * )
|
247 | 243 | bdf_get_font_property( bdf_font_t* font,
|
248 | 244 | const char* name );
|
... | ... | @@ -378,7 +378,7 @@ |
378 | 378 | *alen = 0;
|
379 | 379 | |
380 | 380 | if ( list == NULL || list->used == 0 )
|
381 | - return 0;
|
|
381 | + return NULL;
|
|
382 | 382 | |
383 | 383 | dp = list->field[0];
|
384 | 384 | for ( i = j = 0; i < list->used; i++ )
|
... | ... | @@ -887,18 +887,18 @@ |
887 | 887 | }
|
888 | 888 | |
889 | 889 | |
890 | - FT_LOCAL_DEF( bdf_property_t* )
|
|
891 | - bdf_get_property( char* name,
|
|
890 | + static bdf_property_t*
|
|
891 | + bdf_get_property( const char* name,
|
|
892 | 892 | bdf_font_t* font )
|
893 | 893 | {
|
894 | 894 | size_t* propid;
|
895 | 895 | |
896 | 896 | |
897 | 897 | if ( name == NULL || *name == 0 )
|
898 | - return 0;
|
|
898 | + return NULL;
|
|
899 | 899 | |
900 | 900 | if ( ( propid = ft_hash_str_lookup( name, &(font->proptbl) ) ) == NULL )
|
901 | - return 0;
|
|
901 | + return NULL;
|
|
902 | 902 | |
903 | 903 | if ( *propid >= num_bdf_properties_ )
|
904 | 904 | return font->user_props + ( *propid - num_bdf_properties_ );
|
... | ... | @@ -944,7 +944,7 @@ |
944 | 944 | |
945 | 945 | static FT_Error
|
946 | 946 | bdf_add_comment_( bdf_font_t* font,
|
947 | - char* comment,
|
|
947 | + const char* comment,
|
|
948 | 948 | unsigned long len )
|
949 | 949 | {
|
950 | 950 | char* cp;
|
... | ... | @@ -1053,27 +1053,24 @@ |
1053 | 1053 | bdf_property_t* p;
|
1054 | 1054 | |
1055 | 1055 | |
1056 | - *name = sp = ep = line;
|
|
1056 | + sp = ep = line;
|
|
1057 | 1057 | |
1058 | 1058 | while ( *ep && *ep != ' ' && *ep != '\t' )
|
1059 | 1059 | ep++;
|
1060 | 1060 | |
1061 | - hold = -1;
|
|
1062 | - if ( *ep )
|
|
1063 | - {
|
|
1064 | - hold = *ep;
|
|
1065 | - *ep = 0;
|
|
1066 | - }
|
|
1061 | + hold = *ep;
|
|
1062 | + *ep = '\0';
|
|
1067 | 1063 | |
1068 | 1064 | p = bdf_get_property( sp, font );
|
1069 | 1065 | |
1070 | - /* Restore the character that was saved before any return can happen. */
|
|
1071 | - if ( hold != -1 )
|
|
1072 | - *ep = (char)hold;
|
|
1073 | - |
|
1074 | 1066 | /* If the property exists and is not an atom, just return here. */
|
1075 | 1067 | if ( p && p->format != BDF_ATOM )
|
1068 | + {
|
|
1069 | + *ep = (char)hold; /* Undo NUL-termination. */
|
|
1076 | 1070 | return 0;
|
1071 | + }
|
|
1072 | + |
|
1073 | + *name = sp;
|
|
1077 | 1074 | |
1078 | 1075 | /* The property is an atom. Trim all leading and trailing whitespace */
|
1079 | 1076 | /* and double quotes for the atom value. */
|
... | ... | @@ -1081,25 +1078,26 @@ |
1081 | 1078 | ep = line + linelen;
|
1082 | 1079 | |
1083 | 1080 | /* Trim the leading whitespace if it exists. */
|
1084 | - if ( *sp )
|
|
1085 | - *sp++ = 0;
|
|
1086 | - while ( *sp &&
|
|
1087 | - ( *sp == ' ' || *sp == '\t' ) )
|
|
1088 | - sp++;
|
|
1081 | + if ( sp < ep )
|
|
1082 | + do
|
|
1083 | + sp++;
|
|
1084 | + while ( *sp == ' ' || *sp == '\t' );
|
|
1089 | 1085 | |
1090 | 1086 | /* Trim the leading double quote if it exists. */
|
1091 | 1087 | if ( *sp == '"' )
|
1092 | 1088 | sp++;
|
1089 | + |
|
1093 | 1090 | *value = sp;
|
1094 | 1091 | |
1095 | 1092 | /* Trim the trailing whitespace if it exists. */
|
1096 | - while ( ep > sp &&
|
|
1097 | - ( *( ep - 1 ) == ' ' || *( ep - 1 ) == '\t' ) )
|
|
1098 | - *--ep = 0;
|
|
1093 | + if ( sp < ep )
|
|
1094 | + do
|
|
1095 | + *ep-- = '\0';
|
|
1096 | + while ( *ep == ' ' || *ep == '\t' );
|
|
1099 | 1097 | |
1100 | 1098 | /* Trim the trailing double quote if it exists. */
|
1101 | - if ( ep > sp && *( ep - 1 ) == '"' )
|
|
1102 | - *--ep = 0;
|
|
1099 | + if ( *ep == '"' )
|
|
1100 | + *ep = '\0';
|
|
1103 | 1101 | |
1104 | 1102 | return 1;
|
1105 | 1103 | }
|
... | ... | @@ -471,6 +471,12 @@ |
471 | 471 | FT_Error error = FT_Err_Ok;
|
472 | 472 | |
473 | 473 | |
474 | + if ( face->is_cff2 )
|
|
475 | + {
|
|
476 | + error = FT_THROW( Invalid_Argument );
|
|
477 | + goto Fail;
|
|
478 | + }
|
|
479 | + |
|
474 | 480 | if ( cff && !cff->font_info )
|
475 | 481 | {
|
476 | 482 | CFF_FontRecDict dict = &cff->top_font.font_dict;
|
... | ... | @@ -628,7 +634,7 @@ |
628 | 634 | return service->get_ps_font_name( FT_FACE( face ) );
|
629 | 635 | }
|
630 | 636 | |
631 | - return (const char*)cff->font_name;
|
|
637 | + return cff ? (const char*)cff->font_name : NULL;
|
|
632 | 638 | }
|
633 | 639 | |
634 | 640 |
... | ... | @@ -400,7 +400,7 @@ |
400 | 400 | |
401 | 401 | /* Allocate a table containing pointers to an index's elements. */
|
402 | 402 | /* The `pool' argument makes this function convert the index */
|
403 | - /* entries to C-style strings (this is, null-terminated). */
|
|
403 | + /* entries to C-style strings (that is, null-terminated). */
|
|
404 | 404 | static FT_Error
|
405 | 405 | cff_index_get_pointers( CFF_Index idx,
|
406 | 406 | FT_Byte*** table,
|
... | ... | @@ -1612,7 +1612,7 @@ |
1612 | 1612 | FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
|
1613 | 1613 | |
1614 | 1614 | |
1615 | - if (mm)
|
|
1615 | + if ( mm )
|
|
1616 | 1616 | mm->done_blend( FT_FACE( face ) );
|
1617 | 1617 | }
|
1618 | 1618 |
... | ... | @@ -622,7 +622,7 @@ |
622 | 622 | |
623 | 623 | dict->has_font_matrix = TRUE;
|
624 | 624 | |
625 | - /* We expect a well-formed font matrix, this is, the matrix elements */
|
|
625 | + /* We expect a well-formed font matrix, that is, the matrix elements */
|
|
626 | 626 | /* `xx' and `yy' are of approximately the same magnitude. To avoid */
|
627 | 627 | /* loss of precision, we use the magnitude of the largest matrix */
|
628 | 628 | /* element to scale all other elements. The scaling factor is then */
|
... | ... | @@ -117,11 +117,44 @@ |
117 | 117 | off2 = cid_get_offset( &p, cid->gd_bytes );
|
118 | 118 | FT_FRAME_EXIT();
|
119 | 119 | |
120 | - if ( fd_select >= cid->num_dicts ||
|
|
121 | - off2 > stream->size ||
|
|
122 | - off1 > off2 )
|
|
120 | +
|
|
121 | + if ( fd_select >= cid->num_dicts )
|
|
123 | 122 | {
|
124 | - FT_TRACE0(( "cid_load_glyph: invalid glyph stream offsets\n" ));
|
|
123 | + /*
|
|
124 | + * fd_select == 0xFF is often used to indicate that the CID
|
|
125 | + * has no charstring to be rendered, similar to GID = 0xFFFF
|
|
126 | + * in TrueType fonts.
|
|
127 | + */
|
|
128 | + if ( (cid->fd_bytes == 1 && fd_select == 0xFFU ) ||
|
|
129 | + (cid->fd_bytes == 2 && fd_select == 0xFFFFU ) )
|
|
130 | + {
|
|
131 | + FT_TRACE1(( "cid_load_glyph: fail for glyph_index=%d, "
|
|
132 | + "FD number %ld is the max integer fitting into %d byte%s\n",
|
|
133 | + glyph_index, fd_select, cid->fd_bytes,
|
|
134 | + cid->fd_bytes == 1 ? "" : "s" ));
|
|
135 | + }
|
|
136 | + else
|
|
137 | + {
|
|
138 | + FT_TRACE0(( "cid_load_glyph: fail for glyph_index=%d, "
|
|
139 | + "FD number %ld > number of dicts %d\n",
|
|
140 | + glyph_index, fd_select, cid->num_dicts ));
|
|
141 | + }
|
|
142 | + error = FT_THROW( Invalid_Offset );
|
|
143 | + goto Exit;
|
|
144 | + }
|
|
145 | + else if ( off2 > stream->size )
|
|
146 | + {
|
|
147 | + FT_TRACE0(( "cid_load_glyph: fail for glyph_index=%d, "
|
|
148 | + "end of the glyph data is beyond the data stream\n",
|
|
149 | + glyph_index ));
|
|
150 | + error = FT_THROW( Invalid_Offset );
|
|
151 | + goto Exit;
|
|
152 | + }
|
|
153 | + else if ( off1 > off2 )
|
|
154 | + {
|
|
155 | + FT_TRACE0(( "cid_load_glyph: fail for glyph_index=%d, "
|
|
156 | + "the end position of glyph data is set before the start position\n",
|
|
157 | + glyph_index ));
|
|
125 | 158 | error = FT_THROW( Invalid_Offset );
|
126 | 159 | goto Exit;
|
127 | 160 | }
|
... | ... | @@ -161,7 +194,9 @@ |
161 | 194 | cs_offset = decoder->lenIV >= 0 ? (FT_UInt)decoder->lenIV : 0;
|
162 | 195 | if ( cs_offset > glyph_length )
|
163 | 196 | {
|
164 | - FT_TRACE0(( "cid_load_glyph: invalid glyph stream offsets\n" ));
|
|
197 | + FT_TRACE0(( "cid_load_glyph: fail for glyph_index=%d, "
|
|
198 | + "offset to the charstring is beyond glyph length\n",
|
|
199 | + glyph_index ));
|
|
165 | 200 | error = FT_THROW( Invalid_Offset );
|
166 | 201 | goto Exit;
|
167 | 202 | }
|
... | ... | @@ -516,7 +516,7 @@ |
516 | 516 | if ( !psh_hint_is_fitted( parent ) )
|
517 | 517 | psh_hint_align( parent, globals, dimension, glyph );
|
518 | 518 | |
519 | - /* keep original relation between hints, this is, use the */
|
|
519 | + /* keep original relation between hints, that is, use the */
|
|
520 | 520 | /* scaled distance between the centers of the hints to */
|
521 | 521 | /* compute the new position */
|
522 | 522 | par_org_center = parent->org_pos + ( parent->org_len >> 1 );
|
... | ... | @@ -2371,7 +2371,7 @@ |
2371 | 2371 | * ```
|
2372 | 2372 | *
|
2373 | 2373 | * (6) Our task is to find a value of `t` such that the above equation
|
2374 | - * `Q(t)` becomes zero, this is, the point-to-curve vector makes
|
|
2374 | + * `Q(t)` becomes zero, that is, the point-to-curve vector makes
|
|
2375 | 2375 | * 90~degrees with the curve. We solve this with the Newton-Raphson
|
2376 | 2376 | * method.
|
2377 | 2377 | *
|
... | ... | @@ -2684,7 +2684,7 @@ |
2684 | 2684 | * ```
|
2685 | 2685 | *
|
2686 | 2686 | * (6) Our task is to find a value of `t` such that the above equation
|
2687 | - * `Q(t)` becomes zero, this is, the point-to-curve vector makes
|
|
2687 | + * `Q(t)` becomes zero, that is, the point-to-curve vector makes
|
|
2688 | 2688 | * 90~degree with curve. We solve this with the Newton-Raphson
|
2689 | 2689 | * method.
|
2690 | 2690 | *
|
... | ... | @@ -406,10 +406,7 @@ |
406 | 406 | |
407 | 407 | switch ( color_type )
|
408 | 408 | {
|
409 | - default:
|
|
410 | - /* Shouldn't happen, but ... */
|
|
411 | - FALL_THROUGH;
|
|
412 | - |
|
409 | + default: /* Shouldn't happen, but ... */
|
|
413 | 410 | case PNG_COLOR_TYPE_RGB_ALPHA:
|
414 | 411 | png_set_read_user_transform_fn( png, premultiply_data );
|
415 | 412 | break;
|
... | ... | @@ -523,15 +523,14 @@ |
523 | 523 | FT_TRACE0(( "get_win_string:"
|
524 | 524 | " Character 0x%X invalid in PS name string\n",
|
525 | 525 | ((unsigned)p[0])*256 + (unsigned)p[1] ));
|
526 | - break;
|
|
526 | + continue;
|
|
527 | 527 | }
|
528 | 528 | }
|
529 | - if ( !len )
|
|
530 | - *r = '\0';
|
|
529 | + *r = '\0';
|
|
531 | 530 | |
532 | 531 | FT_FRAME_EXIT();
|
533 | 532 | |
534 | - if ( !len )
|
|
533 | + if ( r != result )
|
|
535 | 534 | return result;
|
536 | 535 | |
537 | 536 | get_win_string_error:
|
... | ... | @@ -580,15 +579,14 @@ |
580 | 579 | FT_TRACE0(( "get_apple_string:"
|
581 | 580 | " Character `%c' (0x%X) invalid in PS name string\n",
|
582 | 581 | *p, *p ));
|
583 | - break;
|
|
582 | + continue;
|
|
584 | 583 | }
|
585 | 584 | }
|
586 | - if ( !len )
|
|
587 | - *r = '\0';
|
|
585 | + *r = '\0';
|
|
588 | 586 | |
589 | 587 | FT_FRAME_EXIT();
|
590 | 588 | |
591 | - if ( !len )
|
|
589 | + if ( r != result )
|
|
592 | 590 | return result;
|
593 | 591 | |
594 | 592 | get_apple_string_error:
|
... | ... | @@ -819,9 +817,9 @@ |
819 | 817 | |
820 | 818 | if ( !found )
|
821 | 819 | {
|
822 | - /* as a last resort we try the family name; note that this is */
|
|
823 | - /* not in the Adobe TechNote, but GX fonts (which predate the */
|
|
824 | - /* TechNote) benefit from this behaviour */
|
|
820 | + /* according to the 'name' documentation in the OpenType */
|
|
821 | + /* specification the font family name is to be used if the */
|
|
822 | + /* typographic family name is missing, so let's do that */
|
|
825 | 823 | found = sfnt_get_name_id( face,
|
826 | 824 | TT_NAME_ID_FONT_FAMILY,
|
827 | 825 | &win,
|
... | ... | @@ -853,6 +851,10 @@ |
853 | 851 | {
|
854 | 852 | FT_TRACE0(( "sfnt_get_var_ps_name:"
|
855 | 853 | " No valid PS name prefix for font instances found\n" ));
|
854 | + /* XXX It probably makes sense to never let this fail */
|
|
855 | + /* since an arbitrary prefix should work, too. */
|
|
856 | + /* On the other hand, it is very unlikely that */
|
|
857 | + /* we ever reach this code at all. */
|
|
856 | 858 | return NULL;
|
857 | 859 | }
|
858 | 860 |
... | ... | @@ -504,6 +504,13 @@ |
504 | 504 | |
505 | 505 | FT_FRAME_EXIT();
|
506 | 506 | |
507 | + if ( !valid_entries )
|
|
508 | + {
|
|
509 | + FT_TRACE2(( "tt_face_load_font_dir: no valid tables found\n" ));
|
|
510 | + error = FT_THROW( Unknown_File_Format );
|
|
511 | + goto Exit;
|
|
512 | + }
|
|
513 | + |
|
507 | 514 | FT_TRACE2(( "table directory loaded\n" ));
|
508 | 515 | FT_TRACE2(( "\n" ));
|
509 | 516 |
... | ... | @@ -45,6 +45,7 @@ |
45 | 45 | #include <freetype/internal/ftcalc.h>
|
46 | 46 | #include <freetype/internal/ftstream.h>
|
47 | 47 | #include <freetype/internal/sfnt.h>
|
48 | +#include <freetype/internal/services/svmetric.h>
|
|
48 | 49 | #include <freetype/tttags.h>
|
49 | 50 | #include <freetype/ttnameid.h>
|
50 | 51 | #include <freetype/ftmm.h>
|
... | ... | @@ -2543,7 +2544,7 @@ |
2543 | 2544 | goto Exit;
|
2544 | 2545 | }
|
2545 | 2546 | |
2546 | - FT_TRACE5(( "%d instance%s\n",
|
|
2547 | + FT_TRACE5(( "%d named instance%s\n",
|
|
2547 | 2548 | fvar_head.instanceCount,
|
2548 | 2549 | fvar_head.instanceCount == 1 ? "" : "s" ));
|
2549 | 2550 | |
... | ... | @@ -2601,7 +2602,7 @@ |
2601 | 2602 | |
2602 | 2603 | (void)FT_STREAM_SEEK( pos );
|
2603 | 2604 | |
2604 | - FT_TRACE5(( " instance %d (%s%s%s, %s%s%s)\n",
|
|
2605 | + FT_TRACE5(( " named instance %d (%s%s%s, %s%s%s)\n",
|
|
2605 | 2606 | i,
|
2606 | 2607 | strname ? "name: `" : "",
|
2607 | 2608 | strname ? strname : "unnamed",
|
... | ... | @@ -2844,26 +2845,29 @@ |
2844 | 2845 | }
|
2845 | 2846 | }
|
2846 | 2847 | |
2847 | - if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
|
|
2848 | + if ( !have_diff )
|
|
2848 | 2849 | {
|
2849 | - FT_UInt instance_index = (FT_UInt)face->root.face_index >> 16;
|
|
2850 | + if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
|
|
2851 | + {
|
|
2852 | + FT_UInt instance_index = (FT_UInt)face->root.face_index >> 16;
|
|
2850 | 2853 | |
2851 | 2854 | |
2852 | - c = blend->normalizedcoords + i;
|
|
2853 | - n = blend->normalized_stylecoords +
|
|
2854 | - ( instance_index - 1 ) * mmvar->num_axis +
|
|
2855 | - i;
|
|
2855 | + c = blend->normalizedcoords + i;
|
|
2856 | + n = blend->normalized_stylecoords +
|
|
2857 | + ( instance_index - 1 ) * mmvar->num_axis +
|
|
2858 | + i;
|
|
2856 | 2859 | |
2857 | - for ( j = i; j < mmvar->num_axis; j++, n++, c++ )
|
|
2858 | - if ( *c != *n )
|
|
2859 | - have_diff = 1;
|
|
2860 | - }
|
|
2861 | - else
|
|
2862 | - {
|
|
2863 | - c = blend->normalizedcoords + i;
|
|
2864 | - for ( j = i; j < mmvar->num_axis; j++, c++ )
|
|
2865 | - if ( *c != 0 )
|
|
2866 | - have_diff = 1;
|
|
2860 | + for ( j = i; j < mmvar->num_axis; j++, n++, c++ )
|
|
2861 | + if ( *c != *n )
|
|
2862 | + have_diff = 1;
|
|
2863 | + }
|
|
2864 | + else
|
|
2865 | + {
|
|
2866 | + c = blend->normalizedcoords + i;
|
|
2867 | + for ( j = i; j < mmvar->num_axis; j++, c++ )
|
|
2868 | + if ( *c != 0 )
|
|
2869 | + have_diff = 1;
|
|
2870 | + }
|
|
2867 | 2871 | }
|
2868 | 2872 | |
2869 | 2873 | /* return value -1 indicates `no change' */
|
... | ... | @@ -2961,7 +2965,8 @@ |
2961 | 2965 | * An array of `num_coords', each between [-1,1].
|
2962 | 2966 | *
|
2963 | 2967 | * @Return:
|
2964 | - * FreeType error code. 0 means success.
|
|
2968 | + * FreeType error code. 0 means success, -1 means success and unchanged
|
|
2969 | + * axis values.
|
|
2965 | 2970 | */
|
2966 | 2971 | FT_LOCAL_DEF( FT_Error )
|
2967 | 2972 | TT_Set_MM_Blend( TT_Face face,
|
... | ... | @@ -3008,7 +3013,8 @@ |
3008 | 3013 | * An array of `num_coords', each between [-1,1].
|
3009 | 3014 | *
|
3010 | 3015 | * @Return:
|
3011 | - * FreeType error code. 0 means success.
|
|
3016 | + * FreeType error code. 0 means success, -1 means success and unchanged
|
|
3017 | + * axis values.
|
|
3012 | 3018 | */
|
3013 | 3019 | FT_LOCAL_DEF( FT_Error )
|
3014 | 3020 | TT_Get_MM_Blend( TT_Face face,
|
... | ... | @@ -7837,7 +7837,7 @@ |
7837 | 7837 | /* a variable number of arguments */
|
7838 | 7838 | |
7839 | 7839 | /* it is the job of the application to `activate' GX handling, */
|
7840 | - /* this is, calling any of the GX API functions on the current */
|
|
7840 | + /* that is, calling any of the GX API functions on the current */
|
|
7841 | 7841 | /* font to select a variation instance */
|
7842 | 7842 | if ( exc->face->blend )
|
7843 | 7843 | exc->new_top = exc->args + exc->face->blend->num_axis;
|
... | ... | @@ -8397,7 +8397,7 @@ |
8397 | 8397 | #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
8398 | 8398 | case 0x91:
|
8399 | 8399 | /* it is the job of the application to `activate' GX handling, */
|
8400 | - /* this is, calling any of the GX API functions on the current */
|
|
8400 | + /* that is, calling any of the GX API functions on the current */
|
|
8401 | 8401 | /* font to select a variation instance */
|
8402 | 8402 | if ( exc->face->blend )
|
8403 | 8403 | Ins_GETVARIATION( exc, args );
|