* src/base/ftobjs.c (FT_Done_Library): Remove compiler warning.
Formatting.
This commit is contained in:
parent
21e046e0c4
commit
f41e71a199
91
ChangeLog
91
ChangeLog
|
@ -7,39 +7,80 @@
|
||||||
ftc_family_table_free, FTC_Manager_Check): Ditto.
|
ftc_family_table_free, FTC_Manager_Check): Ditto.
|
||||||
* src/cache/ftcsbits.c (ftc_sbit_node_load): Ditto.
|
* src/cache/ftcsbits.c (ftc_sbit_node_load): Ditto.
|
||||||
|
|
||||||
|
* src/base/ftobjs.c (FT_Done_Library): Remove compiler warning.
|
||||||
|
|
||||||
2001-12-20 David Turner <david@freetype.org>
|
2001-12-20 David Turner <david@freetype.org>
|
||||||
|
|
||||||
* include/freetype/config/ftoption.h: Disabling bytecode interpreter
|
Added PostScript hinter support to the CFF and CID drivers.
|
||||||
for new release.
|
|
||||||
|
|
||||||
* docs/CHANGES: Updated for 2.0.6 release.
|
* include/freetype/internal/cfftypes.h (CFF_Font): New member
|
||||||
|
`pshinter'.
|
||||||
|
* src/cff/cffload.c (CFF_Get_Standard_Encoding): New function.
|
||||||
|
* src/cff/cffload.h: Updated.
|
||||||
|
* src/cff/cffgload.c (CFF_Init_Builder): Renamed to ...
|
||||||
|
(CFF_Builder_Init): This.
|
||||||
|
Added new argument `hinting'.
|
||||||
|
(CFF_Done_Builder): Renamed to ...
|
||||||
|
(CFF_Builder_Done): This.
|
||||||
|
(CFF_Init_Decoder): Added new argument `hinting'.
|
||||||
|
(CFF_Parse_CharStrings): Implement vstem support.
|
||||||
|
(CFF_Load_Glyph): Updated.
|
||||||
|
Add hinting support.
|
||||||
|
(cff_lookup_glyph_by_stdcharcode): Use CFF_Get_Standard_Encoding().
|
||||||
|
(cff_argument_counts): Updated.
|
||||||
|
* src/cff/cffgload.h: Updated.
|
||||||
|
* src/cff/cffobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
|
||||||
|
(CFF_Size_Get_Globals_Funcs, CFF_Size_Done, CFF_Size_Init,
|
||||||
|
CFF_Size_Reset, CFF_GlyphSlot_Done, CFF_GLyphSlot_Init): New
|
||||||
|
functions.
|
||||||
|
(CFF_Init_Face): Renamed to ...
|
||||||
|
(CFF_Face_Init): This.
|
||||||
|
Add hinter support.
|
||||||
|
(CFF_Done_Face): Renamed to ...
|
||||||
|
(CFF_Face_Done): This.
|
||||||
|
(CFF_Init_Driver): Renamed to ...
|
||||||
|
(CFF_Driver_Init): This.
|
||||||
|
(CFF_Done_Driver): Renamed to ...
|
||||||
|
(CFF_Driver_Done): This.
|
||||||
|
* src/cff/cffobjs.h: Updated.
|
||||||
|
* src/cff/cffdrivr.c (cff_driver_class): Updated.
|
||||||
|
|
||||||
|
* include/freetype/internal/t1types.h (CID_FaceRec): New member
|
||||||
|
`pshinter'.
|
||||||
|
* src/cid/cidgload.c (CID_Load_Glyph): Add hinter support.
|
||||||
|
* src/cid/cidobjs.c: Include FT_INTERNAL_POSTSCRIPT_HINTS_H.
|
||||||
|
(CID_GlyphSlot_Done, CID_GlyphSlot_Init, CID_Size_Get_Globals_Funcs,
|
||||||
|
CID_Size_Done, CID_Size_Init, CID_Size_Reset): New functions.
|
||||||
|
(CID_Done_Face): Renamed to ...
|
||||||
|
(CID_Face_Done): This.
|
||||||
|
(CID_Init_Face): Renamed to ...
|
||||||
|
(CID_Face_Init): This.
|
||||||
|
Add hinting support.
|
||||||
|
(CID_Init_Driver): Renamed to ...
|
||||||
|
(CID_Driver_Init): This.
|
||||||
|
(CID_Done_Driver): Renamed to ...
|
||||||
|
(CID_Driver_Done): This.
|
||||||
|
* src/cid/cidobjs.h: Updated.
|
||||||
|
* src/cidriver.c: Updated.
|
||||||
|
|
||||||
|
* src/pshinter/pshrec.c (t2_hint_stems): Fixed.
|
||||||
|
|
||||||
|
* src/base/ftobjs.c (FT_Done_Library): Fixed a stupid bug that
|
||||||
|
crashed the library on exit.
|
||||||
|
|
||||||
|
* src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix
|
||||||
|
transformation of hinted glyphs.
|
||||||
|
|
||||||
* src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
|
* src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
|
||||||
to mode the definition of encoding tables within "cffload.c" instead
|
to move the definition of encoding tables back within "cffload.c"
|
||||||
of making them part of a shared header (causing problems in "multi"
|
instead of making them part of a shared header (causing problems in
|
||||||
builds).
|
"multi" builds). This reverts change 2001-08-08.
|
||||||
|
|
||||||
* docs/TODO: Added "stem3 and counter hints support" to the TODO list
|
|
||||||
for the Postscript hinter.
|
|
||||||
|
|
||||||
|
* docs/CHANGES: Updated for 2.0.6 release.
|
||||||
|
* docs/TODO: Added "stem3 and counter hints support" to the TODO
|
||||||
|
list for the Postscript hinter.
|
||||||
* docs/BUGS: Closed the AUTOHINT-NO-SBITS bug.
|
* docs/BUGS: Closed the AUTOHINT-NO-SBITS bug.
|
||||||
|
|
||||||
* src/pshinter/pshrec.c (t2_hint_stems), src/cff/cffobjs.h,
|
|
||||||
src/cff/cffobjs.c, src/cff/cffload.c, src/cff/cffload.h,
|
|
||||||
src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffdriver.c,
|
|
||||||
include/freetype/internal/cfftypes.h: added Postscript hinter support
|
|
||||||
to the CFF driver.
|
|
||||||
|
|
||||||
* src/base/ftobjs.c (FT_Done_Library): Fixed a stupid bug that crashed
|
|
||||||
the library on exit.
|
|
||||||
|
|
||||||
* src/type1/t1gload.c (T1_Load_Glyph): Enable font matrix transform
|
|
||||||
on hinted glyphs.
|
|
||||||
|
|
||||||
* src/cid/cidgload.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
|
|
||||||
src/cid/cidriver.c, include/freetype/internal/t1types.h: Added
|
|
||||||
Postscript hinter support to the CID font driver.
|
|
||||||
|
|
||||||
2001-12-19 David Turner <david@freetype.org>
|
2001-12-19 David Turner <david@freetype.org>
|
||||||
|
|
||||||
* include/freetype/cache/ftcache.h: Added comments to indicate that
|
* include/freetype/cache/ftcache.h: Added comments to indicate that
|
||||||
|
|
28
docs/BUGS
28
docs/BUGS
|
@ -44,7 +44,7 @@ Identifier Date Closed by Closure date
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
BAD-TTNAMEID.H 12-09-2001 Antoine N/A
|
BAD-TTNAMEID.H 12-09-2001 Antoine N/A
|
||||||
BAD-T1-CHARMAP 15-06-2001 David 2.0.5
|
BAD-T1-CHARMAP 15-06-2001 David 2.0.5
|
||||||
BAD-UNIXXX-NAMES 30-07-2001 David 2.0.5
|
BAD-UNIXXXX-NAMES 30-07-2001 David 2.0.5
|
||||||
GLYPH_TO_BITMAP-BUG 05-12-2001 David 05-12-2001
|
GLYPH_TO_BITMAP-BUG 05-12-2001 David 05-12-2001
|
||||||
AUTOHINT-NO-SBITS 13-09-2001 David 2.0.6
|
AUTOHINT-NO-SBITS 13-09-2001 David 2.0.6
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ BAD-TTNAMEID.H
|
||||||
Which one is correct?
|
Which one is correct?
|
||||||
|
|
||||||
Antoine replied that this was a bug in the TT 1.66 specification, and that
|
Antoine replied that this was a bug in the TT 1.66 specification, and that
|
||||||
FreeType followed the most recent TrueType/OpenType specification here!
|
FreeType followed the most recent TrueType/OpenType specification here.
|
||||||
|
|
||||||
|
|
||||||
AUTOHINT-SBITS
|
AUTOHINT-SBITS
|
||||||
|
@ -98,9 +98,9 @@ AUTOHINT-SBITS
|
||||||
efficiently without making a few important internal changes to the
|
efficiently without making a few important internal changes to the
|
||||||
library's design (more importantly, to the font driver interface).
|
library's design (more importantly, to the font driver interface).
|
||||||
|
|
||||||
This has been corrected with a hack in FT_Load_Glyph. More important
|
This has been corrected with a hack in FT_Load_Glyph(). More important
|
||||||
internal changes should help get rid of it with a clean solution in
|
internal changes should help get rid of it with a clean solution in a
|
||||||
a further release like FreeType 2.1
|
further release like FreeType 2.1.
|
||||||
|
|
||||||
|
|
||||||
BAD-TT-RENDERING
|
BAD-TT-RENDERING
|
||||||
|
@ -112,10 +112,10 @@ BAD-TT-RENDERING
|
||||||
Tests and comparisons show a _major_ discrepancy of monochrome truetype
|
Tests and comparisons show a _major_ discrepancy of monochrome truetype
|
||||||
bytecode-hinted glyphs! Something seems to be really broken here!
|
bytecode-hinted glyphs! Something seems to be really broken here!
|
||||||
|
|
||||||
Some of this has been fixed in 2.0.6, there was a bug in the TrueType
|
Some of this has been fixed in 2.0.6; there was a bug in the TrueType
|
||||||
loader that prevented it from loading composites correctly. However, there
|
loader that prevented it from loading composites correctly. However,
|
||||||
are still _subtle_ differences between FT1 and FT2 when it comes to
|
there are still _subtle_ differences between FT1 and FT2 when it comes to
|
||||||
monochrome TrueType-hinted glyphs..
|
monochrome TrueType-hinted glyphs.
|
||||||
|
|
||||||
|
|
||||||
BAD-THIN-LINES
|
BAD-THIN-LINES
|
||||||
|
@ -143,7 +143,7 @@ BAD-T1-CHARMAP
|
||||||
table of glyph names in 'src/psaux/pstables.h'.)
|
table of glyph names in 'src/psaux/pstables.h'.)
|
||||||
|
|
||||||
|
|
||||||
BAD-UNIXXX-NAMES
|
BAD-UNIXXXX-NAMES
|
||||||
|
|
||||||
Glyph names like uniXXXX are not recognized as they should be. It seems
|
Glyph names like uniXXXX are not recognized as they should be. It seems
|
||||||
that code in psmodule.c for uniXXXX glyph names was never tested. The
|
that code in psmodule.c for uniXXXX glyph names was never tested. The
|
||||||
|
@ -198,14 +198,14 @@ GLYPH_TO_BITMAP-BUG
|
||||||
Calling FT_Glyph_To_Bitmap() sometimes modifies the original glyph
|
Calling FT_Glyph_To_Bitmap() sometimes modifies the original glyph
|
||||||
outline, creating weird alignment artefacts.
|
outline, creating weird alignment artefacts.
|
||||||
|
|
||||||
This subtle bug was really in the file src/smooth/ftsmooth.c. Basically,
|
This subtle bug was really in the file `src/smooth/ftsmooth.c'.
|
||||||
the outline was shifted before rendering it into a new bitmap buffer.
|
Basically, the outline was shifted before rendering it into a new bitmap
|
||||||
However, it wasn't properly un-shifted after that operation.
|
buffer. However, it wasn't properly un-shifted after that operation.
|
||||||
|
|
||||||
This was only noticeable with certain glyphs or certain fonts; it crept in
|
This was only noticeable with certain glyphs or certain fonts; it crept in
|
||||||
a long time ago.
|
a long time ago.
|
||||||
|
|
||||||
same bug in src/raster/ftrender1.c by the way..
|
The same bug has been fixed in src/raster/ftrender1.c also.
|
||||||
|
|
||||||
|
|
||||||
=== end of file ===
|
=== end of file ===
|
||||||
|
|
123
docs/CHANGES
123
docs/CHANGES
|
@ -1,76 +1,80 @@
|
||||||
LATEST CHANGES BETWEEN 2.0.6 and 2.0.5
|
LATEST CHANGES BETWEEN 2.0.6 and 2.0.5
|
||||||
|
|
||||||
*** IMPORTANT BUG FIXES:
|
I. IMPORTANT BUG FIXES
|
||||||
|
|
||||||
- it wasn't possible to load embedded bitmaps when the auto-hinter was
|
|
||||||
used. This is now fixed..
|
|
||||||
|
|
||||||
- the TrueType font driver didn't load some composites properly
|
|
||||||
(the sub-glyphs were slightly shifted, and this was only noticeable
|
|
||||||
when using monochrome rendering)
|
|
||||||
|
|
||||||
- Various fixes to the auto-hinter. They merely improve the output of
|
- It wasn't possible to load embedded bitmaps when the auto-hinter was
|
||||||
sans-serif fonts. Note that there are still problems with serifed
|
used. This is now fixed.
|
||||||
fonts and composites (accented characters).
|
|
||||||
|
|
||||||
- all scalable font drivers mistakenly returned un-fitted glyph advances
|
- The TrueType font driver didn't load some composites properly (the
|
||||||
when hinting was requested. This created problems for a number of layout
|
sub-glyphs were slightly shifted, and this was only noticeable when
|
||||||
applications. This is a very old bug that got undetected mainly because
|
using monochrome rendering).
|
||||||
most test/demo program perform rounding explicitely or implicitely
|
|
||||||
(through the cache).
|
|
||||||
|
|
||||||
- FT_Glyph_ToBitmap did mistakenly modify the source glyph in certain cases.
|
- Various fixes to the auto-hinter. They merely improve the output of
|
||||||
|
sans-serif fonts. Note that there are still problems with serifed
|
||||||
|
fonts and composites (accented characters).
|
||||||
|
|
||||||
- "glnames.py" still contained a bug that made FreeType return invalid
|
- All scalable font drivers erroneously returned un-fitted glyph
|
||||||
names for certain glyphs.
|
advances when hinting was requested. This created problems for a
|
||||||
|
number of layout applications. This is a very old bug that got
|
||||||
|
undetected mainly because most test/demo program perform rounding
|
||||||
|
explicitly or implicitly (through the cache).
|
||||||
|
|
||||||
|
- FT_Glyph_To_Bitmap() did erroneously modify the source glyph in
|
||||||
|
certain cases.
|
||||||
|
|
||||||
|
- "glnames.py" still contained a bug that made FreeType return invalid
|
||||||
|
names for certain glyphs.
|
||||||
|
|
||||||
|
|
||||||
*** IMPORTANT UPDATES & NEW FEATURES:
|
II. IMPORTANT UPDATES AND NEW FEATURES
|
||||||
|
|
||||||
- important updates to the Mac-specific parts of the library.
|
- Important updates to the Mac-specific parts of the library.
|
||||||
|
|
||||||
- The caching sub-system has been completely re-designed, and its API has
|
- The caching sub-system has been completely re-designed, and its API
|
||||||
evolved (the old one is still supported for backwards).
|
has evolved (the old one is still supported for backwards
|
||||||
|
compatibility).
|
||||||
The documentation for it will be completed on the next release though..
|
|
||||||
For now, you're encouraged to continue using the old API
|
|
||||||
|
|
||||||
- A new charmap cache is provided too. See FTC_CMapCache. This is useful
|
The documentation for it is not yet completed, sorry. For now, you
|
||||||
to perform character code -> glyph index translations quickly, without
|
are encouraged to continue using the old API. However, the ftview
|
||||||
the need for an opened FT_Face..
|
demo program in the ft2demos package has already been updated to use
|
||||||
|
the new caching functions.
|
||||||
|
|
||||||
- A NEW POSTSCRIPT HINTER module has been added to support native hints in
|
- A new charmap cache is provided too. See FTC_CMapCache(). This is
|
||||||
the following formats: Postscript Type 1, Postscript CID and CFF/CEF.
|
useful to perform character code -> glyph index translations quickly,
|
||||||
|
without the need for an opened FT_Face.
|
||||||
|
|
||||||
CHECK THIS OUT !! Note that the auto-hinter produces better results for
|
- A NEW POSTSCRIPT HINTER module has been added to support native hints
|
||||||
a number of badly-hinted fonts (mostly auto-generated ones) though..
|
in the following formats: PostScript Type 1, PostScript CID, and
|
||||||
|
CFF/CEF.
|
||||||
|
|
||||||
|
Please test! Note that the auto-hinter produces better results for a
|
||||||
|
number of badly-hinted fonts (mostly auto-generated ones) though.
|
||||||
|
|
||||||
|
- A memory debugger is now part of the standard FreeType sources. To
|
||||||
|
enable it, define FT_DEBUG_MEMORY in <freetype/config/ftoption.h>, and
|
||||||
|
recompile the library.
|
||||||
|
|
||||||
|
Additionally, define the _environment_ variable FT_DEBUG_MEMORY and
|
||||||
|
run any program using FreeType. When the library is exited, a summary
|
||||||
|
of memory footprints and possible leaks will be displayed.
|
||||||
|
|
||||||
|
This works transparently with _any_ program that uses FreeType.
|
||||||
|
However, you will need a lot of memory to use this (allocated blocks
|
||||||
|
are never released to the heap to detect double deletes easily).
|
||||||
|
|
||||||
|
|
||||||
- A memory debugger is now part of the standard FreeType sources. To
|
III. MISCELLANEOUS
|
||||||
enable it, define FT_DEBUG_MEMORY in <freetype/config/ftoption.h>,
|
|
||||||
and recompile the library.
|
|
||||||
|
|
||||||
Now, define the _environment_ variable FT_DEBUG_MEMORY and run any
|
|
||||||
program using FreeType. When the library is exited, a summary of
|
|
||||||
memory footprints and eventual leaks will be displayed..
|
|
||||||
|
|
||||||
this works transparently with _any_ program that uses FreeType..
|
- We are aware of subtle differences between the output of FreeType
|
||||||
you'll need _lots_ of memory to use this however (allocated blocks
|
versions 1 and 2 when it comes to monochrome TrueType-hinted glyphs.
|
||||||
are never released to the heap to detect double deletes easily)
|
These are most probably due to small differences in the monochrome
|
||||||
|
rasterizers and will be worked out in an upcoming release.
|
||||||
|
|
||||||
*** OTHER:
|
- The next release will be named FreeType 2.1, and will include a
|
||||||
|
_major_ rework of the library's internals, both to make the source
|
||||||
- we're aware of subtle differences between the output of FT 1 and FT 2
|
code more consistent, readable, etc. as well as to implement new
|
||||||
when it comes to monochrome TrueType-hinted glyphs. These are most
|
features like:
|
||||||
probably due to small differences in the monochrome rasterizers and
|
|
||||||
will be worked out in an upcoming release.
|
|
||||||
|
|
||||||
|
|
||||||
- the next release will be named FreeType 2.1, and will include a
|
|
||||||
_major_ rework of the library's internals, both to make the source
|
|
||||||
code more consistent, readable, etc.. as well as to implement new
|
|
||||||
features like:
|
|
||||||
|
|
||||||
- sub-pixel filtering ("ClearType" and "CoolType" like)
|
- sub-pixel filtering ("ClearType" and "CoolType" like)
|
||||||
- gamma-correction
|
- gamma-correction
|
||||||
- dynamic version and features retrieval
|
- dynamic version and features retrieval
|
||||||
|
@ -78,9 +82,6 @@ LATEST CHANGES BETWEEN 2.0.6 and 2.0.5
|
||||||
- important enhancements to the monochrome rasterizer
|
- important enhancements to the monochrome rasterizer
|
||||||
(especially for Postscript-based formats)
|
(especially for Postscript-based formats)
|
||||||
|
|
||||||
|
|
||||||
Merry XMas :-)
|
|
||||||
|
|
||||||
============================================================================
|
============================================================================
|
||||||
|
|
||||||
LATEST CHANGES BETWEEN 2.0.5 and 2.0.4
|
LATEST CHANGES BETWEEN 2.0.5 and 2.0.4
|
||||||
|
@ -118,9 +119,9 @@ LATEST CHANGES BETWEEN 2.0.5 and 2.0.4
|
||||||
- Added a new function named "FT_Get_Postscript_Name" to retrieve the
|
- Added a new function named "FT_Get_Postscript_Name" to retrieve the
|
||||||
"unique" Postscript font name of a given face.
|
"unique" Postscript font name of a given face.
|
||||||
|
|
||||||
- Added a new public header size named FT_SIZES_H (or <freetype/ftsizes.h>)
|
- Added a new public header size named FT_SIZES_H (or
|
||||||
providing new FT_Size-management functions: FT_New_Size, FT_Activate_Size,
|
<freetype/ftsizes.h>) providing new FT_Size-management functions:
|
||||||
FT_Done_Size.
|
FT_New_Size, FT_Activate_Size, FT_Done_Size.
|
||||||
|
|
||||||
- Fixed a reallocation bug that generated a dangling pointer (and possibly
|
- Fixed a reallocation bug that generated a dangling pointer (and possibly
|
||||||
memory leaks) with Postscript fonts (in src/psaux/psobjs.c).
|
memory leaks) with Postscript fonts (in src/psaux/psobjs.c).
|
||||||
|
|
|
@ -6,4 +6,4 @@ not exactly bugs, but should be considered though:
|
||||||
|
|
||||||
* Add synthesized Unicode charmap processing to the CFF driver.
|
* Add synthesized Unicode charmap processing to the CFF driver.
|
||||||
|
|
||||||
* Implement stem3/counter hints properly in the Postscript hinter
|
* Implement stem3/counter hints properly in the Postscript hinter.
|
||||||
|
|
|
@ -190,7 +190,7 @@ FT_BEGIN_HEADER
|
||||||
CID_Subrs* subrs;
|
CID_Subrs* subrs;
|
||||||
|
|
||||||
/* since FT 2.1 - interface to PostScript hinter */
|
/* since FT 2.1 - interface to PostScript hinter */
|
||||||
void* pshinter;
|
void* pshinter;
|
||||||
|
|
||||||
} CID_FaceRec;
|
} CID_FaceRec;
|
||||||
|
|
||||||
|
|
|
@ -2633,7 +2633,6 @@
|
||||||
FT_Done_Library( FT_Library library )
|
FT_Done_Library( FT_Library library )
|
||||||
{
|
{
|
||||||
FT_Memory memory;
|
FT_Memory memory;
|
||||||
FT_UInt n;
|
|
||||||
|
|
||||||
|
|
||||||
if ( !library )
|
if ( !library )
|
||||||
|
@ -2646,19 +2645,24 @@
|
||||||
library->generic.finalizer( library );
|
library->generic.finalizer( library );
|
||||||
|
|
||||||
/* Close all modules in the library */
|
/* Close all modules in the library */
|
||||||
#if 1
|
#if 1
|
||||||
while ( library->num_modules > 0 )
|
while ( library->num_modules > 0 )
|
||||||
FT_Remove_Module( library, library->modules[0] );
|
FT_Remove_Module( library, library->modules[0] );
|
||||||
#else
|
#else
|
||||||
for ( n = 0; n < library->num_modules; n++ )
|
|
||||||
{
|
{
|
||||||
FT_Module module = library->modules[n];
|
FT_UInt n;
|
||||||
|
|
||||||
|
|
||||||
if ( module )
|
for ( n = 0; n < library->num_modules; n++ )
|
||||||
{
|
{
|
||||||
Destroy_Module( module );
|
FT_Module module = library->modules[n];
|
||||||
library->modules[n] = 0;
|
|
||||||
|
|
||||||
|
if ( module )
|
||||||
|
{
|
||||||
|
Destroy_Module( module );
|
||||||
|
library->modules[n] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -543,7 +543,6 @@
|
||||||
if ( charcode < 0 || charcode > 255 )
|
if ( charcode < 0 || charcode > 255 )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
/* Get code to SID mapping from `cff_standard_encoding'. */
|
/* Get code to SID mapping from `cff_standard_encoding'. */
|
||||||
glyph_sid = CFF_Get_Standard_Encoding( (FT_UInt)charcode );
|
glyph_sid = CFF_Get_Standard_Encoding( (FT_UInt)charcode );
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,8 @@
|
||||||
/* */
|
/* */
|
||||||
/* SIZE FUNCTIONS */
|
/* SIZE FUNCTIONS */
|
||||||
/* */
|
/* */
|
||||||
/* note that we store the global hints in the size's "internal" root */
|
/* Note that we store the global hints in the size's "internal" root */
|
||||||
/* field */
|
/* field. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
static PSH_Globals_Funcs
|
static PSH_Globals_Funcs
|
||||||
CFF_Size_Get_Globals_Funcs( CFF_Size size )
|
CFF_Size_Get_Globals_Funcs( CFF_Size size )
|
||||||
{
|
{
|
||||||
CFF_Face face = (CFF_Face) size->face;
|
CFF_Face face = (CFF_Face)size->face;
|
||||||
CFF_Font* font = face->extra.data;
|
CFF_Font* font = face->extra.data;
|
||||||
PSHinter_Interface* pshinter = font->pshinter;
|
PSHinter_Interface* pshinter = font->pshinter;
|
||||||
FT_Module module;
|
FT_Module module;
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
"pshinter" );
|
"pshinter" );
|
||||||
return ( module && pshinter && pshinter->get_globals_funcs )
|
return ( module && pshinter && pshinter->get_globals_funcs )
|
||||||
? pshinter->get_globals_funcs( module )
|
? pshinter->get_globals_funcs( module )
|
||||||
: 0 ;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,22 +99,24 @@
|
||||||
|
|
||||||
if ( funcs )
|
if ( funcs )
|
||||||
{
|
{
|
||||||
PSH_Globals globals;
|
PSH_Globals globals;
|
||||||
CFF_Face face = (CFF_Face)size->face;
|
CFF_Face face = (CFF_Face)size->face;
|
||||||
CFF_Font* font = face->extra.data;
|
CFF_Font* font = face->extra.data;
|
||||||
CFF_SubFont* subfont = &font->top_font;
|
CFF_SubFont* subfont = &font->top_font;
|
||||||
|
|
||||||
CFF_Private* cpriv = &subfont->private_dict;
|
CFF_Private* cpriv = &subfont->private_dict;
|
||||||
T1_Private priv;
|
T1_Private priv;
|
||||||
|
|
||||||
/* IMPORTANT: the CFF and Type1 private dictionaries have */
|
|
||||||
/* slightly different structures, we need to */
|
/* IMPORTANT: The CFF and Type1 private dictionaries have */
|
||||||
/* synthetize a type1 dictionary on the fly here !! */
|
/* slightly different structures; we need to */
|
||||||
|
/* synthetize a type1 dictionary on the fly here. */
|
||||||
|
|
||||||
{
|
{
|
||||||
FT_UInt n, count;
|
FT_UInt n, count;
|
||||||
|
|
||||||
MEM_Set( &priv, 0, sizeof(priv) );
|
|
||||||
|
MEM_Set( &priv, 0, sizeof ( priv ) );
|
||||||
|
|
||||||
count = priv.num_blue_values = cpriv->num_blue_values;
|
count = priv.num_blue_values = cpriv->num_blue_values;
|
||||||
for ( n = 0; n < count; n++ )
|
for ( n = 0; n < count; n++ )
|
||||||
|
@ -136,20 +138,20 @@
|
||||||
priv.blue_shift = cpriv->blue_shift;
|
priv.blue_shift = cpriv->blue_shift;
|
||||||
priv.blue_fuzz = cpriv->blue_fuzz;
|
priv.blue_fuzz = cpriv->blue_fuzz;
|
||||||
|
|
||||||
priv.standard_width[0] = (FT_UShort) cpriv->standard_width;
|
priv.standard_width[0] = (FT_UShort)cpriv->standard_width;
|
||||||
priv.standard_height[0] = (FT_UShort) cpriv->standard_height;
|
priv.standard_height[0] = (FT_UShort)cpriv->standard_height;
|
||||||
|
|
||||||
count = priv.num_snap_widths = cpriv->num_snap_widths;
|
count = priv.num_snap_widths = cpriv->num_snap_widths;
|
||||||
for ( n = 0; n < count; n++ )
|
for ( n = 0; n < count; n++ )
|
||||||
priv.snap_widths[n] = cpriv->snap_widths[n];
|
priv.snap_widths[n] = cpriv->snap_widths[n];
|
||||||
|
|
||||||
count = priv.num_snap_heights = cpriv->num_snap_heights;
|
count = priv.num_snap_heights = cpriv->num_snap_heights;
|
||||||
for ( n = 0; n < count; n++ )
|
for ( n = 0; n < count; n++ )
|
||||||
priv.snap_heights[n] = cpriv->snap_heights[n];
|
priv.snap_heights[n] = cpriv->snap_heights[n];
|
||||||
|
|
||||||
priv.force_bold = cpriv->force_bold;
|
priv.force_bold = cpriv->force_bold;
|
||||||
priv.language_group = cpriv->language_group;
|
priv.language_group = cpriv->language_group;
|
||||||
priv.lenIV = cpriv->lenIV;
|
priv.lenIV = cpriv->lenIV;
|
||||||
}
|
}
|
||||||
|
|
||||||
error = funcs->create( size->face->memory, &priv, &globals );
|
error = funcs->create( size->face->memory, &priv, &globals );
|
||||||
|
@ -191,31 +193,34 @@
|
||||||
|
|
||||||
|
|
||||||
FT_LOCAL_DEF FT_Error
|
FT_LOCAL_DEF FT_Error
|
||||||
CFF_GlyphSlot_Init( CFF_GlyphSlot slot )
|
CFF_GlyphSlot_Init( CFF_GlyphSlot slot )
|
||||||
{
|
{
|
||||||
CFF_Face face = (CFF_Face) slot->root.face;
|
CFF_Face face = (CFF_Face)slot->root.face;
|
||||||
CFF_Font* font = face->extra.data;
|
CFF_Font* font = face->extra.data;
|
||||||
PSHinter_Interface* pshinter = font->pshinter;
|
PSHinter_Interface* pshinter = font->pshinter;
|
||||||
|
|
||||||
if (pshinter)
|
|
||||||
|
if ( pshinter )
|
||||||
{
|
{
|
||||||
FT_Module module;
|
FT_Module module;
|
||||||
|
|
||||||
module = FT_Get_Module( slot->root.face->driver->root.library, "pshinter" );
|
|
||||||
if (module)
|
module = FT_Get_Module( slot->root.face->driver->root.library,
|
||||||
|
"pshinter" );
|
||||||
|
if ( module )
|
||||||
{
|
{
|
||||||
T2_Hints_Funcs funcs;
|
T2_Hints_Funcs funcs;
|
||||||
|
|
||||||
|
|
||||||
funcs = pshinter->get_t2_funcs( module );
|
funcs = pshinter->get_t2_funcs( module );
|
||||||
slot->root.internal->glyph_hints = (void*)funcs;
|
slot->root.internal->glyph_hints = (void*)funcs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* FACE FUNCTIONS */
|
/* FACE FUNCTIONS */
|
||||||
|
@ -440,12 +445,12 @@
|
||||||
FT_Int num_params,
|
FT_Int num_params,
|
||||||
FT_Parameter* params )
|
FT_Parameter* params )
|
||||||
{
|
{
|
||||||
FT_Error error;
|
FT_Error error;
|
||||||
SFNT_Interface* sfnt;
|
SFNT_Interface* sfnt;
|
||||||
PSNames_Interface* psnames;
|
PSNames_Interface* psnames;
|
||||||
PSHinter_Interface* pshinter;
|
PSHinter_Interface* pshinter;
|
||||||
FT_Bool pure_cff = 1;
|
FT_Bool pure_cff = 1;
|
||||||
FT_Bool sfnt_format = 0;
|
FT_Bool sfnt_format = 0;
|
||||||
|
|
||||||
|
|
||||||
sfnt = (SFNT_Interface*)FT_Get_Module_Interface(
|
sfnt = (SFNT_Interface*)FT_Get_Module_Interface(
|
||||||
|
@ -534,13 +539,13 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
cff->pshinter = pshinter;
|
cff->pshinter = pshinter;
|
||||||
|
|
||||||
/* Complement the root flags with some interesting information. */
|
/* Complement the root flags with some interesting information. */
|
||||||
/* Note that this is only necessary for pure CFF and CEF fonts. */
|
/* Note that this is only necessary for pure CFF and CEF fonts. */
|
||||||
|
|
||||||
root = &face->root;
|
root = &face->root;
|
||||||
|
|
||||||
root->num_glyphs = cff->num_glyphs;
|
root->num_glyphs = cff->num_glyphs;
|
||||||
|
|
||||||
if ( pure_cff )
|
if ( pure_cff )
|
||||||
{
|
{
|
||||||
CFF_Font_Dict* dict = &cff->top_font.font_dict;
|
CFF_Font_Dict* dict = &cff->top_font.font_dict;
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#define FT_COMPONENT trace_cidobjs
|
#define FT_COMPONENT trace_cidobjs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* SLOT FUNCTIONS */
|
/* SLOT FUNCTIONS */
|
||||||
|
@ -54,28 +53,34 @@
|
||||||
|
|
||||||
FT_LOCAL_DEF FT_Error
|
FT_LOCAL_DEF FT_Error
|
||||||
CID_GlyphSlot_Init( CID_GlyphSlot slot )
|
CID_GlyphSlot_Init( CID_GlyphSlot slot )
|
||||||
{
|
{
|
||||||
CID_Face face;
|
CID_Face face;
|
||||||
PSHinter_Interface* pshinter;
|
PSHinter_Interface* pshinter;
|
||||||
|
|
||||||
|
|
||||||
face = (CID_Face) slot->root.face;
|
face = (CID_Face) slot->root.face;
|
||||||
pshinter = face->pshinter;
|
pshinter = face->pshinter;
|
||||||
if (pshinter)
|
|
||||||
|
if ( pshinter )
|
||||||
{
|
{
|
||||||
FT_Module module;
|
FT_Module module;
|
||||||
|
|
||||||
module = FT_Get_Module( slot->root.face->driver->root.library, "pshinter" );
|
|
||||||
if (module)
|
module = FT_Get_Module( slot->root.face->driver->root.library,
|
||||||
|
"pshinter" );
|
||||||
|
if ( module )
|
||||||
{
|
{
|
||||||
T1_Hints_Funcs funcs;
|
T1_Hints_Funcs funcs;
|
||||||
|
|
||||||
|
|
||||||
funcs = pshinter->get_t1_funcs( module );
|
funcs = pshinter->get_t1_funcs( module );
|
||||||
slot->root.internal->glyph_hints = (void*)funcs;
|
slot->root.internal->glyph_hints = (void*)funcs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
@ -87,16 +92,16 @@
|
||||||
static PSH_Globals_Funcs
|
static PSH_Globals_Funcs
|
||||||
CID_Size_Get_Globals_Funcs( CID_Size size )
|
CID_Size_Get_Globals_Funcs( CID_Size size )
|
||||||
{
|
{
|
||||||
CID_Face face = (CID_Face) size->root.face;
|
CID_Face face = (CID_Face)size->root.face;
|
||||||
PSHinter_Interface* pshinter = face->pshinter;
|
PSHinter_Interface* pshinter = face->pshinter;
|
||||||
FT_Module module;
|
FT_Module module;
|
||||||
|
|
||||||
|
|
||||||
module = FT_Get_Module( size->root.face->driver->root.library,
|
module = FT_Get_Module( size->root.face->driver->root.library,
|
||||||
"pshinter" );
|
"pshinter" );
|
||||||
return ( module && pshinter && pshinter->get_globals_funcs )
|
return ( module && pshinter && pshinter->get_globals_funcs )
|
||||||
? pshinter->get_globals_funcs( module )
|
? pshinter->get_globals_funcs( module )
|
||||||
: 0 ;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +111,7 @@
|
||||||
if ( size->root.internal )
|
if ( size->root.internal )
|
||||||
{
|
{
|
||||||
PSH_Globals_Funcs funcs;
|
PSH_Globals_Funcs funcs;
|
||||||
|
|
||||||
|
|
||||||
funcs = CID_Size_Get_Globals_Funcs( size );
|
funcs = CID_Size_Get_Globals_Funcs( size );
|
||||||
if ( funcs )
|
if ( funcs )
|
||||||
|
@ -122,21 +127,21 @@
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
FT_Error error = 0;
|
||||||
PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
|
PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
|
||||||
|
|
||||||
|
|
||||||
if ( funcs )
|
if ( funcs )
|
||||||
{
|
{
|
||||||
PSH_Globals globals;
|
PSH_Globals globals;
|
||||||
CID_Face face = (CID_Face)size->root.face;
|
CID_Face face = (CID_Face)size->root.face;
|
||||||
CID_FontDict* dict = face->cid.font_dicts + face->root.face_index;
|
CID_FontDict* dict = face->cid.font_dicts + face->root.face_index;
|
||||||
T1_Private* priv = &dict->private_dict;
|
T1_Private* priv = &dict->private_dict;
|
||||||
|
|
||||||
|
|
||||||
error = funcs->create( size->root.face->memory, priv, &globals );
|
error = funcs->create( size->root.face->memory, priv, &globals );
|
||||||
if ( !error )
|
if ( !error )
|
||||||
size->root.internal = (FT_Size_Internal)(void*)globals;
|
size->root.internal = (FT_Size_Internal)(void*)globals;
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,13 +152,13 @@
|
||||||
PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
|
PSH_Globals_Funcs funcs = CID_Size_Get_Globals_Funcs( size );
|
||||||
FT_Error error = 0;
|
FT_Error error = 0;
|
||||||
|
|
||||||
|
|
||||||
if ( funcs )
|
if ( funcs )
|
||||||
error = funcs->set_scale( (PSH_Globals)size->root.internal,
|
error = funcs->set_scale( (PSH_Globals)size->root.internal,
|
||||||
size->root.metrics.x_scale,
|
size->root.metrics.x_scale,
|
||||||
size->root.metrics.y_scale,
|
size->root.metrics.y_scale,
|
||||||
0, 0 );
|
0, 0 );
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,10 +248,10 @@
|
||||||
FT_Int num_params,
|
FT_Int num_params,
|
||||||
FT_Parameter* params )
|
FT_Parameter* params )
|
||||||
{
|
{
|
||||||
FT_Error error;
|
FT_Error error;
|
||||||
PSNames_Interface* psnames;
|
PSNames_Interface* psnames;
|
||||||
PSAux_Interface* psaux;
|
PSAux_Interface* psaux;
|
||||||
PSHinter_Interface* pshinter;
|
PSHinter_Interface* pshinter;
|
||||||
|
|
||||||
FT_UNUSED( num_params );
|
FT_UNUSED( num_params );
|
||||||
FT_UNUSED( params );
|
FT_UNUSED( params );
|
||||||
|
@ -269,22 +274,20 @@
|
||||||
if ( !psaux )
|
if ( !psaux )
|
||||||
{
|
{
|
||||||
psaux = (PSAux_Interface*)FT_Get_Module_Interface(
|
psaux = (PSAux_Interface*)FT_Get_Module_Interface(
|
||||||
FT_FACE_LIBRARY( face ), "psaux" );
|
FT_FACE_LIBRARY( face ), "psaux" );
|
||||||
|
|
||||||
face->psaux = psaux;
|
face->psaux = psaux;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pshinter = (PSHinter_Interface*)face->pshinter;
|
pshinter = (PSHinter_Interface*)face->pshinter;
|
||||||
if ( !pshinter )
|
if ( !pshinter )
|
||||||
{
|
{
|
||||||
pshinter = (PSHinter_Interface*)
|
pshinter = (PSHinter_Interface*)FT_Get_Module_Interface(
|
||||||
FT_Get_Module_Interface( FT_FACE_LIBRARY( face ), "pshinter" );
|
FT_FACE_LIBRARY( face ), "pshinter" );
|
||||||
|
|
||||||
face->pshinter = pshinter;
|
face->pshinter = pshinter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* open the tokenizer; this will also check the font format */
|
/* open the tokenizer; this will also check the font format */
|
||||||
if ( FILE_Seek( 0 ) )
|
if ( FILE_Seek( 0 ) )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
|
@ -1177,8 +1177,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compute lengths */
|
/* compute lengths */
|
||||||
for ( n = 0; n < count*2; n += 2 )
|
for ( n = 0; n < count * 2; n += 2 )
|
||||||
stems[n+1] = stems[n+1] - stems[n];
|
stems[n + 1] = stems[n + 1] - stems[n];
|
||||||
|
|
||||||
/* add them to the current dimension */
|
/* add them to the current dimension */
|
||||||
ps_hints_stem( (PS_Hints)hints, dimension, count, stems );
|
ps_hints_stem( (PS_Hints)hints, dimension, count, stems );
|
||||||
|
|
Loading…
Reference in New Issue