Formatting, documentation improvements.
This commit is contained in:
parent
e6bb95336a
commit
083ba0b7bc
31
ChangeLog
31
ChangeLog
|
@ -1,27 +1,28 @@
|
||||||
2005-12-23 David Turner <david@freetype.org>
|
2005-12-23 David Turner <david@freetype.org>
|
||||||
|
|
||||||
* Jamfile, docs/reference/README: fix it so that "jam refdoc" works
|
* Jamfile (RefDoc), docs/reference/README: Fix it so that `jam
|
||||||
correctly to generate the API reference in 'docs/reference'
|
refdoc' works correctly to generate the API reference in
|
||||||
|
`docs/reference'.
|
||||||
|
|
||||||
* src/tools/docmaker/tohtml.py: update to output nicer fields lists
|
* src/tools/docmaker/tohtml.py (print_html_field,
|
||||||
in the API reference
|
print_html_field_list): Update to output nicer fields lists in the
|
||||||
|
API reference.
|
||||||
|
|
||||||
* src/base/ftobjs.c (FT_Load_Glyph): FT_LOAD_TARGET_LIGHT now
|
* src/base/ftobjs.c (FT_Load_Glyph): FT_LOAD_TARGET_LIGHT now
|
||||||
forces auto-hinting
|
forces auto-hinting.
|
||||||
|
|
||||||
* freetype/freetype.h: updating the documentation for
|
|
||||||
FT_LOAD_TARGET_XXX and FT_Render_Mode values
|
|
||||||
|
|
||||||
|
* freetype/freetype.h: Updating the documentation for
|
||||||
|
FT_LOAD_TARGET_XXX and FT_Render_Mode values.
|
||||||
|
|
||||||
2005-12-23 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
2005-12-23 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
|
||||||
|
|
||||||
* src/base/ftmac.c (FT_New_Face_From_Suitcase): Counts scalable
|
* src/base/ftmac.c (FT_New_Face_From_Suitcase): Count scalable faces
|
||||||
faces in supported formats (sfnt, LWFN) only, and ignore bitmap
|
in supported formats (sfnt, LWFN) only, and ignore bitmap faces in
|
||||||
faces in unsupported formats (fbit, NFNT). The number of available
|
unsupported formats (fbit, NFNT). The number of available faces are
|
||||||
faces are passed via face->num_faces. When bitmap faces are embedded
|
passed via face->num_faces. If bitmap faces are embedded in sfnt
|
||||||
in sfnt resource, face->num_fixed_size is correctly set. In public
|
resource, face->num_fixed_size is correctly set. In public API,
|
||||||
API, FT_New_Face() and FT_New_Face_From_FSSpec() count the faces
|
FT_New_Face() and FT_New_Face_From_FSSpec() count the faces as
|
||||||
as FT_GetFile_From_Mac_Name(), which ignores NFNT resources.
|
FT_GetFile_From_Mac_Name(), which ignores NFNT resources.
|
||||||
|
|
||||||
* doc/CHANGES: Mention the changes.
|
* doc/CHANGES: Mention the changes.
|
||||||
|
|
||||||
|
|
38
docs/CHANGES
38
docs/CHANGES
|
@ -6,7 +6,7 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
|
||||||
|
|
||||||
- The FT_HAS_KERNING macro always returned 0.
|
- The FT_HAS_KERNING macro always returned 0.
|
||||||
|
|
||||||
- CFF OpenType fonts didn't return correct vertical metrics for
|
- CFF OpenType fonts didn't return correct vertical metrics for
|
||||||
glyphs with outlines.
|
glyphs with outlines.
|
||||||
|
|
||||||
- If FreeType was compiled without hinters, all font formats based
|
- If FreeType was compiled without hinters, all font formats based
|
||||||
|
@ -14,12 +14,12 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
|
||||||
|
|
||||||
II. IMPORTANT CHANGES
|
II. IMPORTANT CHANGES
|
||||||
|
|
||||||
- the LIGHT hinting algorithm produces more pleasant results. Also,
|
- The LIGHT hinting algorithm produces more pleasant results.
|
||||||
using the FT_LOAD_TARGET_LIGHT flags within FT_Load_Glyph will always
|
Also, using the FT_LOAD_TARGET_LIGHT flags within FT_Load_Glyph
|
||||||
force auto-hinting, as a special exception.
|
always forces auto-hinting, as a special exception.
|
||||||
|
|
||||||
- Face metrics (face->size->metrics) and glyph metrics are no
|
- Face metrics (face->size->metrics) and glyph metrics are no
|
||||||
longer rounded. If you do not round in your applications too,
|
longer rounded. If you do not round in your applications too,
|
||||||
you may find glyphs become blurry.
|
you may find glyphs become blurry.
|
||||||
|
|
||||||
- A new API `FT_TrueTypeGX_Validate' (in FT_GX_VALIDATE_H) has
|
- A new API `FT_TrueTypeGX_Validate' (in FT_GX_VALIDATE_H) has
|
||||||
|
@ -29,7 +29,7 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
|
||||||
accessing them. This code has been contributed by Masatake
|
accessing them. This code has been contributed by Masatake
|
||||||
Yamato and Toshiya Suzuki.
|
Yamato and Toshiya Suzuki.
|
||||||
|
|
||||||
- The following callback function types have changed slightly (by
|
- The following callback function types have changed slightly (by
|
||||||
adding the `const' keyword where appropriate):
|
adding the `const' keyword where appropriate):
|
||||||
|
|
||||||
FT_Outline_MoveToFunc
|
FT_Outline_MoveToFunc
|
||||||
|
@ -47,15 +47,15 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
|
||||||
|
|
||||||
III. MISCELLANEOUS
|
III. MISCELLANEOUS
|
||||||
|
|
||||||
- the documentation for FT_LOAD_TARGET_XXX and FT_RENDER_MODE_XXX
|
- The documentation for FT_LOAD_TARGET_XXX and FT_RENDER_MODE_XXX
|
||||||
values have been updated to better reflect their uses and differences
|
values now better reflects its usage and differences: One set is
|
||||||
(one set is used to specify hinting algorithm, the other to specify
|
used to specify the hinting algorithm, the other to specify pthe
|
||||||
pixel rendering mode).
|
ixel rendering mode.
|
||||||
|
|
||||||
- FT_New_Face() & FT_New_Face_From_FSSpec() in ftmac.c are changed
|
- FT_New_Face() and FT_New_Face_From_FSSpec() in ftmac.c are
|
||||||
to count supported scalable faces (sfnt, LWFN) only, and returns
|
changed to count supported scalable faces (sfnt, LWFN) only, and
|
||||||
the number of available faces via face->num_faces. Unsupported
|
returns the number of available faces via face->num_faces.
|
||||||
bitmap faces (fbit, NFNT) are ignored.
|
Unsupported bitmap faces (fbit, NFNT) are ignored.
|
||||||
|
|
||||||
- SFNT cmap handling has been improved, mainly to run faster.
|
- SFNT cmap handling has been improved, mainly to run faster.
|
||||||
|
|
||||||
|
@ -70,8 +70,8 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
|
||||||
for better readability.
|
for better readability.
|
||||||
|
|
||||||
- FreeType now honours bit 1 in the `head' table of TrueType fonts
|
- FreeType now honours bit 1 in the `head' table of TrueType fonts
|
||||||
(meaning `left sidebearing point at x=0'). This helps with
|
(meaning `left sidebearing point at x=0'). This helps with some
|
||||||
some buggy fonts.
|
buggy fonts.
|
||||||
|
|
||||||
- Rudimentary support for Adobe's new `SING Glyphlet' format. See
|
- Rudimentary support for Adobe's new `SING Glyphlet' format. See
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
|
||||||
|
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
- The `ftdump' program from the `ft2demos' bundle now shows some
|
- The `ftdump' program from the `ft2demos' bundle now shows some
|
||||||
information about charmaps. It also supports a new switch `-v'
|
information about charmaps. It also supports a new switch `-v'
|
||||||
to increase verbosity.
|
to increase verbosity.
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
After saying `make refdoc' this directory contains the FreeType API
|
After saying `make refdoc' this directory contains the FreeType API
|
||||||
reference. You need python to make this target.
|
reference. You need python to make this target.
|
||||||
|
|
||||||
This also works with Jam, just type 'jam refdoc' in the main directory.
|
This also works with Jam: Just type `jam refdoc' in the main directory.
|
||||||
|
|
||||||
|
|
|
@ -2248,141 +2248,144 @@ FT_BEGIN_HEADER
|
||||||
FT_Int32 load_flags );
|
FT_Int32 load_flags );
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/*************************************************************************
|
||||||
*
|
*
|
||||||
* @enum:
|
* @enum:
|
||||||
* FT_LOAD_XXX
|
* FT_LOAD_XXX
|
||||||
*
|
*
|
||||||
* @description:
|
* @description:
|
||||||
* A list of bit-field constants, used with @FT_Load_Glyph to indicate
|
* A list of bit-field constants used with @FT_Load_Glyph to indicate
|
||||||
* what kind of operations to perform during glyph loading.
|
* what kind of operations to perform during glyph loading.
|
||||||
*
|
*
|
||||||
* @values:
|
* @values:
|
||||||
* FT_LOAD_DEFAULT ::
|
* FT_LOAD_DEFAULT ::
|
||||||
* Corresponding to 0, this value is used a default glyph load. In this
|
* Corresponding to 0, this value is used as the default glyph load
|
||||||
* case, the following happens:
|
* operation. In this case, the following happens:
|
||||||
*
|
*
|
||||||
* 1. FreeType looks for a bitmap for the glyph corresponding to the
|
* 1. FreeType looks for a bitmap for the glyph corresponding to the
|
||||||
* face's current size. If one is found, the function returns. The
|
* face's current size. If one is found, the function returns.
|
||||||
* bitmap data can be accessed from the glyph slot (see note below).
|
* The bitmap data can be accessed from the glyph slot (see note
|
||||||
*
|
* below).
|
||||||
* 2. If no embedded bitmap is searched or found, FreeType looks for a
|
*
|
||||||
* scalable outline. If one is found, it is loaded from the font
|
* 2. If no embedded bitmap is searched or found, FreeType looks for a
|
||||||
* file, scaled to device pixels, then `hinted' to the pixel grid in
|
* scalable outline. If one is found, it is loaded from the font
|
||||||
* order to optimize it. The outline data can be accessed from the
|
* file, scaled to device pixels, then `hinted' to the pixel grid
|
||||||
* glyph slot (see note below).
|
* in order to optimize it. The outline data can be accessed from
|
||||||
*
|
* the glyph slot (see note below).
|
||||||
* Note that by default, the glyph loader doesn't render outlines into
|
*
|
||||||
* bitmaps. The following flags are used to modify this default
|
* Note that by default, the glyph loader doesn't render outlines into
|
||||||
* behaviour to more specific and useful cases.
|
* bitmaps. The following flags are used to modify this default
|
||||||
*
|
* behaviour to more specific and useful cases.
|
||||||
* FT_LOAD_NO_SCALE ::
|
*
|
||||||
* Don't scale the vector outline being loaded to 26.6 fractional
|
* FT_LOAD_NO_SCALE ::
|
||||||
* pixels, but kept in font units. Note that this also disables
|
* Don't scale the vector outline being loaded to 26.6 fractional
|
||||||
* hinting and the loading of embedded bitmaps. You should only use it
|
* pixels, but kept in font units. Note that this also disables
|
||||||
* when you want to retrieve the original glyph outlines in font units.
|
* hinting and the loading of embedded bitmaps. You should only use
|
||||||
*
|
* it when you want to retrieve the original glyph outlines in font
|
||||||
* FT_LOAD_NO_HINTING ::
|
* units.
|
||||||
* Don't hint glyph outlines after their scaling to device pixels.
|
*
|
||||||
* This generally generates `blurrier' glyphs in anti-aliased modes.
|
* FT_LOAD_NO_HINTING ::
|
||||||
*
|
* Don't hint glyph outlines after their scaling to device pixels.
|
||||||
* This flag is ignored if @FT_LOAD_NO_SCALE is set. See also
|
* This generally generates `blurrier' glyphs in anti-aliased modes.
|
||||||
* FT_FACE_FLAG_HINTER (@FT_FACE_FLAG_XXX), FT_LOAD_FORCE_AUTO and
|
*
|
||||||
* FT_LOAD_NO_AUTOHINT below.
|
* This flag is ignored if @FT_LOAD_NO_SCALE is set. See also
|
||||||
*
|
* FT_FACE_FLAG_HINTER (@FT_FACE_FLAG_XXX), FT_LOAD_FORCE_AUTO and
|
||||||
* FT_LOAD_RENDER ::
|
* FT_LOAD_NO_AUTOHINT below.
|
||||||
* Render the glyph outline immediately into a bitmap before the glyph
|
*
|
||||||
* loader returns. By default, the glyph is rendered for the
|
* FT_LOAD_RENDER ::
|
||||||
* @FT_RENDER_MODE_NORMAL mode, which corresponds to 8-bit anti-aliased
|
* Render the glyph outline immediately into a bitmap before the glyph
|
||||||
* bitmaps using 256 opacity levels. You can use either
|
* loader returns. By default, the glyph is rendered for the
|
||||||
* @FT_LOAD_TARGET_MONO or @FT_LOAD_MONOCHROME to render 1-bit
|
* @FT_RENDER_MODE_NORMAL mode, which corresponds to 8-bit anti-aliased
|
||||||
* monochrome bitmaps.
|
* bitmaps using 256 opacity levels. You can use either
|
||||||
*
|
* @FT_LOAD_TARGET_MONO or @FT_LOAD_MONOCHROME to render 1-bit
|
||||||
* This flag is ignored if @FT_LOAD_NO_SCALE is set.
|
* monochrome bitmaps.
|
||||||
*
|
*
|
||||||
* FT_LOAD_NO_BITMAP ::
|
* This flag is ignored if @FT_LOAD_NO_SCALE is set.
|
||||||
* Don't look for bitmaps when loading the glyph. Only scalable
|
*
|
||||||
* outlines are loaded when available, and scaled, hinted, or
|
* FT_LOAD_NO_BITMAP ::
|
||||||
* rendered depending on other bit flags.
|
* Don't look for bitmaps when loading the glyph. Only scalable
|
||||||
*
|
* outlines are loaded when available, and scaled, hinted, or rendered
|
||||||
* This does not prevent you from rendering outlines to bitmaps
|
* depending on other bit flags.
|
||||||
* with @FT_LOAD_RENDER, however.
|
*
|
||||||
*
|
* This does not prevent you from rendering outlines to bitmaps with
|
||||||
* FT_LOAD_VERTICAL_LAYOUT ::
|
* @FT_LOAD_RENDER, however.
|
||||||
* Prepare the glyph image for vertical text layout. This basically
|
*
|
||||||
* means that `face.glyph.advance' corresponds to the vertical
|
* FT_LOAD_VERTICAL_LAYOUT ::
|
||||||
* advance height (instead of the default horizontal advance width),
|
* Prepare the glyph image for vertical text layout. This basically
|
||||||
* and that the glyph image is translated to match the vertical
|
* means that `face.glyph.advance' corresponds to the vertical advance
|
||||||
* bearings positions.
|
* height (instead of the default horizontal advance width), and that
|
||||||
*
|
* the glyph image is translated to match the vertical bearings
|
||||||
* FT_LOAD_FORCE_AUTOHINT ::
|
* positions.
|
||||||
* Force the use of the FreeType auto-hinter when a glyph outline is
|
*
|
||||||
* loaded. You shouldn't need this in a typical application, since it
|
* FT_LOAD_FORCE_AUTOHINT ::
|
||||||
* is mostly used to experiment with its algorithm.
|
* Force the use of the FreeType auto-hinter when a glyph outline is
|
||||||
*
|
* loaded. You shouldn't need this in a typical application, since it
|
||||||
* See also FT_FACE_FLAG_HINTER (@FT_FACE_FLAG_XXX), FT_LOAD_NO_HINTING
|
* is mostly used to experiment with its algorithm.
|
||||||
* above, and FT_LOAD_NO_AUTOHINT below.
|
*
|
||||||
*
|
* See also FT_FACE_FLAG_HINTER (@FT_FACE_FLAG_XXX),
|
||||||
* FT_LOAD_CROP_BITMAP ::
|
* FT_LOAD_NO_HINTING above, and FT_LOAD_NO_AUTOHINT below.
|
||||||
* Indicates that the glyph loader should try to crop the bitmap (i.e.,
|
*
|
||||||
* remove all space around its black bits) when loading it. This is
|
* FT_LOAD_CROP_BITMAP ::
|
||||||
* only useful when loading embedded bitmaps in certain fonts, since
|
* Indicates that the glyph loader should try to crop the bitmap
|
||||||
* bitmaps rendered with @FT_LOAD_RENDER are always cropped by default.
|
* (i.e., remove all space around its black bits) when loading it.
|
||||||
*
|
* This is only useful when loading embedded bitmaps in certain fonts,
|
||||||
* FT_LOAD_PEDANTIC ::
|
* since bitmaps rendered with @FT_LOAD_RENDER are always cropped by
|
||||||
* Indicates that the glyph loader should perform pedantic
|
* default.
|
||||||
* verifications during glyph loading, rejecting invalid fonts. This
|
*
|
||||||
* is mostly used to detect broken glyphs in fonts. By default,
|
* FT_LOAD_PEDANTIC ::
|
||||||
* FreeType tries to handle broken fonts also.
|
* Indicates that the glyph loader should perform pedantic
|
||||||
*
|
* verifications during glyph loading, rejecting invalid fonts. This
|
||||||
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
|
* is mostly used to detect broken glyphs in fonts. By default,
|
||||||
* Indicates that the glyph loader should ignore the global advance
|
* FreeType tries to handle broken fonts also.
|
||||||
* width defined in the font. For historical reasons (to support
|
*
|
||||||
* buggy CJK fonts), FreeType uses the value of the `advanceWidthMax'
|
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
|
||||||
* field in the `htmx' table for all glyphs if the font is monospaced.
|
* Indicates that the glyph loader should ignore the global advance
|
||||||
* Activating this flags makes FreeType use the metric values given in
|
* width defined in the font. For historical reasons (to support
|
||||||
* the `htmx' table.
|
* buggy CJK fonts), FreeType uses the value of the `advanceWidthMax'
|
||||||
*
|
* field in the `htmx' table for all glyphs if the font is monospaced.
|
||||||
* FT_LOAD_NO_RECURSE ::
|
* Activating this flags makes FreeType use the metric values given in
|
||||||
* This flag is only used internally. It merely indicates that the
|
* the `htmx' table.
|
||||||
* glyph loader should not load composite glyphs recursively. Instead,
|
*
|
||||||
* it should set the `num_subglyph' and `subglyphs' values of the glyph
|
* FT_LOAD_NO_RECURSE ::
|
||||||
* slot accordingly, and set "glyph->format" to
|
* This flag is only used internally. It merely indicates that the
|
||||||
* @FT_GLYPH_FORMAT_COMPOSITE.
|
* glyph loader should not load composite glyphs recursively.
|
||||||
*
|
* Instead, it should set the `num_subglyph' and `subglyphs' values of
|
||||||
* The description of sub-glyphs is not available to client
|
* the glyph slot accordingly, and set "glyph->format" to
|
||||||
* applications for now.
|
* @FT_GLYPH_FORMAT_COMPOSITE.
|
||||||
*
|
*
|
||||||
* FT_LOAD_IGNORE_TRANSFORM ::
|
* The description of sub-glyphs is not available to client
|
||||||
* Indicates that the glyph loader should not try to transform the
|
* applications for now.
|
||||||
* loaded glyph image. This doesn't prevent scaling, hinting, or
|
*
|
||||||
* rendering. See @FT_Set_Transform
|
* FT_LOAD_IGNORE_TRANSFORM ::
|
||||||
*
|
* Indicates that the glyph loader should not try to transform the
|
||||||
* FT_LOAD_MONOCHROME ::
|
* loaded glyph image. This doesn't prevent scaling, hinting, or
|
||||||
* This flag is used with @FT_LOAD_RENDER to indicate that you want
|
* rendering. See @FT_Set_Transform.
|
||||||
* to render a 1-bit monochrome glyph bitmap from a vectorial outline.
|
*
|
||||||
*
|
* FT_LOAD_MONOCHROME ::
|
||||||
* Note that this has no effect on the hinting algorithm used by the
|
* This flag is used with @FT_LOAD_RENDER to indicate that you want to
|
||||||
* glyph loader. You should better use @FT_LOAD_TARGET_MONO if you
|
* render a 1-bit monochrome glyph bitmap from a vectorial outline.
|
||||||
* want to render monochrome-optimized glyph images instead.
|
*
|
||||||
*
|
* Note that this has no effect on the hinting algorithm used by the
|
||||||
* FT_LOAD_LINEAR_DESIGN ::
|
* glyph loader. You should better use @FT_LOAD_TARGET_MONO if you
|
||||||
* Return the linearly scaled metrics expressed in original font units
|
* want to render monochrome-optimized glyph images instead.
|
||||||
* instead of the default 16.16 pixel values.
|
*
|
||||||
*
|
* FT_LOAD_LINEAR_DESIGN ::
|
||||||
* FT_LOAD_NO_AUTOHINT ::
|
* Return the linearly scaled metrics expressed in original font units
|
||||||
* Indicates that the auto-hinter should never be used to hint glyph
|
* instead of the default 16.16 pixel values.
|
||||||
* outlines. This doesn't prevent native format-specific hinters from
|
*
|
||||||
* being used. This can be important for certain fonts where unhinted
|
* FT_LOAD_NO_AUTOHINT ::
|
||||||
* output is better than auto-hinted one.
|
* Indicates that the auto-hinter should never be used to hint glyph
|
||||||
*
|
* outlines. This doesn't prevent native format-specific hinters from
|
||||||
* See also FT_FACE_FLAG_HINTER (@FT_FACE_FLAG_XXX), FT_LOAD_FORCE_AUTO,
|
* being used. This can be important for certain fonts where unhinted
|
||||||
* and FT_LOAD_NO_HINTING above.
|
* output is better than auto-hinted one.
|
||||||
*
|
*
|
||||||
* @note:
|
* See also FT_FACE_FLAG_HINTER (@FT_FACE_FLAG_XXX), FT_LOAD_FORCE_AUTO,
|
||||||
* see also @FT_LOAD_TARGET_XXX which relate to hinting algorithm
|
* and FT_LOAD_NO_HINTING above.
|
||||||
* selection.
|
*
|
||||||
*/
|
* @note:
|
||||||
|
* See also @FT_LOAD_TARGET_XXX which relates to the hinting algorithm
|
||||||
|
* selection.
|
||||||
|
*/
|
||||||
#define FT_LOAD_DEFAULT 0x0
|
#define FT_LOAD_DEFAULT 0x0
|
||||||
#define FT_LOAD_NO_SCALE 0x1
|
#define FT_LOAD_NO_SCALE 0x1
|
||||||
#define FT_LOAD_NO_HINTING 0x2
|
#define FT_LOAD_NO_HINTING 0x2
|
||||||
|
@ -2404,70 +2407,73 @@ FT_BEGIN_HEADER
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
*
|
/**************************************************************************
|
||||||
* @enum: FT_LOAD_TARGET_XXX
|
*
|
||||||
*
|
* @enum:
|
||||||
* @description:
|
* FT_LOAD_TARGET_XXX
|
||||||
* a list of values that are used to select a specific hinting
|
*
|
||||||
* algorithm to the glyph loader. You should OR one of these values
|
* @description:
|
||||||
* to your 'load_flags' when calling @FT_Load_Glyph.
|
* A list of values that are used to select a specific hinting algorithm
|
||||||
*
|
* to the glyph loader. You should OR one of these values to your
|
||||||
* note that these values are only used by the auto-hinter, and ignored
|
* `load_flags' when calling @FT_Load_Glyph.
|
||||||
* by the native ones (e.g. the TrueType bytecode interpreter). You
|
*
|
||||||
* must use @FT_LOAD_FORCE_AUTOHINT to ensure that they're always used.
|
* Note that these values are only used by the auto-hinter, and ignored
|
||||||
*
|
* by other hinting engines (e.g., the TrueType bytecode interpreter).
|
||||||
* @FT_LOAD_TARGET_LIGHT being an exception, that always forces the
|
* You must use @FT_LOAD_FORCE_AUTOHINT to ensure that they are always
|
||||||
* auto-hinter.
|
* used.
|
||||||
*
|
*
|
||||||
* @values:
|
* @FT_LOAD_TARGET_LIGHT is an exception, since it always forces the
|
||||||
* FT_LOAD_TARGET_NORMAL ::
|
* auto-hinter.
|
||||||
* correspond to the default hinting algorithm, optimized for standard
|
*
|
||||||
* gray-level rendering. for monochrome output, use @FT_RENDER_MODE_MONO
|
* @values:
|
||||||
* instead.
|
* FT_LOAD_TARGET_NORMAL ::
|
||||||
*
|
* This corresponds to the default hinting algorithm, optimized for
|
||||||
* FT_LOAD_TARGET_LIGHT ::
|
* standard gray-level rendering. For monochrome output, use
|
||||||
* correspond to a lighter hinting algorithm for non-monochrome modes.
|
* @FT_RENDER_MODE_MONO instead.
|
||||||
* This will generate more glyphs that are more fuzzy but more faithful
|
*
|
||||||
* to their original shape. A bit like Mac OS X.
|
* FT_LOAD_TARGET_LIGHT ::
|
||||||
*
|
* A lighter hinting algorithm for non-monochrome modes. Many
|
||||||
* As a special exception, this values *always* forces auto-hinting,
|
* generated glyphs are more fuzzy but better resemble its original
|
||||||
* whatever the native hinter is.
|
* shape. A bit like rendering on Mac OS X.
|
||||||
*
|
*
|
||||||
* FT_LOAD_TARGET_MONO ::
|
* As a special exception, this values *always* forces auto-hinting,
|
||||||
* strong hinting algorithm that should only be used for monochrome
|
* whatever the native hinter is.
|
||||||
* output. The result will probably be unpleasant for other rendering
|
*
|
||||||
* modes.
|
* FT_LOAD_TARGET_MONO ::
|
||||||
*
|
* Strong hinting algorithm that should only be used for monochrome
|
||||||
* FT_LOAD_TARGET_LCD ::
|
* output. The result will probably be unpleasant for other rendering
|
||||||
* a variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
|
* modes.
|
||||||
* decimated LCD displays.
|
*
|
||||||
*
|
* FT_LOAD_TARGET_LCD ::
|
||||||
* FT_LOAD_TARGET_LCD_V ::
|
* A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
|
||||||
* a variant of @FT_LOAD_TARGET_NORMAL optimized for vertically decimated
|
* decimated LCD displays.
|
||||||
* LCD displays.
|
*
|
||||||
*
|
* FT_LOAD_TARGET_LCD_V ::
|
||||||
* @note:
|
* A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically
|
||||||
* You should use only _one_ of the FT_LOAD_TARGET_XXX values in your
|
* decimated LCD displays.
|
||||||
* 'load_flags'. They can't be ORed.
|
*
|
||||||
*
|
* @note:
|
||||||
* If you also use the @FT_LOAD_RENDER flag, then the output will be
|
* You should use only _one_ of the FT_LOAD_TARGET_XXX values in your
|
||||||
* determined by the corresponding @FT_Render_Mode value. E.g.
|
* `load_flags'. They can't be ORed.
|
||||||
* @FT_LOAD_TARGET_NORMAL will generate a gray-level pixmap
|
*
|
||||||
* (see @FT_RENDER_MODE_NORMAL)
|
* If you also use the @FT_LOAD_RENDER flag, then the output will be
|
||||||
*
|
* determined by the corresponding @FT_Render_Mode value. For example,
|
||||||
* You can use a hinting algorithm that doesn't correspond to the same
|
* @FT_LOAD_TARGET_NORMAL generates a gray-level pixmap
|
||||||
* rendering mode. For example, it is possible to use the `light' hinting
|
* (see @FT_RENDER_MODE_NORMAL).
|
||||||
* algorithm and have the results rendered in horizontal LCD pixel mode,
|
*
|
||||||
* with code like this:
|
* You can use a hinting algorithm that doesn't correspond to the same
|
||||||
*
|
* rendering mode. As an example, it is possible to use the `light'
|
||||||
* {
|
* hinting algorithm and have the results rendered in horizontal LCD
|
||||||
* FT_Load_Glyph( face, glyph_index,
|
* pixel mode, with code like
|
||||||
* load_flags | FT_LOAD_TARGET_LIGHT );
|
*
|
||||||
*
|
* {
|
||||||
* FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
|
* FT_Load_Glyph( face, glyph_index,
|
||||||
* }
|
* load_flags | FT_LOAD_TARGET_LIGHT );
|
||||||
*/
|
*
|
||||||
|
* FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
|
#define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 )
|
||||||
|
|
||||||
|
@ -2477,13 +2483,16 @@ FT_BEGIN_HEADER
|
||||||
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
|
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
|
||||||
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
|
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
|
||||||
|
|
||||||
/**
|
|
||||||
* @macro: FT_LOAD_TARGET_MODE
|
/*
|
||||||
*
|
* @macro:
|
||||||
* @description:
|
* FT_LOAD_TARGET_MODE
|
||||||
* return the @FT_Render_Mode corresponding to a given @FT_LOAD_TARGET_XXX
|
*
|
||||||
* value.
|
* @description:
|
||||||
*/
|
* Return the @FT_Render_Mode corresponding to a given
|
||||||
|
* @FT_LOAD_TARGET_XXX value.
|
||||||
|
*/
|
||||||
|
|
||||||
#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
|
#define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
@ -2540,9 +2549,9 @@ FT_BEGIN_HEADER
|
||||||
/* anti-aliased bitmaps, using 256 levels of opacity. */
|
/* anti-aliased bitmaps, using 256 levels of opacity. */
|
||||||
/* */
|
/* */
|
||||||
/* FT_RENDER_MODE_LIGHT :: */
|
/* FT_RENDER_MODE_LIGHT :: */
|
||||||
/* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only defined */
|
/* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */
|
||||||
/* as a separate value because render modes are also used */
|
/* defined as a separate value because render modes are also used */
|
||||||
/* indirectly to define hinting algorithm selectors. See */
|
/* indirectly to define hinting algorithm selectors. See */
|
||||||
/* @FT_LOAD_TARGET_XXX for details. */
|
/* @FT_LOAD_TARGET_XXX for details. */
|
||||||
/* */
|
/* */
|
||||||
/* FT_RENDER_MODE_MONO :: */
|
/* FT_RENDER_MODE_MONO :: */
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
functions, and pretend the suitcase file is a collection.
|
functions, and pretend the suitcase file is a collection.
|
||||||
|
|
||||||
Warning: fbit and NFNT bitmap resources are not supported yet.
|
Warning: fbit and NFNT bitmap resources are not supported yet.
|
||||||
In old sfnt fonts, bitmap glyph data for each sizes are stored in
|
In old sfnt fonts, bitmap glyph data for each size is stored in
|
||||||
each NFNT resources, instead of bdat table in sfnt resource.
|
each NFNT resources, instead of bdat table in sfnt resource.
|
||||||
Therefore, face->num_fixed_sizes is set to 0, because bitmap
|
Therefore, face->num_fixed_sizes is set to 0, because bitmap
|
||||||
data in NFNT resource is unavailable at present.
|
data in NFNT resource is unavailable at present.
|
||||||
|
@ -266,17 +266,17 @@
|
||||||
/* count_faces_sfnt() counts both of sfnt & NFNT refered by FOND */
|
/* count_faces_sfnt() counts both of sfnt & NFNT refered by FOND */
|
||||||
/* count_faces_scalable() counts sfnt only refered by FOND */
|
/* count_faces_scalable() counts sfnt only refered by FOND */
|
||||||
static short
|
static short
|
||||||
count_faces_sfnt( char *fond_data )
|
count_faces_sfnt( char* fond_data )
|
||||||
{
|
{
|
||||||
/* The count is 1 greater than the value in the FOND. */
|
/* The count is 1 greater than the value in the FOND. */
|
||||||
/* Isn't that cute? :-) */
|
/* Isn't that cute? :-) */
|
||||||
|
|
||||||
return 1 + *( (short *)( fond_data + sizeof ( FamRec ) ) );
|
return 1 + *( (short*)( fond_data + sizeof ( FamRec ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static short
|
static short
|
||||||
count_faces_scalable( char *fond_data )
|
count_faces_scalable( char* fond_data )
|
||||||
{
|
{
|
||||||
AsscEntry* assoc;
|
AsscEntry* assoc;
|
||||||
FamRec* fond;
|
FamRec* fond;
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
for ( i = 0; i < face_all; i++ )
|
for ( i = 0; i < face_all; i++ )
|
||||||
{
|
{
|
||||||
if ( 0 == assoc[i].fontSize )
|
if ( 0 == assoc[i].fontSize )
|
||||||
face ++;
|
face++;
|
||||||
}
|
}
|
||||||
return face;
|
return face;
|
||||||
}
|
}
|
||||||
|
|
|
@ -525,7 +525,8 @@
|
||||||
FT_DRIVER_USES_OUTLINES( driver ) );
|
FT_DRIVER_USES_OUTLINES( driver ) );
|
||||||
|
|
||||||
/* force auto-hinting for the LIGHT hinting mode */
|
/* force auto-hinting for the LIGHT hinting mode */
|
||||||
if ( autohint && FT_LOAD_TARGET_MODE(load_flags) == FT_RENDER_MODE_LIGHT )
|
if ( autohint &&
|
||||||
|
FT_LOAD_TARGET_MODE( load_flags ) == FT_RENDER_MODE_LIGHT )
|
||||||
load_flags |= FT_LOAD_FORCE_AUTOHINT;
|
load_flags |= FT_LOAD_FORCE_AUTOHINT;
|
||||||
|
|
||||||
if ( autohint )
|
if ( autohint )
|
||||||
|
|
Loading…
Reference in New Issue