Commit Graph

169 Commits

Author SHA1 Message Date
Werner Lemberg c3beb30a21 Add function `ft_property_string_set'.
This is a preparation for handling an `FREETYPE_PROPERTIES'
environment variable to control (some) driver properties.

No change in functionality.

* src/base/ftobjs.c (ft_property_do): Add `value_is_string'
parameter.
(ft_property_string_set): New function.
(FT_Property_Set, FT_Property_Get): Updated.

* include/freetype/internal/ftobjs.h: Updated.

* include/freetype/internal/services/svprop.h
(FT_Properties_SetFunc): Add `value_is_string' parameter.

* src/autofit/afmodule.c (af_property_set), src/cff/cffdrivr.c
(cff_property_set), src/truetype/ttdriver.c (tt_property_set):
Updated, emitting an error currently if `value_is_string' is set.
2016-07-10 07:11:45 +02:00
Werner Lemberg 0b3cb8a8af [cff, truetype] Fix logic for `FT_Property_Set'.
Otherwise some properties could be set to arbitrary values, which is
harmless, but querying could give wrong positive results.

* src/cff/cffdrivr.c (cff_property_set) [hinting-engine],
* src/truetype/ttdriver.c (tt_property_set) [interpreter-version]:
Only allow defined values.
2016-05-05 12:28:48 +02:00
Werner Lemberg 9adeab6452 Update copyright year. 2016-01-13 11:54:10 +01:00
Jan Alexander Steffens (heftig) ccd3188af1 Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
Both the native CFF hinter and the auto-hinter now have a very
similar rendering style.

* include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
longer implies FT_LOAD_FORCE_AUTOHINT.

* include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
macro.

* include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
macro.

* src/cff/cffdrivr.c (cff_driver_class): Use it.

