Commit Graph

1815 Commits

Author SHA1 Message Date
Yamato, Masatake (大和正武) 774a0719e7 */*.[ch]: Rename FTL_Glyphs_Array to FTL_GlyphArray. 2004-05-06 12:17:41 +00:00
Yamato, Masatake (大和正武) 77c95c64de * src/gxlayout/gxdemo.c (set_trace_level): Move loca variation
defs inside FT_DEBUG_LEVEL_TRACE ifdef block.

* src/pcf/pcfdrivr.c (FT_Stream_OpenLZW): Add dummy
implementation. This should be removed when FTLAYOUT is
merged to the main trunk.

* src/gxlayout/*.[ch]: Remove all [gcaf]var realted codes.
gx variation are supported in the main trunk now.
2004-05-03 04:51:06 +00:00
David Turner df292276d4 fixinf typo "Comapre" => "Compare" 2004-04-05 22:47:11 +00:00
David Turner 3f098414af changing "const FT_Frame_Field" array definitions to "static const",
since this avoids copying data to the stack. Saves about 2Kb of code !!
2004-04-05 22:45:41 +00:00
David Turner 995fc65f61 fixing incorrect uses of the FT_READ_xxx macros 2004-04-05 22:38:54 +00:00
David Turner 94172aa971 adding missing Jamfile 2004-04-05 22:35:00 +00:00
David Turner 1e2fec02b6 updating Jamfiles to build otlayout / gxlayout correctly 2004-04-05 22:24:24 +00:00
David Turner 928f559b72 updating Jamfiles to build otlayout / gxlayout correctly 2004-04-05 22:19:00 +00:00
David Turner a5f7fcdf56 initial import of the FreeType Layout sources 2004-04-05 22:16:12 +00:00
David Turner cad0775afe mergin latest developments of main branch:
support for LZW compression + changing MIN => FT_MIN
2004-03-06 12:28:23 +00:00
Werner Lemberg 79edf077a2 *** empty log message *** 2004-03-05 10:09:20 +00:00
Werner Lemberg 39c55c2f8c LZW support 2004-03-05 10:07:37 +00:00
Werner Lemberg d464139d60 Initial revision 2004-03-05 10:07:37 +00:00
Werner Lemberg 7110f2144a * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h:
Add LZW module.

* Jamfile.in: Removed.

* docs/CHANGES: Updated.

* include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/,
s/ABS/FT_ABS/.  Updated all callers.

* src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c
(PCF_Face_Init): Use FT_ERROR_BASE.



Add support for PCF fonts compressed with LZW (extension .pcf.Z,
created with `compress').

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

* include/freetype/ftlzw.h: New file.
* include/freetype/config/ftheader.h (FT_LZW_H): New macro for
ftlzw.h.

* src/lzw/*: New files.

* src/pcf/pcfdrivr.c: Include FT_LZW_H.
(PCF_Face_Init): Try LZW also.

* src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate.
Beautify.
2004-03-05 09:26:24 +00:00
Werner Lemberg f5c26739c3 * src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code. 2004-03-03 16:06:17 +00:00
Werner Lemberg 92831e3d27 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 bbca5932de * src/pshinter/pshglob.c (psh_globals_scale_widths): Don't use
FT_RoundFix but FT_PIX_ROUND.
(psh_blues_snap_stem): Don't use blue_shift but blue_threshold.

*src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro.
(psh_glyph_find_string_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
(psh_glyph_find_blue_points): New function.  Needed for fonts like
p052003l.pfb (URW Palladio L Roman) which have flex curves at the
base line within blue zones, but the flex curves aren't covered by
hints.
(ps_hints_apply): Use psh_glyph_find_blue_points.
2004-03-02 07:01:20 +00:00
Werner Lemberg 62d8db05fa * builds/unix/configure.ac: Fix compiler flags for
`--with-old-mac-fonts'.
* builds/unix/configure: Regenerated.

* src/base/ftmac.c: s/TARGET_API_MAC_CARBON/!TARGET_API_MAC_OS8/.
(FT_New_Face_From_Resource): New function.
(FT_New_Face): Use FT_New_Face_From_Resource.
(FT_New_Face_From_FSSpec): Use FT_New_Face_From_Resource.
[__MWERKS__]: Don't include FSp_fopen.h.
2004-02-28 19:12:01 +00:00
Werner Lemberg a5e9f1d994 *** empty log message *** 2004-02-27 20:33:53 +00:00
Werner Lemberg 21d8ccb112 * src/pshinter/pshglob.c (psh_globals_new): Fix value of
`dim->stdw.count'.
Don't assign default values to blue scale and blue shift.
2004-02-27 20:32:39 +00:00
Werner Lemberg bdeff4baac * docs/CHANGES: Updated.
Improve MacOS fond support.  Provide a new API
`FT_New_Face_From_FSSpec' similar to `FT_New_Face'.

* src/base/ftmac.c [__MWERKS__]: Include FSp_fpopen.h.
STREAM_FILE [__MWERKS__]: New macro.
(ft_FSp_stream_close, ft_FSp_stream_io) [__MWERKS__]: New functions.
(file_spec_from_path) [__MWERKS__]: Updated #if statement.
(get_file_type, make_lwfn_spec): Use `const' for argument.
(is_dfont) [TARGET_API_MAC_CARBON]: Removed.
(count_face_sfnt, count_faces): New functions.
(parse_fond): Do some range checking.
(read_lwfn): Change type of second argument.
No longer call FSpOpenResFile.
(OpenFileAsResource): New function.
(FT_New_Face_From_LWFN): Use `const' for second argument.
Use OpenFileAsResource.
(FT_New_Face_From_Suitcase): Change type of second argument.
No longer call FSpOpenResFile.
Loop over all resource indices.
(FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Removed.
(FT_GetFile_From_Mac_Name): Use `const' for first argument.
(ResourceForkSize): Removed.
(FT_New_Face): Updated to use new functions.
(FT_New_Face_From_FSSpec): New function.

* include/freetype/ftmac.h: Updated.
2004-02-26 21:56:27 +00:00
Werner Lemberg 1139231757 * src/autohint/ahhint.c (ah_hinter_load) <FT_GLYPH_FORMAT_OUTLINE>:
Handle case where outline->num_vedges is zero while computing hinted
metrics.

* src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value
for `count'.
2004-02-26 09:08:51 +00:00
Werner Lemberg f85a2c3910 * include/freetype/t1tables.h (PS_PrivateRec): Add
`expansion_factor'.

* src/pshinter/pshglob (psh_blues_scale_zones): Fix computation
of blues->no_overshoots -- `blues_scale' is stored with a
magnification of 1000, and `scale' returns fractional pixels.

* src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift',
`blue_fuzz', `expansion_factor', and `blue_scale' according to the
Type 1 specification.

* src/type1/t1tokens.h: Handle `ExpansionFactor'.

* docs/CHANGES: Updated.
2004-02-25 21:17:49 +00:00
Werner Lemberg 67dcd4bcf4 Provide generic access to MacOS resource forks.
* src/base/ftrfork.c, include/freetype/internal/ftrfork.h: New
files.

* src/base/ftobjs.c: Include FT_INTERNAL_RFORK_H.
(Mac_Read_POST_Resource, Mac_Read_sfnt_Resource): Remove arguments
`resource_listoffset' and `resource_data' and adapt code
accordingly.  These values are calculated outside of the function
now.
Add new argument `offsets'.
(IsMacResource): Use `FT_Raccess_Get_HeaderInfo' and
`FT_Raccess_Get_DataOffsets'.
(load_face_in_embedded_rfork): New function.
(load_mac_face): Use load_face_in_embedded_rfork.
(ft_input_stream_new): Renamed to...
(FT_Stream_New): This.  Use FT_BASE_DEF.  Updated all callers.
(ft_input_stream_free): Renamed to...
(FT_Stream_Free): This.  Use FT_BASE_DEF.  Updated all callers.

* src/base/ftbase.c: Include ftrfork.c.

* src/base/rules.mk (BASE_SRC), src/base/Jamfile: Updated.

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

* include/freetype/internal/fttrace.h: Added `rfork' as a new
trace definition.

* include/freetype/internal/ftstream.h: Declare FT_Stream_New and
FT_Stream_Free.

* include/freetype/config/ftoption.h, devel/ftoption.h
(FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK): New option.

* include/freetype/config/ftstdlib.h (ft_strrchr): New macro.
2004-02-25 12:58:54 +00:00
Werner Lemberg b35d6d69e4 * docs/CHANGES: Updated.
* include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H.


Provide a simple API to control FreeType's tracing levels.

* include/freetype/internal/ftdebug.h (FT_Trace_Get_Count,
FT_Trace_Get_Name): New declarations.

* src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name): New
functions.
2004-02-24 07:52:45 +00:00
David Turner 8c9c760326 adding support for dummy script, i.e. no-hinting for non latin glyphs 2004-02-23 21:08:37 +00:00
David Turner 648dd5acea * src/autofit/afhints.c, src/autofit/afhints.h, src/autofit/aflatin.c,
src/autofit/afloader.c, src/types.h: grave bugs were fixed. The
        auto-fitter works, doesn't crashes, but still produces unexpected
        results !!
2004-02-23 20:40:30 +00:00
Werner Lemberg 849b62bf38 * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD): Changed to hold
the accepted shift for strong points in fractional pixels (which
is a heuristic value).
(psh_glyph_find_strong_points): Compute threshold for
psh_hint_table_find_strong_points.
(psh_hint_table_find_strong_point): Add parameter to pass threshold.
2004-02-23 18:22:32 +00:00
Werner Lemberg a6498eff0f * src/pshinter/pshrec.c (ps_mask_table_set_bits): Don't call
ps_mask_table_alloc but ps_mask_table_last.
(ps_hints_t2mask): Use correct position and number for vertical
and horizontal hinter mask bits.

* docs/CHANGES: Updated.
2004-02-21 16:47:20 +00:00
Werner Lemberg 146718161f * 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 55b639b888 * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly.
* src/base/ftglyph.c (ft_bitmap_glyph_class,
ft_outline_glyph_class): Tag with FT_CALLBACK_TABLE_DEF.

* src/smooth/ftsmooth.c (ft_smooth_render): Handle
FT_RENDER_MODE_LIGHT.
2004-02-19 21:39:58 +00:00
Werner Lemberg 037bbe661d Fix callback functions in cache module.
* src/cache/ftccback.h: New file for callback declarations.

* src/cache/ftcbasic.c (ftc_basic_family_compare,
ftc_basic_family_init, ftc_basic_family_get_count,
ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph,
ftc_basic_gnode_compare_faceid): Use FT_CALLBACK_DEF.
(ftc_basic_image_family_class, ftc_basic_image_cache_class,
ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class):
Use FT_CALLBACK_TABLE_DEF and local wrapper functions.

* src/cache/ftccache.c: Include ftccback.h.
(ftc_cache_init, ftc_cache_done): New wrapper functions which use
FT_LOCAL_DEF.

* src/cache/ftccmap.c: Include ftccback.h.
(ftc_cmap_cache_class): Use local wrapper functions.

* src/cache/ftcglyph.c: Include ftccback.h.
(ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): New wrapper
functions which use FT_LOCAL_DEF.

* src/cache/ftcimage.c: Include ftccback.h.
(ftc_inode_free, ftc_inode_new, ftc_inode_weight): New wrapper
functions which use FT_LOCAL_DEF.

* src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class):
Use FT_CALLBACK_TABLE_DEF.

* src/cache;/ftcsbits.c: Include ftccback.h.
(ftc_snode_free, ftc_snode_new, ftc_snode_weight,
ftc_snode_compare): New wrapper functions which use FT_LOCAL_DEF.

* src/cache/rules.mk (CACHE_DRV_H): Add ftccback.h.
2004-02-17 18:41:58 +00:00
Werner Lemberg b4dfab0ddf * include/freetype/ftmac.h (FT_GetFile_From_Mac_Name): Fix a typo
(FT_EXPORT_DEF -> FT_EXPORT).

* include/freetype/ftxf86.h (FT_Get_X11_Font_Format): Ditto.
2004-02-17 13:46:17 +00:00
Werner Lemberg 33fef0928b * src/base/ftobjs.c (FT_Set_Char_Size): Fix typo. 2004-02-16 12:53:59 +00:00
Werner Lemberg 0aa11f20da * builds/unix/ftsystem.c: Include errno.h.
(ft_close_stream): Renamed to...
(ft_close_stream_by_munmap): This.
(ft_close_stream_by_free): New function.
(FT_Stream_Open): Use fallback method if mmap fails.
Use proper function for closing the stream.

* src/type1/t1load.c (parse_dict): Initialize `start_binary'.
2004-02-16 09:38:05 +00:00
Werner Lemberg 4e3d2f8c05 * src/type42/t42objs.c (T42_Face_Init), src/type1/t1objs.c
(T1_Face_Init), src/cid/cidobjs.c (cid_face_init): Fix computation
of underline_position and underline_thickness.
2004-02-14 19:21:37 +00:00
Werner Lemberg 0be012db6b * src/base/ftobjs.c (FT_Set_Char_Size): Return immediately if
ppem values don't change.  Suggested by Graham Asher.
2004-02-13 23:48:39 +00:00
Werner Lemberg a9ad67bb69 * src/cid/cidload.c (cid_face_open): Always allocate
face->cid_stream so that we can deallocate it safely.


Make the PS parser more tolerant w.r.t. non-standard font data.  In
general, an error is only reported in case of a syntax error; a
wrong type is now simply ignored (if possible).  To be independent
of the order of various MM-specific keywords, the parse_shared_dict
routine has been removed -- the PS parser is now capable to skip
this data.  It no longer fails on parsing e.g.

  dup /WeightVector exch def

Since the token following /WeightVector isn't `[' (starting an
array) it is simply ignored.

* include/freetype/fterrdef.h: Define `FT_Err_Ignore' (0xA2) as a
new internal error value.

* src/type1/t1load.c (parse_blend_axis_types,
parse_blend_design_positions, parse_blend_design_map): Return
T1_Err_Ignore if no proper array is following the keyword.
(parse_weight_vector): Use T1_ToTokenArray, initializing `blend'
structure, if necessary.
Return T1_Err_Ignore if no proper array is following the keyword.
(parse_shared_dict): Removed.
(parse_encoding): Set parser->root.error to return T1_Err_Ignore
if no result can be obtained.
Check for errors before accessing `elements' array.
(t1_keywords): Remove /shareddict.
(parse_dict): Reset error if t1_load_keyword returns T1_Err_Ignore.
Set keyword_flag only in case of success.
Check error code if skipping an unrecognized token.
(T1_Open_Face) [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: Call T1_Done_Blend
if blend commands haven't set up a proper MM font.

* src/psaux/psobjs.c (ps_parser_load_field_table): Remove special
code for synthetic fonts.
Return PSaux_Err_Ignore if no proper value has been found.
2004-02-12 08:33:20 +00:00
Werner Lemberg 6ec7ba8ab3 * src/cff/cffgload.c (cff_decoder_parse_charstrings)
<cff_op_endchar>: Preserve glyph width before calling
cff_operator_seac.

* src/cff/cffgload.c (cff_decoder_parse_charstrings): Handle special
first argument for `hintmask' and `cntrmask' operators also.
2004-02-10 16:02:20 +00:00
Werner Lemberg d59c93309c * builds/unix/configure.in: Call AC_SUBST for `enable_shared',
`hardcode_libdir_flag_spec', and `wl'.
* builds/unix/configure: Regenerated.

* builds/unix/freetype-config.in: Make --prefix and --exec-prefix
actually work.
Report a proper --rpath (or -R) value for --libs argument if a
shared library has been built.

* docs/CHANGES: Updated.
2004-02-08 22:45:48 +00:00
Werner Lemberg 9963101dbe * src/bdf/bdfdrivr.c (BDF_Face_Init, BDF_Set_Pixel_Size): Fix
computation of various vertical and horizontal metric values.

* src/pcfdrivr.c (PCF_Set_Pixel_Size), src/pcfread (pcf_load_font):
Ditto.
2004-02-08 16:30:37 +00:00
Werner Lemberg 3c711454e2 * builds/win32/visualc/index.html,
builds/win32/visualc/freetype.dsp,
builds/win32/visualc/freetype.dsw, docs/CHANGES: Updated.

* builds/win32/visualc/freetype.sln,
builds/win32/visualc/freetype.vcproj: New files for VS.NET 2003.
2004-02-08 09:07:08 +00:00
Werner Lemberg 1ff902c8cd * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP):
Initialize `node'.
* src/type1/t1load.c (parse_dict): Initialize `have_integer'.
2004-02-05 14:36:43 +00:00
Werner Lemberg 781072441e * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands
outside of /Subrs or /CharStrings.  This can happen if there is
additional code manipulating those two arrays so that FreeType
doesn't recognize them properly.
(T1_Open_Face): Improve an error message.

Remove CR/LF on many files.
2004-02-03 21:34:29 +00:00
Werner Lemberg 64e6f5b5a7 * src/type1/t1load.c (parse_charstrings): Exit immediately if
there are no elements in /CharStrings.  This is needed for fonts
like Optima-Oblique which not only define /CharStrings but access it
also.
2004-02-02 19:41:09 +00:00
David Turner e2913592ec * src/sfnt/Jamfile: removing "ttcmap" from the list of sources
* src/cache/*, include/freetype/cache/*: fixing a bug after heavy
        testing. The current sources are now "release candidates" for the
        final version of the cache sub-system

        * Jamfile: updating "refdoc" target, and adding "autohint" to the
        list of modules to build. Both the autohinter and autofitter will be
        built by default. But which one will be used is determined by
        the content of "ftmodule.h"

        * src/autofit/*: much updates, but the code is still buggy as hell.
        Aargh..
2004-02-01 16:59:06 +00:00
Werner Lemberg a01a7dd5bb * src/cff/cffgload.c (cff_operator_seac): Fix magnitude of
accent offset.
Update code similarly to the seac support for Type 1 fonts.
(cff_decoder_parse_charstrings) <cff_op_endchar>: Fix magnitude
of accent offset.
Don't hint glyphs twice if seac is emulated.
<cff_op_flex>: Assign correct point tags.
* docs/CHANGES: Updated.

* src/type1/t1parse.c (T1_Get_Private_Dict): Use FT_MEM_MOVE, not
FT_MEM_COPY, for copying the private dict.

* src/type1/t1load.c (parse_subrs): Assign number of subrs only
in first run.
(parse_charstrings): Parse /CharStrings in second run without
assigning values.
(parse_dict): Skip all /CharStrings arrays but the first.  We need
this for non-standard fonts like `Optima' which have different
outlines depending on the resolution.  Note that there is no
guarantee that we get fitting /Subrs and /CharStrings arrays; this
can only be done by a real PS interpreter.
2004-02-01 00:49:56 +00:00
Antoine Leca 0c61490afb * builds/win32/visualc/index.html: detailled explanations
about forcing CR+LF line endings for the VC++ project files.
2004-01-29 11:25:47 +00:00
Werner Lemberg a078e836ca * src/cff/cffload.c (cff_subfont_load): Initialize `dict'. 2004-01-24 15:06:57 +00:00
Werner Lemberg f4c46c688e Add support for the hexadicimal representation of binary data
started with `StartData' in CID-keyed Type 1 fonts.

* include/freetype/internal/t1types.h (CID_FaceRec): Add new
members `binary_data' and `cid_stream'.

* src/cid/cidload.c (cid_read_subrs): Use `face->cid_stream'.
(cid_hex_to_binary): New auxiliary function.
(cid_face_open): Add new argument `face_index' to return quickly
if less than zero.  Updated all callers.
Call `cid_hex_to_binary', then open and assign memory stream to
`face->cid_stream' if `parser->binary_length' is non-zero.
* src/cid/cidload.h: Updated.

* src/cid/cidobjs.c (cid_face_done): Free `binary_data' and
`cid_stream'.

* src/cid/cidparse.c (cid_parser_new): Check arguments to
`StartData' and set parser->binary_length accordingly.
* src/cid/cidparse.h (CID_Parser): New member `binary_length'.

* src/cid/cidgload.c (cid_load_glyph): Use `face->cid_stream'.

* docs/CHANGES: Updated.


include/freetype/config/ftstdlib.h (ft_atoi): Replaced with...
(ft_atol): This.
* src/base/ftdbgmem.c: s/atol/ft_atol/.
* src/type42/t42drivr.c: s/ft_atoi/ft_atol/.
2004-01-23 19:52:40 +00:00