OLD | NEW |
1 /***************************************************************************/ | 1 /***************************************************************************/ |
2 /* */ | 2 /* */ |
3 /* ftautoh.h */ | 3 /* ftautoh.h */ |
4 /* */ | 4 /* */ |
5 /* FreeType API for controlling the auto-hinter (specification only). */ | 5 /* FreeType API for controlling the auto-hinter (specification only). */ |
6 /* */ | 6 /* */ |
7 /* Copyright 2012, 2013 by */ | 7 /* Copyright 2012-2015 by */ |
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
9 /* */ | 9 /* */ |
10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
15 /* */ | 15 /* */ |
16 /***************************************************************************/ | 16 /***************************************************************************/ |
17 | 17 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 * FT_Prop_GlyphToScriptMap | 240 * FT_Prop_GlyphToScriptMap |
241 * | 241 * |
242 * @description: | 242 * @description: |
243 * *Experimental* *only* | 243 * *Experimental* *only* |
244 * | 244 * |
245 * The data exchange structure for the @glyph-to-script-map property. | 245 * The data exchange structure for the @glyph-to-script-map property. |
246 * | 246 * |
247 */ | 247 */ |
248 typedef struct FT_Prop_GlyphToScriptMap_ | 248 typedef struct FT_Prop_GlyphToScriptMap_ |
249 { | 249 { |
250 FT_Face face; | 250 FT_Face face; |
251 FT_Byte* map; | 251 FT_UShort* map; |
252 | 252 |
253 } FT_Prop_GlyphToScriptMap; | 253 } FT_Prop_GlyphToScriptMap; |
254 | 254 |
255 | 255 |
256 /************************************************************************** | 256 /************************************************************************** |
257 * | 257 * |
258 * @property: | 258 * @property: |
259 * fallback-script | 259 * fallback-script |
260 * | 260 * |
261 * @description: | 261 * @description: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 | 294 |
295 /************************************************************************** | 295 /************************************************************************** |
296 * | 296 * |
297 * @property: | 297 * @property: |
298 * default-script | 298 * default-script |
299 * | 299 * |
300 * @description: | 300 * @description: |
301 * *Experimental* *only* | 301 * *Experimental* *only* |
302 * | 302 * |
303 * If Freetype gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make | 303 * If FreeType gets compiled with FT_CONFIG_OPTION_USE_HARFBUZZ to make |
304 * the HarfBuzz library access OpenType features for getting better | 304 * the HarfBuzz library access OpenType features for getting better |
305 * glyph coverages, this property sets the (auto-fitter) script to be | 305 * glyph coverages, this property sets the (auto-fitter) script to be |
306 * used for the default (OpenType) script data of a font's GSUB table. | 306 * used for the default (OpenType) script data of a font's GSUB table. |
307 * Features for the default script are intended for all scripts not | 307 * Features for the default script are intended for all scripts not |
308 * explicitly handled in GSUB; an example is a `dlig' feature, | 308 * explicitly handled in GSUB; an example is a `dlig' feature, |
309 * containing the combination of the characters `T', `E', and `L' to | 309 * containing the combination of the characters `T', `E', and `L' to |
310 * form a `TEL' ligature. | 310 * form a `TEL' ligature. |
311 * | 311 * |
312 * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the | 312 * By default, this is @FT_AUTOHINTER_SCRIPT_LATIN. Using the |
313 * `default-script' property, this default value can be changed. | 313 * `default-script' property, this default value can be changed. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 * The data exchange structure for the @increase-x-height property. | 384 * The data exchange structure for the @increase-x-height property. |
385 * | 385 * |
386 */ | 386 */ |
387 typedef struct FT_Prop_IncreaseXHeight_ | 387 typedef struct FT_Prop_IncreaseXHeight_ |
388 { | 388 { |
389 FT_Face face; | 389 FT_Face face; |
390 FT_UInt limit; | 390 FT_UInt limit; |
391 | 391 |
392 } FT_Prop_IncreaseXHeight; | 392 } FT_Prop_IncreaseXHeight; |
393 | 393 |
| 394 |
| 395 /************************************************************************** |
| 396 * |
| 397 * @property: |
| 398 * warping |
| 399 * |
| 400 * @description: |
| 401 * *Experimental* *only* |
| 402 * |
| 403 * If FreeType gets compiled with option AF_CONFIG_OPTION_USE_WARPER to |
| 404 * activate the warp hinting code in the auto-hinter, this property |
| 405 * switches warping on and off. |
| 406 * |
| 407 * Warping only works in `light' auto-hinting mode. The idea of the |
| 408 * code is to slightly scale and shift a glyph along the non-hinted |
| 409 * dimension (which is usually the horizontal axis) so that as much of |
| 410 * its segments are aligned (more or less) to the grid. To find out a |
| 411 * glyph's optimal scaling and shifting value, various parameter |
| 412 * combinations are tried and scored. |
| 413 * |
| 414 * By default, warping is off. The example below shows how to switch on |
| 415 * warping (omitting the error handling). |
| 416 * |
| 417 * { |
| 418 * FT_Library library; |
| 419 * FT_Bool warping = 1; |
| 420 * |
| 421 * |
| 422 * FT_Init_FreeType( &library ); |
| 423 * |
| 424 * FT_Property_Set( library, "autofitter", |
| 425 * "warping", &warping ); |
| 426 * } |
| 427 * |
| 428 * @note: |
| 429 * This property can be used with @FT_Property_Get also. |
| 430 * |
| 431 * The warping code can also change advance widths. Have a look at the |
| 432 * `lsb_delta' and `rsb_delta' fields in the @FT_GlyphSlotRec structure |
| 433 * for details on improving inter-glyph distances while rendering. |
| 434 * |
| 435 * Since warping is a global property of the auto-hinter it is best to |
| 436 * change its value before rendering any face. Otherwise, you should |
| 437 * reload all faces that get auto-hinted in `light' hinting mode. |
| 438 * |
| 439 */ |
| 440 |
| 441 |
394 /* */ | 442 /* */ |
395 | 443 |
396 | 444 |
397 FT_END_HEADER | 445 FT_END_HEADER |
398 | 446 |
399 #endif /* __FTAUTOH_H__ */ | 447 #endif /* __FTAUTOH_H__ */ |
400 | 448 |
401 | 449 |
402 /* END */ | 450 /* END */ |
OLD | NEW |