* src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
logic.
2015-11-10 22:33:45 +01:00
Werner Lemberg 4188deacf3 Comments. 2015-10-30 08:07:56 +01:00
Werner Lemberg 5179c89f61 Comments. 2015-10-19 08:49:25 +02:00
Werner Lemberg 066a49139b [cff] Return correct PS names from pure CFF (#46130).
* src/cff/cffdrivr.c (cff_get_ps_name): Use SFNT service only for
SFNT.
2015-10-06 07:55:32 +02:00
Werner Lemberg 3cc076dae7 [cff] Use `name' table for PS name if we have a SFNT-CFF.
This follows the OpenType 1.7 specification.  See

  http://tug.org/pipermail/tex-live/2015-April/036634.html

for a discussion.

* src/cff/cffdrivr.c (cff_get_ps_name): Use the `sfnt' service if we
have an SFNT.
2015-04-28 09:16:27 +02:00
Werner Lemberg 5cd2155113 [cff] Update advance width handling to OpenType 1.7.
Problem reported by Behdad.

* src/cff/cffdrivr.c (cff_get_advances): Handle SFNT case
separately.

* src/cff/cffgload.c (cff_slot_load): Use advance width and side
bearing values from `hmtx' table if present.
2015-04-10 07:01:01 +02:00
Werner Lemberg a451638ec5 Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.
* include/internal/ftserv.h (FT_SERVICE_XFREE86_NAME_H): Renamed
to...
(FT_SERVICE_FONT_FORMAT_H): This.

* include/internal/services/svfntfmt.h (FT_XF86_FORMAT_*): Renamed
to ...
(FT_FONT_FORMAT_*): This.

src/base/ftfntfmt.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c,
src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type42/t42drivr.c, src/winfonts/winfnt.c: Updated.
2015-03-11 08:55:12 +01:00
Werner Lemberg 851e815127 Various compiler warning fixes for `make multi'.
* src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
af_latin_hint_edges), src/autofit/aflatin2.c
(af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
as `static'.

* src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
Removed.  Unused.
* src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
* src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed.  Unused.

* src/cff/cf2intrp.c: Include `cf2intrp.h'.
* src/cff/cffdrivr.c (PAIR_TAG): Removed.  Unused.

* src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed.  Unused.

* src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.

* src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
Removed.  Unused.

* src/raster/ftraster.c (Render_Glyph): Declare as `static'.

* src/sfnt/ttpost.c (load_format_20): Fix signedness warning.

* src/truetype/ttdriver.c (PAIR_TAG): Removed.  Unused.
* src/truetype/ttsubpix.c (is_member_of_family_class,
is_member_of_style_class): Declare as `static'.

* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
as `static'.
* src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
`static'.
(T1_FIELD_COUNT): Removed.  Unused.
* src/type1/t1parse.h (T1_Done_Table): Removed.  Unused.

* src/type42/t42parse.c (T1_Done_Table): Removed.  Unused.
2015-03-01 19:27:09 +01:00
Werner Lemberg 3a8d0537b5 [cff] Signedness fixes for basic infrastructure and old engine.
* include/internal/pshints.h, src/cff/cffdrivr.c,
src/cff/cffgload.c, src/cff/cffgload.h, src/cff/cffload.c,
src/cff/cffobjs.c, src/cff/cffparse.c, src/pshinter/pshrec.c: Apply.
2015-02-20 08:35:32 +01:00
Werner Lemberg f57fc59e01 Run `src/tools/update-copyright'. 2015-01-17 20:41:43 +01:00
Werner Lemberg 5018477f4e Minor. 2014-12-07 08:17:12 +01:00
Werner Lemberg ffee64afb8 Better tracing of loaded glyphs.
Previously, the loading of a glyph was traced at level 4, if at all.
With this change, all font loading routines emit a tracing message
at level 1, making it easier to select tracing output (for example
using F2_DEBUG="any:1 afhints:7 aflatin:7").

* src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message.
* src/cff/cffdrivr.c (cff_glyph_load): Ditto.
* src/cff/cffgload.c (cff_decoder_prepare): Improve tracing
messages.
* src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing
message.
* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto.
* src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message.
* src/truetype/ttgload.c (TT_Load_Glyph): Ditto.
* src/type1/t1gload.c (T1_Load_Glyph): Ditto.
* src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
2013-08-26 12:55:48 +02:00
Werner Lemberg b8850fc1fd [cff] Add darkening limit to `darkening-parameters'.
* src/cff/cffdrivr.c (cff_property_set): Add check.
2013-06-26 12:22:10 +02:00
Werner Lemberg 89ca1fd6d7 [cff] Add `darkening-parameters' property.
* include/freetype/ftcffdrv.h: Document it.

* src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
`darkening-parameters' property.

* src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array.

* src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams'
argument and use it.
Update all callers.

* src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy
`darken_params' values.

* src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array.

* src/cff/cffobjs.c (cff_driver_init): Set default values for
`darken_params'.
2013-06-25 23:28:02 +02:00
Werner Lemberg 2429dc3d7c Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option.
This controls whether the old FreeType CFF engine gets compiled into
FreeType.  It is now disabled by default.

* devel/ftoption.h, include/freetype/config/ftoption.h
(CFF_CONFIG_OPTION_OLD_ENGINE): New macro.

* src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c
(CFF_Operator, cff_argument_counts, cff_builder_add_point,
cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load),
src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use
CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code.

* docs/CHANGES: Updated.
2013-06-03 12:41:58 +02:00
Werner Lemberg f6aa089f12 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code. 2013-05-10 07:58:47 +02:00
Werner Lemberg 06474c3e5b [cff] Add a new Type 2 interpreter and hinter.
This work, written by Dave Arnold <darnold@adobe.com> and fully
integrated into FreeType by me, is a donation by Adobe in
collaboration with Google.  It is vastly superior to the old CFF
engine, and it will replace it soon.  Right now, it is still off by
default, and you have to explicitly select it using the new
`hinting-engine' property of the cff driver.

For convenience, (most of) the new files are committed separately.

* include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro.
* include/freetype/ftcffdrv.h: New file to access CFF driver
properties.
* include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error
code.
* include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints',
and `cf2interp'.

* src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'.
* src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine'
and `no_stem_darkening'.
* src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'.

* src/cff/cff.c: Include new files.
* src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle
`hinting-engine' and `no-stem-darkening' properties (only the Adobe
engine listens to them).
* src/cff/cffgload.c: Include `cf2ft.h'.
(cff_decoder_prepare): Initialize `current_subfont'.
(cff_build_add_point): Handle Adobe engine which uses 16.16
coordinates.
(cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING
separately.
Choose rendering engine based on `hinting_engine' property.
* src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe
engine.
* src/cff/cffobjs.c: Include FT_CFF_DRIVER_H.
(cff_driver_init): Set default property values.

* src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files.

* src/cff/cf2*.*: New files, containing the Adobe engine.
2013-04-13 18:53:28 +02:00
Werner Lemberg fc185ef41a Add framework for CFF properties.
* include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC7):
New macro.

* src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H.
(cff_property_set, cff_property_get): New function, still empty.
Define `cff_service_properties' service.
Update `cff_services'.

* src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H.
(CFF_SERVICE_PROPERTIES_GET): New macro.
CffModulePIC: Add `cff_service_properties'.
2013-04-12 19:48:06 +02:00
Werner Lemberg e3c9301581 */*: Use FT_Err_Ok only.
This is a purely mechanical conversion.
2013-03-14 11:21:17 +01:00
Werner Lemberg 059bc335ce */*: Use `FT_THROW'.
This is essentially a mechanical conversion, adding inclusion of
`FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for
stand-alone compiling modes of the rasterizer modules.

To convert the remaining occurrences of FT_Err_XXX and friends it is
necessary to rewrite the code.  Note, however, that it doesn't harm
if some cases are not handled since FT_THROW is a no-op.
2013-03-14 10:27:35 +01:00
Werner Lemberg d9bf44a430 [autofit, cff, pshinter, psnames] More renamings for orthogonality.
* src/autofit/afmodule.c, src/autofit/afpic.h:
s/AF_AUTOFITTER_/AF_/.

* src/cff/cffdrivr.c, src/cff/cffobjs.c, src/cff/cffparse.c,
src/cff/cffpic.h: s/FT_CFF_/CFF_/.

* src/pshinter/pshmod.c, src/pshinter/pshpic.h:
s/FT_PSHINTER_/PSHINTER_/.

* src/psnames/psmodule.c, src/psnames/pspic.h:
s/FT_PSCMAPS/PSCMAPS_/.
2012-08-27 08:41:43 +02:00
Werner Lemberg 6b5b6f39e7 Prepare source code for amalgamation (6/6).
* src/cff/cffdrivr.c: s/Load_Glyph/cff_glyph_load/.

* src/cid/cidload.c: s/parse_font_matrix/cid_parse_font_matrix/.
s/t1_init_loader/cid_init_loader/.
s/t1_done_loader/cid_done_loader/.

* src/pxaux/t1cmap.c: s/t1_get_glyph_name/psaux_get_glyph_name/.

* src/truetype/ttdriver.c: s/Load_Glyph/tt_glyph_load/.

* src/type1/t1load.c: s/parse_font_matrix/t1_parse_font_matrix/.
2012-02-24 12:26:25 +01:00
suzuki toshiya 1749d8bc6a Remove trailing spaces. 2012-01-17 02:00:24 +09:00
suzuki toshiya 226f361975 Fix PIC build broken by d9145241fe.
Under PIC configuration, FT_{CFF,PSCMAPS,SFNT,TT}_SERVICES_GET
take no arguments but derefer the variable named `library'
internally.

* src/cff/cffdrivr.c (cff_get_interface): Declare `library' and
set it if non-NULL driver is passed.
* src/truetype/ttdriver.c (tt_get_interface): Ditto.

* src/sfnt/sfdriver.c (sfnt_get_interface): Declare `library'
under PIC configuration, and set it if non-NULL module is given.
* src/psnames/psmodule.c (psnames_get_interface): Ditto.
2012-01-14 06:40:03 +09:00
Werner Lemberg c52f44d4fd Whitespace. 2011-11-30 10:46:53 +01:00
Werner Lemberg f8f576d1d4 Addition to last commit. 2011-11-26 18:07:30 +01:00
Chris Liddell 8b90cf0b42 Add FT_Get_PS_Font_Value() API.
This allows a Type 1 font face to be interrogated to retrieve most
of the dictionary keys (keys not relevant to FreeType's Type 1
interpreter are not available).

* include/freetype/internal/services/svpsinfo.h
(PS_GetFontValueFunc): New typedef.
(PSInfo): Add `ps_get_font_value'.
(FT_DEFINE_SERVICE_PSINFOREC): Updated.

* include/freetype/internal/t1types.h (T1_EncodingType): Moved to...
* include/freetype/t1tables.h: Here.
(PS_Dict_Keys): New enumeration.
(FT_Get_PS_Font_Value): New declaration.

* src/base/fttype1.c (FT_Get_PS_Font_Value): New function.

* src/type1/t1driver.c (t1_ps_get_font_value): This new function
does the real job.
(t1_service_ps_info): Add it.

* src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c
(cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info):
Updated.
2011-11-13 16:30:59 +01:00
suzuki toshiya e62c876bb0 Fix g++4.6 compiler warnings in module drivers.
The background is same with previous commit.

* src/truetype/ttgxvar.c (ft_var_readpackedpoints):
Init `points'.  (TT_Vary_Get_Glyph_Deltas): Init
`delta_xy'.  (TT_Get_MM_Var): Init `mmvar'.
* src/type1/t1load.c (T1_Get_MM_Var): Ditto.
* src/cff/cffdrivr.c (cff_ps_get_font_info): Init
`font_info'.
* src/cff/cffload.c (cff_index_get_pointers): Init `t'.
(cff_font_load): Init `sub'.
* src/cff/cffobjs.c (cff_size_init): Init `internal'.
(cff_face_init): Init `cff'.
* src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps):
Init `snaps'.
* src/pcf/pcfread.c (pcf_get_properties): Init `properties'.
(pcf_get_bitmaps): Init `offsets'.  (pcf_get_encodings):
Init `tmpEncoding'.
* src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'.
* src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'.
* src/cache/ftcmru.c (FTC_MruList_New): Init `node'.
* src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and
`zip_buff'.
* src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'.
* src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
2011-06-15 02:48:33 +09:00
Werner Lemberg f765e4403c */*: Use module specific error names where appropriate. 2010-06-24 10:34:29 +02:00
Werner Lemberg 03b3da8bb6 Improve CFF string (especially glyphname) lookup performance.
We do this by avoiding memory allocation and file I/O.  This is
Savannah patch #7104.

* src/cff/cfftypes.h: Include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(CFF_SubFontRec): Remove `num_local_subrs'.
(CFF_FontRec): Add `num_strings', `strings', and `string_pool'
fields.
Remove `string_index' and `num_global_subrs' fields.
Use real types instead of `void' for `pshinter' and `psnames' fields.

* src/cff/cffload.c: Don't include PS cmaps service.
(cff_index_get_pointers): Add `pool' parameter which allows to
insert an extra NUL character for each String INDEX entry.
(cff_index_get_name): Make it a local function.
(cff_index_get_string): New function.
(cff_subfont_load): Updated.
(cff_font_load): Initialize `num_strings', `strings', and
`string_pool' fields in the `CFF_FontRec' structure.
(cff_index_get_sid_string): Use `cff_index_get_string' instead of
`cff_index_get_name'.
(cff_font_done): Updated.

* src/cff/cffload.h: Don't include PS cmaps service.
(cff_index_get_string): Added.
(cff_index_get_sid_string): Updated.

* src/cff/cffobjs.c: Don't include PS cmaps service and
FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_size_get_globals_funcs, cff_slot_init): Updated.
(cff_face_init): Follow `cff_index_get_name',
`cff_index_get_string', and `cff_index_get_sid_string' changes.

* src/cff/cffcmap.c (cff_sid_free_glyph_name): Removed.
(cff_sid_to_glyph_name): Use `cff_index_get_cid_string'.
(cff_cmap_unicode_init): Updated.

* src/cff/cffdrivr.c: Don't include PS cmap service.
(cff_get_glyph_name): Avoid unnecessary lookup for POSTSCRIPT_CMAPS
service.
(cff_get_glyph_name, cff_ps_get_font_info, cff_get_ros): Follow API
`cff_index_get_sid_string' change.
(cff_get_name_index): Use `cff_index_get_string' instead of
`cff_index_get_name'.

* src/cff/cffgload.c: Don't include FT_INTERNAL_POSTSCRIPT_HINTS_H.
(cff_decoder_init, cff_decoder_prepare): Updated.
2010-03-02 13:00:55 +01:00
suzuki toshiya d9145241fe Prevent NULL pointer dereference passed to FT_Module_Requester. 2010-02-05 02:58:24 +09:00
suzuki toshiya e866cf3f55 Improve bitmap size or pixel variables for 16-bit systems. 2009-08-01 00:32:06 +09:00
suzuki toshiya 072e55233e cff: Cast the long variables to 32-bit for LP64 systems. 2009-08-01 00:30:23 +09:00
Werner Lemberg 858abbedc0 For warning messages, replace FT_ERROR with FT_TRACE0.
FT_ERROR is now used only if a function produces a non-zero `error'
value.

Formatting, improving and harmonizing debug strings.
2009-06-26 06:15:41 +02:00
Oran Agra cb3b61416b Position Independent Code (PIC) support in cff driver.
* include/freetype/internal/services/svcid.h add macros to init
instances of FT_Service_CIDRec.
* include/freetype/internal/services/svpsinfo.h add macros to init
instances of FT_Service_PsInfoRec.

* src/cff/cffcmap.h declare cff_cmap_encoding_class_rec
and cff_cmap_unicode_class_rec using macros from
ftobjs.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/cff/cffcmap.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
cff_cmap_encoding_class_rec and cff_cmap_unicode_class_rec
will have functions to init or create and destroy them
instead of being allocated in the global scope.

* src/cff/cffdrivr.h declare cff_driver_class using macros from
ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy
functions will be declared.
* src/cff/cffdrivr.c when FT_CONFIG_OPTION_PIC is defined
the following structs:
cff_service_glyph_dict, cff_service_ps_info, cff_service_ps_name
cff_service_get_cmap_info, cff_service_cid_info, cff_driver_class,
and cff_services array
will have functions to init or create and destroy them
instead of being allocated in the global scope.
And macros will be used from cffpic.h in order to access them
from the pic_container.
Use macros from cffpic.h in order to access the
structs allocated in cffcmap.c

* src/cff/cffobjs.c Use macros from cffpic.h in order to access the
structs allocated in cffcmap.c

* src/cff/parser.c when FT_CONFIG_OPTION_PIC is defined
implement functions to create and destroy cff_field_handlers array
instead of being allocated in the global scope.
And macros will be used from cffpic.h in order to access it
from the pic_container.

New Files:
* src/cff/cffpic.h declare struct to hold PIC globals for cff
driver and macros to access them.
* src/cff/cffpic.c implement functions to allocate, destroy and
initialize PIC globals for cff driver.

* src/cff/cff.c add new file to build: cffpic.c.
* src/cff/jamfile add new files to FT2_MULTI build: cffpic.c.
2009-04-05 18:12:03 +03:00
Werner Lemberg 86e041b5a8 Remove redundant header inclusions.
This covers many Ghostscript Coverity issues.

* src/*: Do it.
2009-03-21 08:51:44 +01:00
Werner Lemberg b66efefdcd Fix some FreeType Coverity issues as reported for Ghostscript.
* src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize
`args.stream' (#3874, #3875).
(open_face_PS_from_sfnt_stream): Improve error management (#3786).
* src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice'
(#3870).
* src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead
code (#3790).
* src/base/ftrfork.c (raccess_guess_apple_generic): Check error
value of `FT_Stream_Skip' (#3784).

* src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing
it (#3872)

* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing
it (#3871).
* src/pcf/pcfread.c (pcf_get_metrics): Handle return value of
`pcf_get_metric' (#3789, #3782).
(pcf_get_properties): Use FT_STREAM_SKIP (#3783).

* src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of
`acache' (#3797)

* src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff'
(#3796).
* src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795).
* src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794).

* src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom'
(#3793).
(_bdf_parse_start): Add comment (#3792).

* src/raster/ftraster.c (Finalize_Profile_Table): Check
`ras.fProfile' (#3791).

* src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785).

* src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore
seek error (#3781).
2009-03-12 08:07:49 +00:00
Werner Lemberg 07e818170f Extend CID service functions to handle CID-keyed CFFs as CID fonts.
* include/freetype/ftcid.h (FT_Get_CID_Is_Internally_CID_keyed,
FT_Get_CID_From_Glyph_Index): New functions.

* include/freetype/internal/services/svcid.h
(FT_CID_GetIsInternallyCIDKeyedFunc,
FT_CID_GetCIDFromGlyphIndexFunc): New function typedefs.
(CID Service): Use them.

* src/base/ftcid.c: Include FT_CID_H.
(FT_Get_CID_Is_Internally_CID_keyed, FT_Get_CID_From_Glyph_Index):
New functions.

* src/cff/cffdrivr.c (cff_get_is_cid, cff_get_cid_from_glyph_index):
New functions.
(cff_service_cid_info): Add them.
* src/cff/cffload.c (cff_font_load): Don't free `font->charset.sids'
-- it is needed for access as a CID-keyed font.  It gets deleted
later on.

* src/cid/cidriver.c (cid_get_is_cid, cid_get_cid_from_glyph_index):
New functions.
(cid_service_cid_info): Add them.

* docs/CHANGES: Updated.
2009-03-11 21:29:54 +00:00
David Turner 01ca4da203 Remove ABI-breaking field in public PS_InfoFontRec definition.
Instead, we define a new internal PS_FontExtraRec structure to
    hold the additionnal field, then place it in various internal
    positions of the corresponding FT_Face derived objects.
2009-03-03 13:28:59 +00:00
Werner Lemberg 14de111f72 Fix Savannah bug #25669.
* src/base/ftadvanc.h (FT_Get_Advances): Fix serious typo.

* src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Fix
scaling factor for non-scalable fonts.

* src/cff/cffdrivr.c (cff_get_advances): Use correct advance width
value to prevent incorrect scaling.

* docs/CHANGES: Document it.
2009-02-24 21:34:51 +00:00
Suzuki, Toshiya (鈴木俊哉) 759c07d149 load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_Int32 to match the flags of FT_Load_Glyph() 2009-01-09 11:11:53 +00:00
Suzuki, Toshiya (鈴木俊哉) a7c00b79e0 load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_UInt32 for 16-bit platforms 2009-01-09 07:21:16 +00:00
Werner Lemberg 312043f41b * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field.
This fixes Savannah bug #24819.

Document `format' field of TT_CMapInfo.
2008-11-12 06:29:41 +00:00
Werner Lemberg b211651ac9 * autogen.sh, builds/unix/configure.raw,
include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor
beautifying.

* include/freetype/ftadvanc.h, include/freetype/ftgasp.h,
include/freetype/ftlcdfil.h: Protect against FreeType 1.
Some other minor fixes.

* devel/ftoption.h: Synchronize with
include/freetype/config/ftoption.h.

Formatting, documentation improvements.
2008-09-12 16:27:48 +00:00
David Turner 28534d616b * include/freetype/ftadvanc.h, src/base/ftadvanc.c,
include/freetype/config/ftheader.h, include/freetype/freetype.h,
    src/base/Jamfile, src/base/rules.mk, src/cff/cffdrivr.c,
    src/cff/cffgload.c, src/cff/cffgload.h, src/truetype/ttdriver.c,
    src/truetype/ttgload.h, src/truetype/ttgload.c, src/type1/t1driver.c,
    src/type1/t1gload.h, src/type1/t1gload.c:
    Add a new header named FT_ADVANCES_H declaring some new APIs
    to extract the advances of one or more glyphs without necessarily
    loading their outlines. Also provide 'fast loaders' for the
    TrueType, Type1 and CFF font drivers (more to come later)

    * autogen.sh: add checks for minimum version of the 'autotools'
    stuff.
2008-09-01 21:35:21 +00:00
Werner Lemberg 048b756389 * src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if
integer part is zero.
2008-04-13 05:55:36 +00:00
Werner Lemberg 210d61894b Fix support for subsetted CID-keyed CFFs.
* include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED,
FT_IS_CID_KEYED): New macros.

* src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the
maximum CID value in CID-keyed CFFs.
Handle FT_FACE_FLAG_CID_KEYED flag.

* docs/CHANGES: Document it.


Fix CFF font matrix calculation and improve precision.

* src/cff/cffparse.c (cff_parse_real): Increase precision if integer
part is zero.
(cff_parse_font_matrix): Simplify computation of `units_per_em';
this prevents overflow also.


Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts.

* src/cid/cidriver.c: Include FT_SERVICE_CID_H.
(cid_get_ros): New function.
(cid_service_cid_info): New service structure.
(cid_services): Register it.
2008-04-01 05:55:48 +00:00
Werner Lemberg ef915c36f4 * docs/CHANGES: Updated.
Add new service for getting the ROS from a CID font.

* include/freetype/config/ftheader.h (FT_CID_H): New macro.
* include/freetype/ftcid.h: New file.

* include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro.
* include/freetype/internal/services/svcid.h: New file.

* src/base/ftcid.c: New file.

* src/cff/cffdrivr.c: Include FT_SERVICE_CID_H.
(cff_get_ros): New function.
(cff_service_cid_info): New service structure.
(cff_services): Register it.

* src/cff/cffload.c (cff_font_done): Free registry and ordering.

* src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'.

* modules.cfg (BASE_EXTENSIONS): Add ftcid.c.
2007-07-16 20:46:05 +00:00
Werner Lemberg 2f10956744 Add support for postscript name service to CFF driver.
* src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_NAME_H.
(cff_get_ps_name): New function.
(cff_service_ps_name): New service structure.
(cff_services): Register it.
2007-07-11 05:32:00 +00:00
Werner Lemberg 1e1b6dff54 * src/pfr/pfrcmap.c: Include pfrerror.h.
* src/autofit/afindic.c: Add some external declarations to pacify
`make multi' compilation.

* src/cid/cidgload.c (cid_load_glyph): Pacify compiler.

* src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c
(cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP),
src/autofit/aflatin.c (af_latin_hints_compute_edges),
src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c
(tt_face_get_metrics), src/base/ftobjs.c (open_face)
[FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler.

* docs/release: Mention test compilation targets.
2007-07-07 07:30:40 +00:00
David Turner c0f9c4aadd introduce ft_mem_dup, ft_mem_strdup and ft_mem_strcpyn, and the corresponding
macros to use them (e.g. FT_STRDUP, FT_DUP and FT_STRCPYN)

modify the code to use them instead of raw mallocs/strcpy
2007-02-12 14:55:03 +00:00
Werner Lemberg 8f47453b6a * src/cff/cffdrivr.c (cff_get_name_index): Protect against NULL
pointer.
2007-02-07 08:31:01 +00:00
Werner Lemberg b4142d5126 Whitespace and spelling fixes from Alexei.
Formatting, copyright years.
2007-01-17 12:45:26 +00:00
David Turner 2212272992 * src/autofit/aflatin.c, src/cff/cffdriver.c, src/truetype/ttobjs.c,
src/truetype/ttinterp.c: fixing compiler warnings
2007-01-16 20:06:44 +00:00
Werner Lemberg ac250b228a Add FT_Get_PS_Font_Info interface to CFF driver.
* src/cff/cfftypes.h: Include FT_TYPE1_TABLES_H.
(CFF_FontRec): Add `font_info' field.

* src/cff/cffload.c: Include FT_TYPE1_TABLES_H.
(cff_font_done): Free font->font_info if necessary.

* src/cff/cffdrvr.c (cff_ps_get_font_info): New function.
(cff_service_ps_info): Register cff_ps_get_font_info.
2007-01-13 14:01:36 +00:00
David Turner cda2d957dc * builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
      include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
      include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
      include/freetype/internal/ftdriver.h,
      include/freetype/internal/ftmemory.h,
      include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
      include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
      include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
      src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
      src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
      src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
      src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
      src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
      src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
      src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:

    massive changes to the internals to respect the internal object layouts
    and exported functions of FreeType 2.1.7. Note that the cache sub-system
    cannot be fully retrofitted, unfortunately.
2006-02-16 22:45:31 +00:00
Werner Lemberg f1c2b91e14 Formatting, copyright year updates.
Decorate long constants with `L' and `UL' where appropriate.
2006-01-13 14:53:28 +00:00
Wu, Chia-I (吳佳一) fa7d6ab217 * include/freetype/internal/sfnt.h (SFNT_Interface): New method
`load_strike_metrics' used to load the strike's metrics.

* src/sfnt/sfdriver.c, src/sfnt/ttsbit.c, src/sfnt/ttsbit.h,
src/sfnt/ttsbit0.c: New function `tt_face_load_strike_metrics'.

* src/pfr/pfrobjs.c (pfr_face_init): Set FT_Bitmap_Size correctly.

* src/winfonts/winfnt.c (FNT_Face_Init): Use `nominal_point_size' for
nominal size unless it is obviously incorrect.

* include/freetype/freetype.h (FT_Bitmap_Size): Update the comments on
FNT driver.


Introduce new size selection interface.

* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_):
Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
`select_size'.

* include/freetype/freetype.h (FT_Select_Size, FT_Size_Request_Type,
FT_Size_Request, FT_Request_Size, FT_Select_Size), src/base/ftobjs.c
(FT_Select_Size, FT_Request_Size): API additions to export the new
size selection interface.

* src/base/ftobjs.c (FT_Set_Char_Size, FT_Set_Pixel_Sizes): Use
`FT_Request_Size'.

* include/freetype/internal/ftobjs.h (FT_Match_Size),
src/base/ftobjs.c (FT_Match_Size): New function to match a size
request against `available_sizes'.  Drivers supporting bitmap strikes
can use this function to implement `request_size'.

* src/bdf/bdfdrivr.c, src/cid/cidobjs.c, src/cid/cidobjs.h,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42drivr.c,
src/type42/t42objs.c, src/type42/t42objs.h, src/winfonts/winfnt.c:
Update to new size selection interface.

* src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffobjs.c,
src/cff/cffobjs.h, src/truetype/ttdriver.c, src/truetype/ttgload.c,
src/truetype/ttobjs.c, src/truetype/ttobjs.h: Update to new size
selection interface.
Make `strike_index' FT_ULong and always defined.
Use `load_strike_metrics' provided by SFNT interface.
2006-01-13 12:21:31 +00:00
Werner Lemberg f13516c832 Various fixes for C and C++ compiling.
* src/autofit/*: Add copyright messages.
  Formatting.

* src/autofit/afhints.c (af_glyph_hints_done): Don't use
`AF_Dimension' but `int' for loop counter.

* src/autofit/aflatin.c (af_latin_metrics_init_widths): Don't use
`AF_Dimension' but `int' for loop counter.
Use proper enumeration value for `render_mode'.
(af_latin_metrics_scale_dim): Don't shadow variables.
(af_latin_hints_compute_segments): Use proper cast for `major_dir'
and `segment_dir'.
(af_latin_align_linked_edge, af_latin_hint_edges): Fix arguments of call to
`af_latin_compute_stem_width'.
(af_latin_hints_apply): Don't use `AF_Dimension' but `int' for loop
counter.

* src/base/ftdbgmem.c (ft_mem_table_get_source, FT_DumpMemory): Use
proper cast for memory allocation.

* src/cff/cffdrivr.c (cff_get_kerning): Use proper cast for
initialization of `sfnt'.

* src/sfnt/sfdriver.c: Include `ttkern.h'.

* src/sfnt/ttkern.c (tt_face_get_kerning): Don't shadow variables.

* src/truetype/ttgload.c: Include `ttpload.h'.

* src/truetype/ttpload.c (tt_face_load_loca) [FT_OPTIMIZE_MEMORY]:
Remove redundant variable.
2005-03-03 17:09:08 +00:00
Werner Lemberg e793092d0a Formatting.
* src/truetype/ttpload.c (tt_face_load_loca): Fix typo.

* src/sfnt/ttkern.c: Include `ttkern.h'.
(FT_COMPONENT): Updated.

* include/freetype/internal/fttrace.h: Add entry for `ttkern'.

* src/sfnt/ttsbit0.c: s/FT_Err_/SFNT_Err_/.
Decorate constants with `U' and `L' where necessary.

* src/sfnt/ttcmap.c (tt_cmap4_next): Remove unused variable.
2005-03-01 02:13:50 +00:00
David Turner e5680279b2 * many, many files: several memory optimizations were implemented to
drastically reduce the heap usage of FreeType, especially in the case
  of memory-mapped files. The idea is to avoid loading and decoding tables
  in the heap, and instead access the raw data whenever possible (i.e.
  when it doesn't compromise performance).

  This had several impacts: first, opening vera.ttf uses a ridiculous amount
  of memory (when the FT_Library footprint is accounted for), until you start
  loading glyphs. Even then, you'll save at least 20 Kb compared to the non
  optimized case. performance of various operations, including open/close
  has also been dramatically improved.

  More optimisations to come. The auto-hinter eats memory like crazy? This
  must be stopped...
2005-02-26 00:12:04 +00:00
Werner Lemberg 3605e470c1 Add new function FT_Get_PS_Font_Private().
* include/freetype/internal/services/svpsinfo.h
(PS_GetFontPrivateFunc): New service function.

* include/freetype/t1tables.h, src/base/fttype1.c
(FT_Get_PS_Font_Private): New function.

* src/type1/t1driver.c (t1_ps_get_font_private): New function.
(t1_service_ps_info): Updated.

* src/cff/cffdrivr.c (cff_service_ps_info): Updated.
* src/cid/cidriver.c (cid_service_ps_info): Updated.
* src/type42/t42drivr.c (t42_ps_get_font_private): New function.
(t42_service_ps_info): Updated.

* src/type42/t42parse.c (t42_parse_dict): Remove compiler warning.
2004-11-12 07:02:45 +00:00
Werner Lemberg 2b54eba36b * src/cff/cffobjs.c (cff_size_done, cff_size_init, cff_size_reset,
cff_slot_done, cff_slot_init, cff_face_init, cff_face_done): Access
root fields directly.
* src/cff/cffdrivr.c (Load_Glyph): Access root fields directly.

* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Save current
frame before calling TT_Vary_Get_Glyph_Deltas.

* src/pcf/pcfdrivr.c (PCF_CMapRec): Rename `cmap' to `root' for
consistency.
(pcf_cmap_init, pcf_cmap_done, pcf_cmap_char_index,
pcf_cmap_char_next): Don't use PCF_XXX but FT_XXX arguments which
are typecast to the proper PCF_XXX types within the function.
Update code accordingly.
(pcf_cmap_class): Remove casts.
(PCF_Face_Done, PCF_Face_Init, PCF_Set_Pixel_Size): Don't use
PCF_XXX but FT_XXX arguments which are typecast to the proper
PCF_XXX types within the function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(PCF_Set_Point_Size): New wrapper function.
(PCF_Glyph_Load, pcf_driver_requester): Use FT_CALLBACK_DEF.
(pcf_driver_class): Remove casts.
2004-05-07 07:08:14 +00:00
Werner Lemberg 3bcad43998 * src/truetype/ttobjs.c (tt_driver_done): Fix typo.
* src/bdf/bdfdrivr.c (BDF_Face_Done, BDF_Face_Init,
BDF_Set_Pixel_Size): Don't use BDF_XXX but FT_XXX arguments which
are typecast to the proper BDF_XXX types within the function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(BDF_Set_Point_Size): New wrapper function.
(bdf_driver_class): Remove casts.

* src/cff/cffdrivr.c (Get_Kerning, Load_Glyph, cff_get_interface):
Don't use CFF_XXX but FT_XXX arguments which are typecast to the
proper CFF_XXX types within the function.
Update code accordingly.
Use FT_CALLBACK_DEF throughout.
(cff_driver_class): Remove casts.

* src/cff/cffobjs.h, src/cff/cffobjs.c (cff_size_done,
cff_size_init, cff_size_reset, cff_slot_done, cff_slot_init,
cff_face_init, cff_face_done, cff_driver_init, cff_driver_done):
Don't use CFF_XXX but FT_XXX arguments which are typecast to the
proper CFF_XXX types within the function.
Update code accordingly.
(cff_point_size_reset): New wrapper function.

* src/cid/cidobjs.h, src/cid/cidobjs.c (cid_slot_done,
cid_slot_init, cid_size_done, cid_size_init, cid_size_reset,
cid_face_done, cid_face_init, cid_driver_init, cid_driver_done):
Don't use CID_XXX but FT_XXX arguments which are typecast to the
proper CID_XXX types within the function.
Update code accordingly.
(cid_point_size_reset): New wrapper function.

* src/cid/cidgload.c, src/cid/cidgload.h (cid_slot_load_glyph):
Don't use CID_XXX but FT_XXX arguments which are typecast to the
proper CID_XXX types within the function.
Update code accordingly.

* src/cid/cidriver.c (cid_get_interface):
Don't use CID_XXX but FT_XXX arguments which are typecast to the
proper CID_XXX types within the function.
Update code accordingly.
Use FT_CALLBACK_DEF.
(t1cid_driver_class): Remove casts.

* src/truetype/ttdriver.c (tt_get_interface): Use FT_CALLBACK_DEF.
* src/truetype/ttgxvar.c (ft_var_load_avar): Don't free non-local
variables (this is done later).
(ft_var_load_avar): Fix call to FT_FRAME_ENTER.
(TT_Get_MM_Var): Fix size for `fvar_fields'.
(TT_Vary_Get_Glyph_Deltas): Handle deallocation of local variables
correctly.

* src/base/ftdbgmem.c (ft_mem_debug_realloc): Don't abort if
current size is zero.
2004-05-06 11:48:35 +00:00
Werner Lemberg bfb712fb36 Add embedded bitmap support to CFF driver.
* src/cff/cffobjs.h (CFF_SizeRec): New structure.

* src/cff/cffgload.c (cff_builder_init): Updated.
(cff_slot_load): Updated.
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Load sbit.

* src/cff/cffobjs.c (sbit_size_reset)
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New function.
(cff_size_get_globals_funcs, cff_size_done, cff_size_init): Updated.
(cff_size_reset): Updated.
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Call sbit_size_reset.

* src/cff/cffdrivr.c (Load_Glyph): Updated.
(cff_driver_class): Use CFF_SizeRec.

* docs/CHANGES: Updated.
2004-03-03 08:21:12 +00:00
Werner Lemberg 8f1edf742e * src/base/ftstroke.c (FT_Glyph_StrokeBorder): Fix enum handling.
* src/cff/cffdrivr.c (cff_get_cmap_info): Remove compiler warning.
2004-02-20 01:39:05 +00:00
Werner Lemberg 6cda9c489d * include/freetype/ftcache.h: Delete duplicated definition of
FTC_FaceID.

* src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap
Info service function if the cmap comes from sfnt.  Return 0 if the
cmap is sythesized in cff module.

Formatting; updating copyright.
2004-01-22 09:07:12 +00:00
Werner Lemberg 3d780173fe Make `FT_Get_CMap_Language_ID' work with CFF. Bug reported by
Steve Hartwell <shspamsink@comcast.net>.

* src/cff/cffdrivr.c: Include FT_SERVICE_TT_CMAP_H.
(cff_services): Added an entry for FT_SERVICE_ID_TT_CMAP.
(cff_get_cmap_info): New function.
(cff_service_get_cmap_info) New entry for cff_services.

* src/sfnt/ttcmap0.c: Exit loop after a format match has been found.
Suggested by Steve Hartwell <shspamsink@comcast.net>.
2004-01-11 10:01:08 +00:00
Werner Lemberg fb4bfddb1a * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add
cast.
* src/cff/cffdrivr.c (cff_ps_has_glyph_names): Assure that return
value is either 0 or 1.
2003-12-13 18:42:31 +00:00
Werner Lemberg b36d4a53e9 * src/cff/cffdrivr.c (cff_get_glyph_name): Improve error message.
(cff_get_name_index): Return if no PSNames service is available.
(cff_ps_has_glyph_names): Handle CID-keyed fonts correctly.
* src/cff/cfftypes.h (CFF_CharsetRec): New field `cids', used for
CID-keyed fonts.  This is the inverse mapping of `sids'.
* src/cff/cffload.c (cff_charset_load): New argument `invert'.
Initialize charset->cids if `invert' is set.
(cff_font_load): In call to cff_charset_load, set `invert' to true
for CID-keyed fonts.
* src/cff/cffgload.c (cff_slot_load): Handle glyph index as CID
and map it to the real glyph index.

* docs/CHANGES: Updated.
2003-12-12 15:38:39 +00:00
Werner Lemberg 40bb0964f2 * src/base/fttype1.c (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names):
Fix parameter order in calls to FT_FACE_FIND_SERVICE.

* include/freetype/internal/ftserv.h
(FT_SERVICE_POSTSCRIPT_NAMES_H): Removed.  Unused.

* src/type42/t42drivr.c (t42_services): Updated.
2003-11-01 14:36:20 +00:00
David Turner 7760595f84 * include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
        src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
        include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
        'include/freetype/internal' to 'src/cff' since no other modules needs
        to known about these types

        * include/freetype/internal/t42types.h,
        include/freetype/internal/internal.h, src/type42/t42objs.h,
        src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
        'include/freetype/internal' to 'src/type42' since no other modules needs
        to known about these types

        * src/gzip/infblock.c: removing compiler warning

        * include/freetype/internal/services/svpsinfo.h,
        include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
        src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
        src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
        in "svpsinfo.h", removing some sad hacks.
2003-10-29 21:43:52 +00:00
Werner Lemberg 1c0b8e9d72 Only whitespace changes. 2003-10-23 04:54:14 +00:00
David Turner b72d8a8521 * include/freetype/internal/services/svpsname.h (added),
include/freetype/internal/psnames.h (removed),
        include/freetype/internal/internal.h (FT_SERVICE_POSTSCRIPT_NAMES):

          added new service to handle glyph name dictionaries, replacing
          the old internal header named "psnames.h" by "services/svpsname.h"
          note that this is different from "services/svpostnm.h" which only
          handles the retrieval of Postscript font name for a given face.
          (should we merge these two services into a single header ??)


        * include/freetype/internal/ftserv.h: adding
        FT_FACE_FIND_GLOBAL_SERVICE (used to lookup a service globally,
        instead of only within the current module)

        * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: adding
        the new base function ft_module_get_service
2003-09-29 20:33:37 +00:00
Werner Lemberg 013efd1410 Formatting. 2003-09-17 05:26:33 +00:00
Werner Lemberg 5e3614f584 * builds/toplevel.mk (distclean): Remove `builds/unix/freetype2.pc'.
* src/cff/cffdrivr.c: Don't load headers twice.

* include/freetype/internal/ftserv.h (FT_SERVICE_SFNT_H): New macro.
* src/base/ftobjs.c: Include FT_SERVICE_SFNT_H.
2003-09-12 19:38:13 +00:00
David Turner c313c50208 * include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
          include/freetype/internal/ftobjs.h,
          include/freetype/internal/ftserv.h,
          include/freetype/internal/internal.h,
          include/freetype/internal/sfnt.h,
          include/freetype/internal/tttypes.h,
          include/freetype/internal/services/bdf.h,
          include/freetype/internal/services/glyfdict.h,
          include/freetype/internal/services/multmast.h,
          include/freetype/internal/services/postname.h,
          include/freetype/internal/services/sfnt.h,
          include/freetype/internal/services/xf86name.h,
          src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
          src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
          src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
          src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:

          heavy internal modifications to introduce the concept of
          "module services". This is the first step towards a massive
          simplification of the engine's internals, in order to
          get rid of various numbers of hacks.

          Note that this changes will break source & binary compatibility
          for authors of external font drivers.

          Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 19:51:54 +00:00
Werner Lemberg 6d79899362 A new try to synchronize bitmap font access.
include/freetype/freetype.h (FT_Bitmap_Size): `height' is now
defined to return the baseline-to-baseline distance.  This was
already the value returned by the BDF and PCF drivers.

The `width' field now gives the average width.  I wasn't able to
find something better.  It should be taken as informative only.

New fields `size', `x_ppem', and `y_ppem'.

* src/pcf/pcfread.c (pcf_load_font): Updated to properly fill
FT_Bitmap_Size.
Do proper rounding and conversion from 72.27 to 72 points.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Updated to properly fill
FT_Bitmap_Size.
Do proper rounding and conversion from 72.27 to 72 points.

* src/sfnt/sfobjs.c (sfnt_load_face): Updated to properly fill
FT_Bitmap_Size.

* src/winfonts/winfnt.c (FNT_Face_Init): Updated to properly fill
FT_Bitmap_Size.

Redesigning the FNT driver to return multiple faces, not multiple
strikes.  At least one font (app850.fon from WinME) contains
different FNT charmaps for its subfonts.  Consequently, the previous
design of having multiple bitmap strikes in a single font face fails
since we have only one charmap per face.

* include/freetype/internal/fnttypes.h (FNT_Size_Rec): Removed.
(FNT_FaceRec): Remove `num_fonts' field and replace `fonts' with
`font'.

* src/base/ftwinfnt.c (FT_Get_WinFNT_Header): Updated.

* src/winfonts/winfnt.c (fnt_font_load): Don't set pixel_width equal
to pixel_height.
(fnt_face_done_fonts): Removed.
(fnt_face_get_dll_fonts): Renamed to...
(fnt_face_get_dll_font): This.  Add second function argument to
select face index.
Updated to load just one subfont.
(fnt_font_done, FNT_Face_Done): Updated.
(FNT_Face_Init): Handle `face_index'.
Updated.
(FNT_Size_Set_Pixels): Simplified; similar to BDF and PCF, the
bitmap width is now ignored.
(FNT_Load_Glyph): Updated.
Fix glyph index computation.
(winfnt_driver_class): Updated.
2003-07-01 07:28:55 +00:00
Werner Lemberg 3c41447eef * src/cff/cffdrivr.c (cff_get_glyph_name): Protect agains zero
glyph name pointer.  Reported by Mikey Anbary <manbary@vizrt.com>.
2003-06-25 06:13:36 +00:00
Werner Lemberg 779afe4b91 * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in
computation of glyph_index.
(FNT_Size_Set_Pixels): To find a strike, first check pixel_height
only, then try to find a better hit by comparing pixel_width also.
Without this fix it isn't possible to access all strikes.
Also compute metrics.max_advance to be in sync with other bitmap
drivers.

* src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
(FT_Set_Pixel_Size): Assign value to `metrics' after validation of
arguments.


Synchronize computation of height and width for bitmap strikes.  The
`width' field in the FT_Bitmap_Size structure is now only useful to
enumerate different strikes.  The `max_advance' field of the
FT_Size_Metrics structure should be used to get the (maximum) width
of a strike.

* src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.

* src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for
computing `available_sizes->width' but make it always equal to
`available_sizes->height'.

* src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single
argument to function.

* src/psnames/psmodule.c (ps_unicode_value): Handle `.' after
`uniXXXX' and `uXXXX[X[X]]'.


* src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/.
* src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c:
s/FT_Err_/FTC_Err_/.
* src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/.
* src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/.
* src/psaux/t1cmap.c: Include psauxerr.h.
s/FT_Err_/PSaux_Err_/.
* src/pshinter/pshnterr.h: New file.
* src/pshinter/rules.mk: Updated.
* src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h.
s/FT_Err_/PSH_Err_/.
* src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c:
s/FT_Err_/PFR_Err_/.
* src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/.
* src/truetype/ttgload.c: s/FT_Err_/TT_Err_/.
* src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define
FT_ERR_PREFIX and FT_ERR_BASE.
s/FT_Err_/Gzip_Err_/.
2003-06-22 15:33:53 +00:00
Werner Lemberg 052904e3a0 * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.

* include/freetype/ftmodule.h (ft_module_font_driver,
ft_module_renderer, ft_module_hinter, ft_module_styler,
ft_module_driver_scalable, ft_module_driver_no_outlines,
ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
FT_MODULE_DRIVER_HAS_HINTER.
The lowercase variants are now (deprecated aliases) to the uppercase
versions.
Updated all other files.

* src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
as enumeration.

* src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
(winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
the FT_MODULE_DRIVER_NO_OUTLINES flag.
2003-06-17 10:42:27 +00:00
Werner Lemberg 68e9f92710 * src/sfnt/ttpost.c (load_post_names, tt_face_free_ps_names,
tt_face_get_ps_name): Replace switch statement with if clauses to
make it more portable.

* src/cff/cffobjs.c (cff_face_init): Ditto.

* include/freetype/ftmodule.h (FT_Module_Class): Use `FT_Long' for
`module_size'.
* include/freetype/ftrender.h (FT_Glyph_Class_): Use `FT_Long' for
`glyph_size'.

* src/base/ftobjs.c (FT_Render_Glyph): Change second parameter to
`FT_Render_Mode'.
(FT_Render_Glyph_Internal): Change third parameter to
`FT_Render_Mode'.
* src/base/ftglyph.c (FT_Glyph_To_Bitmap): Change second parameter
to `FT_Render_Mode'.

* src/raster/ftrend1.c (ft_raster1_render): Change third parameter
to `FT_Render_Mode'.
* src/smooth/ftsmooth.c (ft_smooth_render, ft_smooth_render_lcd,
ft_smooth_render_lcd_v): Ditto.
(ft_smooth_render_generic): Change third and fifth parameter to
`FT_Render_Mode'.

* include/freetype/freetype.h, include/freetype/internal/ftobjs.h,
include/freetype/ftglyph.h: Updated.

* src/cff/cffdrivr.c (Load_Glyph), src/pcf/pcfdriver.c
(PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load),
src/winfonts/winfnt.c (FNT_Load_Glyph), src/t42/t42objs.c
(T42_GlyphSlot_Load), src/bdf/bdfdrivr.c (BDF_Glyph_Load): Change
fourth parameter to `FT_Int32'.

* src/pfr/pfrobjs.c (pfr_face_init): Add two missing parameters
and declare them as unused.

* src/cid/cidparse.h (CID_Parser): Use FT_Long for `postscript_len'.

* src/psnames/psnames.h (PS_Unicode_Value_Func): Change return
value to FT_UInt32.
* src/psnames/psmodule.c (ps_unicode_value, ps_build_unicode_table):
Updated accordingly.

* src/cff/cffdrivr.c (Get_Kerning): Use FT_Long for `middle'.
(cff_get_glyph_name): Use cast for result of ft_strlen.
* src/cff/cffparse.c (cff_parse_real): User cast for assigning
`exp'.
* src/cff/cffload.c (cff_index_get_pointers): Use FT_ULong for
some local variables.
(cff_charset_load, cff_encoding_load): Use casts to FT_UInt for some
switch statements.
(cff_font_load): Use cast in call to CFF_Load_FD_Select.
* src/cff/cffobjs.c (cff_size_init): Use more casts.
(cff_face_init): Use FT_Int32 for `flags'.
* src/cff/cffgload.c (cff_operator_seac): Use cast for assigning
`adx' and `ady'.
(cff_decoder_parse_charstrings): Use FT_ULong for third parameter.
Use more casts.
* src/cff/cffcmap.c (cff_cmap_unicode_init): Use cast for `count'.

* src/cid/cidload.c (cid_read_subrs): Use FT_ULong for `len'.
* src/cid/cidgload.c (cid_load_glyph): Add missing cast for
`cid_get_offset'.

* src/psaux/t1decode.c (t1_decoder_parse_charstrings) <18>: Use
cast for `num_points'.
(t1_decoder_init): Use cast for assigning `decoder->num_glyphs'.

* src/base/ftdebug.c (ft_debug_init): Use FT_Int.
* include/freetype/internal/ftdriver.h (FT_Slot_LoadFunc): Use
`FT_Int32' for fourth parameter.
* src/base/ftobjs.c (open_face): Use cast for calling
clazz->init_face.

* src/raster/ftraster.c (Set_High_Precision): Use `1' instead of
`1L'.
(Finalize_Profile_Table, Line_Up, ft_black_init): Use casts.
* src/raster/ftrend1.c (ft_raster1_render): Ditto.

* src/sfnt/sfnt_dir_check: Compare `magic' with unsigned long
constant.

* builds/amiga/include/freetype/config/ftmodule.h: Updated.
2002-09-27 11:09:23 +00:00
Werner Lemberg 7f74a52a21 Fixing ChangeLog entries.
Some formatting.

* src/truetype/ttgload.c (load_truetype_glyph)
[FT_CONFIG_OPTION_INCREMENTAL]: s/memset/ft_memset/.

* src/autohint/ahhint.c (ah_hint_edges_3): Fix compiler warning.
* src/cff/cffload.c (cff_encoding_load): Remove `memory' variable.
* src/cff/cffcmap.c (cff_cmap_encoding_init): Remove `psnames'
variable.
* src/truetype/ttgload.c (load_truetype_glyph): Remove statement
without effect.
* src/truetype/ttdriver (Get_Char_Index, Get_Next_Char): Removed.
2002-07-26 09:09:10 +00:00
David Turner 3e19d85dd4 * include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h,
src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c,
    src/pcf/pcfdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
    src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c,
    src/type42/t42objs.c, src/winfonts/winfnt.c: code cleanup,
    FT_CONFIG_OPTION_USE_CMAPS is now the default
2002-07-17 21:52:20 +00:00
David Turner b9b2cac634 * src/cff/cffcmap.c, src/cff/cffcmap.h, Jamfile, rules.mk: new files added
to support charmaps for CFF fonts

    * src/cff/cffload.c, src/cff/cffload.h, src/cff/cffobjs.c,
    src/cff/cffobjs.h, src/cff/cffparse.c, src/cffparse.h, src/cff/cffgload.c,
    src/cff/cffgload.h: adding support for CFF charmaps, reformatting the
    sources, and removing some bugs in the Encoding and Charset loaders
2002-07-10 16:52:06 +00:00
Werner Lemberg 8ab3260239 * src/bdf/README: Mention Microsoft's SBIT tool.
* src/cff/cffdrivr.c, src/cid/cidriver.c, src/pcf/pcfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c,
src/winfonts/winfnt.c, src/type42/t42drivr.c, src/bdf/bdfdrivr.c
[FT_CONFIG_OPTION_DYNAMIC_DRIVERS]: Completely removed.  It has
been never used.
2002-05-21 20:22:59 +00:00
Werner Lemberg 5f0ee94c06 `interface' is reserved on the Mac.
* include/freetype/ftoutln.h, include/freetype/internal/sfnt.h,
src/base/ftoutln.c: s/interface/func_interface/.
* src/base/ftbbox.c (FT_Outline_Get_BBox):
s/interface/bbox_interface/.
* src/cff/cffdrivr.c: s/interface/module_interface/.
* src/cff/cffload.c, src/cff/cffload.h:
s/interface/psnames_interface/.
* src/cid/cidriver.c: s/interface/cid_interface/.
* src/sfnt/sfdriver.c: s/interface/module_interface/.
* src/smooth/ftgrays.c: s/interface/func_interface/.
* src/truetype/ttdriver.c: s/interface/tt_interface/.
* src/type1/t1driver.c: s/interface/t1_interface/.
2002-04-30 06:37:52 +00:00
David Turner d15bc0d13a * README.UNX: updated the Unix-specific quick-compilation guide to
warn about the GNU Make requirement at compile time..

        * include/freetype/config/ftstdlib.h,
          include/freetype/config/ftconfig.h,
          include/freetype/config/ftheader.h,
          include/freetype/internal/ftmemory.h,
          include/freetype/internal/ftobjs.h,

          src/autohint/ahoptim.c,

          src/base/ftdbgmem.c, src/base/ftdebug.c,
          src/base/ftmac.c,    src/base/ftobjs.c,
          src/base/ftsystem.c,

          src/cache/ftcimage.c, src/cache/ftcsbits.c,

          src/cff/cffdriver.c, src/cff/cffload.c, src/cff/cffobjs.c,

          src/cid/cidload.c, src/cid/cidparse.c, src/cid/cidriver.c,

          src/pcf/pcfdriver.c, src/pcf/pcfread.c,

          src/psaux/t1cmap.c, src/psaux/t1decode.c,

          src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
          src/pshinter/pshrec.c,

          src/psnames/psmodule.c,

          src/raster/ftraster.c,

          src/sfnt/sfdriver.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,

          src/smooth/ftgrays.c,

          src/type1/t1afm.c,  src/type1/t1driver.c, src/type1/t1gload.c,
          src/type1/t1load.c, src/type1/t1objs.c,   src/type1/t1parse.c:

            added the new configuration file "ftstdlib.h" used to define
            aliases for all ISO C library functions used by the engine
            (e.g. strlen, qsort, setjmp, etc...)

            this eases the porting of FreeType 2 to exotic environments like
            XFree86 modules/extensions..

            also removed many #include <string.h>, #include <stdlib.h>, etc...
            from the engine's sources where they're not needed..
2002-04-12 09:31:48 +00:00
Werner Lemberg 48c984b5bb * src/cff/cffdrivr.c (cff_get_glyph_name): Fix debug message.
* src/cff/cffobjs.c (CFF_Driver_Init, CFF_Driver_Done)
[TT_CONFIG_OPTION_EXTEND_ENGINE]: Removed.
* src/cff/sfobjs.c (SFNT_Load_Face)
[TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto.
* src/truetype/ttobjs.c (TT_Init_Driver, TT_Done_Driver)
[TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto.

* src/truetype/ttdriver.c, src/truetype/ttobjs.c,
src/truetype/ttobjs.h: Renaming driver functions to the
FT_<Subject>_<Action> scheme:

  TT_Init_Driver => TT_Driver_Init
  TT_Done_Driver => TT_Driver_Done
  TT_Init_Face   => TT_Face_Init
  TT_Done_Face   => TT_Face_Done
  TT_Init_Size   => TT_Size_Init
  TT_Done_Size   => TT_Size_Done
  TT_Reset_Size  => TT_Size_Reset
2002-03-30 16:41:09 +00:00
David Turner e459d742e6 * include/freetype/internal/ftmemory.h, and a lot of other files !!:
changed the names of memory macros. Examples:

              MEM_Set   => FT_MEM_SET
              MEM_Copy  => FT_MEM_COPY
              MEM_Move  => FT_MEM_MOVE

              ALLOC     => FT_ALLOC
              FREE      => FT_FREE
              REALLOC   = >FT_REALLOC

            FT_NEW was introduced to allocate a new object from a _typed_
            pointer..

            note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced
            by FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer
            arguments.

            This results in _lots_ of sources being changed, but makes the
            code more generic and less error-prone..
2002-03-22 13:52:37 +00:00
David Turner b5713c54c3 * include/freetype/internal/psglobals.h (removed),
include/freetype/internal/pshints.h,
          src/pshinter/pshglob.h: removing obsolete file

        * include/freetype/internal/tttypes.h,
          include/freetype/internal/sfnt.h,
          src/base/ftnames.c, src/cff/cffdrivr.c,
          src/sfnt/*.c, src/truetype/*.c: updated SFNT/TrueType type
          definitions
2002-03-14 11:26:29 +00:00
David Turner ef3c12650e * include/freetype/internal/ftdriver.h,
include/freetype/internal/ftobjs.h,
          src/base/ftapi.c, src/base/ftobjs.c,
          src/cff/cffdrivr.c, src/cff/cffdrivr.h,
          src/cid/cidriver.c, src/cid/cidriver.h,
          src/pcf/pcfdriver.c, src/pcf/pcfdriver.h,
          src/truetype/ttdriver.c, src/truetype/ttdriver.h,
          src/type1/t1driver.c, src/type1/t1driver.h,
          src/winfonts/winfnt.c, src/winfonts/winfnt.h:
          updating the type definitions for font font drivers
2002-03-14 09:22:48 +00:00
David Turner ab4fc4da58 * include/freetype/internal/cfftypes.h, src/cff/*.c: updating the
type definitions of the CFF font driver

        (i.e. CFF_Font  => CFF_FontRec
              CFF_Font* => CFF_Font, etc...)
2002-03-14 08:57:10 +00:00
Werner Lemberg 0d9165e1d6 * src/base/ftdbgmem.c (ft_mem_table_resize, ft_mem_table_new,
ft_mem_table_set, ft_mem_debug_alloc, ft_mem_debug_free,
ft_mem_debug_realloc, ft_mem_debug_done, FT_Alloc_Debug,
FT_Realloc_Debug, FT_Free_Debug): Fix compiler warnings.
* src/base/ftcalc.c (FT_MulFix): Ditto.
* src/cff/cffdrivr.c (cff_get_name_index): Ditto.
* src/cff/cffobjs.c (CFF_Size_Get_Global_Funcs, CFF_Size_Init,
CFF_GlyphSlot_Init): Ditto.
* src/cid/cidobjs.c (CID_GlyphSlot_Init,
CID_Size_Get_Globals_Funcs): Ditto.
* src/type1/t1objs.c (T1_Size_Get_Globals_Funcs, T1_GlyphSlot_Init):
Ditto.
* src/pshinter/pshmod.c (pshinter_interface): Use `static const'.
* src/winfonts/winfnt.c (FNT_Get_Next_Char): Remove unused
variables.

* include/freetype/internal/psaux.h (T1_Builder_Funcs): Renamed
to...
(T1_Builder_FuncsRec): This.
(T1_Builder_Funcs): New typedef.
(PSAux_Interface): Remove compiler warnings.
* src/psaux/psauxmod.c (t1_builder_funcs), src/psaux/psobjs.h
(t1_builder_funcs): Updated.

* src/pshinter/pshglob.h (PSH_Blue_Align): Replaced with ...
(PSH_BLUE_ALIGN_{NONE,TOP,BOT}): New defines.
(PSH_AlignmentRec): Updated.

* include/freetype/internal/ftstream.h (GET_Char, GET_Byte): Fix
typo.
* include/freetype/internal/ftgloadr.h (FT_SubGlyph): Ditto.
* src/base/ftstream (FT_Get_Char): Rename to...
(FT_Stream_Get_Char): This.

* src/base/ftnames.c (FT_Get_Sfnt_Name): s/index/idx/ -- `index' is
a built-in function in gcc, causing warning messages with gcc 3.0.
* src/autohint/ahglyph.c (ah_outline_load): Ditto.
* src/autohint/ahglobal.c (ah_hinter_compute_blues): Ditto.
* src/cache/ftcmanag.c (ftc_family_table_alloc,
ftc_family_table_free, FTC_Manager_Done, FTC_Manager_Register_Cache):
Ditto.
* src/cff/cffload.c (cff_new_index, cff_done_index,
cff_explicit_index, CFF_Access_Element, CFF_Forget_Element,
CFF_Get_Name, CFF_Get_String, CFF_Load_SubFont, CFF_Load_Font,
CFF_Done_Font): Ditto.
* src/psaux/psobjs.c (PS_Table_Add, PS_Parser_LoadField): Ditto.
* src/psaux/t1decode.c (T1_Decoder_Parse_Charstrings): Ditto.
* src/pshinter/pshrec.c (ps_mask_test_bit, ps_mask_clear_bit,
ps_mask_set_bit, ps_dimension_add_t1stem, ps_hints_t1stem3,
* src/pshinter/pshalgo1.c (psh1_hint_table_record,
psh1_hint_table_record_mask, psh1_hint_table_activate_mask): Ditto.
* src/pshinter/pshalgo2.c (psh2_hint_table_record,
psh2_hint_table_record_mask, psh2_hint_table_activate_mask): Ditto.
* src/sfnt/ttpost.c (Load_Format_20, Load_Format_25,
TT_Get_PS_Name): Ditto.
* src/truetype/ttgload.c (TT_Get_Metrics, Get_HMetrics,
load_truetype_glyph): Ditto.
* src/type1/t1load.c (parse_subrs, T1_Open_Face): Ditto.
* src/type1/t1afm.c (T1_Get_Kerning): Ditto.
* include/freetype/cache/ftcmanag.h (ftc_family_table_free): Ditto.
2002-03-07 21:59:59 +00:00
David Turner 4e7eeeec7b yet another logical transformation of the internals to make them
more consistent and understandable..

mainly, changing things like PS_Table  => PS_TableRec + *PS_Table
2002-02-28 16:10:29 +00:00
Werner Lemberg 0f7c2f1aa5 Adding the function `FT_Get_Next_Char', doing the obvious thing
w.r.t. the selected charmap.

* include/freetype/freetype.h: Add prototype.
* include/freetype/internal/ftdriver.h: Add `FTDriver_getNextChar'
typedef.
(FT_Driver_Class): Use it.
* include/freetype/internal/psnames.h: Add `PS_Next_Unicode_Func'
typedef.
(PSNames_Interface): Use it.
* include/freetype/internal/tttypes.h: Add `TT_CharNext_Func'
typedef.
(TT_CMapTable): Use it.

* src/base/ftobjs.c (FT_Get_Next_Char): New function, implementing
high-level API.
* src/cff/cffdrivr.c (cff_get_next_char): New function.
(cff_driver_class): Add it.
* src/cid/cidriver.c (Cid_Get_Next_Char): New function.
(t1cid_driver_class): Add it.
* src/pcf/pcfdriver.c (PCF_Get_Next_Char): New function.
(pcf_driver_class): Add it.
* src/psnames/psmodule.c (PS_Next_Unicode): New function.
(psnames_interface): Add it.
* src/sfnt/ttcmap.c (code_to_next0, code_to_next2, code_to_next4,
code_to_next6, code_to_next_8_12, code_to_next_10): New auxiliary
functions.
(TT_CharMap_Load): Use them.
* src/truetype/ttdriver.c (Get_Next_Char): New function.
(tt_driver_class): Add it.
* src/type1/t1driver.c (Get_Next_Char): New function.
(t1_driver_class): Add it.
* src/winfnt/winfnt.c (FNT_Get_Next_Char): New function.
(winfnt_driver_class): Add it.

* src/pcf/pcfread.c (pcf_load_font): For now, report Unicode for
Unicode and Latin 1 encodings.
2002-02-04 20:55:58 +00:00
Werner Lemberg 43071cb7f2 * src/cff/cffdrivr.c (cff_get_name_index): Make last patch work
actually.
2002-01-25 22:55:53 +00:00