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_/.
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.
correctly.
* src/pshinter/pshglob.c (psh_globals_new): Change calculation of
dim->stdw.count to avoid compiler problem.
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block
variables to the beginning of the function to avoid compiler
problems.
Add casts necessary for 16bit compilers.
* src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c.
(PFR_DRV_H): Add pfrtypes.h.
* include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/.
* src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third
argument to FT_Bool.
(pfr_lookup_bitmap_data): Change type of third and fourth argument
to FT_UInt. Updated caller.
(pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool.
. In all makefiles `/' is used as the path separator. The
conversion to the real path separators is done as late as
possible using $(subst ...).
. $(HOSTSEP) no longer exists. Now, $(SEP) gives the path separator
for the operating system, and the new $(COMPILER_SEP) the path
separator for the compiler tools.
. $(BUILD) has been renamed to $(BUILD_DIR). In general, all
directory variables end with `_DIR'. The variants ending in `_'
(like `BASE_' have been removed).
The following ChangeLog entries only describe changes which are
not related to the redesign.
* builds/beos/beos-def.mk (BUILD_DIR): Fix typo.
* builds/compiler/watcom.mk (LINK_LIBRARY): Fix linker call to avoid
overlong arguments as suggested by J. Ali Harlow
<ali@avrc.city.ac.uk>.
* builds/dos/dos-wat.mk: New file.
* builds/freetype.mk (FREETYPE_H): Include header files from the
`devel' subdirectory.
* builds/os2/os2-dev.mk, builds/unix/unixddef.mk,
builds/unix/unixddef.mk, builds/win32/w32-bccd.mk,
builds/win32/w32-dev.mk (BUILD_DIR): Fix path.
* builds/unix/configure.ac, builds/unic/configure: Updated.
* builds/unix/unix-def.in (DISTCLEAN): Add `freetype2.pc'.
* devel/ftoption.h: Updated.
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c,
src/pcf/pcfdriver.c, src/pfr/pfrsbit.c, src/sfnt/ttsbit.c,
src/type42/t42objs.c, src/winfonts/winfnt.c: introduced three new functions
to deal with glyph bitmaps within FT_GlyphSlot objects. these are:
ft_glyphslot_free_bitmap
ft_glyphslot_alloc_bitmap
ft_glyphslot_set_bitmap
these are much more convenient to use than managing the FT_GLYPH_OWN_BITMAP
flag manually. the font drivers have been modified to use them as well.
* src/cache/ftlru.c: fixed an invalid assertion check
to control memory debugging with FreeType. See the description of
"FT2_DEBUG_MEMORY", "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX"
in DEBUG.TXT
* src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcsbits.c,
ftlru.c: fixed the cache sub-system to correctly deal with out-of-memory
conditions.
* src/pfr/pfrobjs.c, src/pfr/pfrsbits.c: fixing compiler warnings and a
small memory leak
* src/psaux/psobjs.c (t1_reallocate_table): fixed a bug (memory leak) that
only happened when trying to resize an array would end in an OOM.
* src/smooth/ftgrays.c: removed compiler warnings / volatile bug
* src/truetype/ttobjs.c: removed segmentation fault that happened in
tight memory environments.
when trying to read certain compressed gzip files. The following test
could be used to reveal the bug:
touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz
* src/pfr/pfrobjs.c, src/pfr/pfrload.c, src/pfr/pfrtypes.h: several
fixes to the PFR font driver:
- the list of available embedded bitmaps was not correctly set
in the root FT_FaceRec structure describing the face
- the glyph loader always tried to load the outlines when
FT_LOAD_SBITS_ONLY was specified
- the table loaded now scans for *undocumented* elements of a
physical font's auxiliary data record, this is necessary to
retrieve the "real" family and style names.
NOTE THAT THIS CHANGES THE FAMILY NAME OF MANY PFR FONTS !!
* include/freetype/config/ftoption.h, src/gzip/ftgzip.c: added
support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify
the use of system-wide zlib.
Note that this macro, as well as FT_CONFIG_OPTION_BYTECODE_INTERPRETER,
is not #undef-ed anymore. This allows the build system to define them
depending on the configuration (typically by adding -D flags at
compile time).
* src/sfnt/ttcmap0.c (tt_face_build_cmaps): removed compiler warnings
in optimized mode relative to the "volatile" local variables. This was
not a compiler bug after all, but the fact that a pointer to a volatile
variable is not the same than a volatile pointer to a variable :-)
the fix was to change "volatile FT_Byte* p"
into "FT_Byte* volatile p"
* src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c: removed
compiler warnings in optimized modes
* src/gzip/*.[hc]: modified our ZLib copy in order to prevent exporting
any zlib function names outside of the component. This prevents linking
problems on some platforms, when applications want to link FreeType
_and_ ZLib together.
2002-11-05 Juliusz <jch@pps.jussieu.fr>
* src/psaux/psobjs.c (ps_table_add): modified increment loop in
order to implement exponential behaviour
src/base/ftpfr.c, src/base/Jamfile, src/descrip.mms, src/rules.mk,
src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfsobjs.h:
added PFR-specific public API. Fixed the kerning retrievel routine
(it returned invalid values when the outline and metrics resolution
differ)
* src/base/ftsynth.c: fixed the synthetic emboldener. at last.
* src/base/ftobjs.c: small internal fix to better support
bitmap-based font formats
src/pfr/pfrgload.c, src/pfr/pfrobjs.c, src/pfr/pfrtypes.h,
Jamfile, src/base/ftobjs.c: adding support for embedded bitmaps to
the PFR driver, and rewriting its kerning loader / handler to use all
kerning pairs in a physical font (and not just the first item).
* src/tools/docmaker/content.py, src/tools/docmaker/sources.py,
src/tools/docmaker/tohtml.py: fixing a few nasty bugs
* src/sfnt/ttcmap0.c: the validator for format 4 sub-tables is
now capable of dealing with invalid "length" fields at the start
of the sub-table. This allows fonts like "mg______.ttf" (i.e.
Marriage) to return accurate charmaps.
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.
want to list them all here. The operations performed were all logical
transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with
#define definitions like
#define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering
though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly
though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_.
incorrect advances when the outline resolution was different from the
metrics resolution
* src/autohint/ahhint.c: removing compiler warnings
* src/autohint/ahglyph.c: slight improvements to the serif detection
code. More work is needed though..
t1_cmap_custom_char_next): Fix index computation -- indices start
with 0 and not with cmap->first.
Provide default charmaps.
* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
(PCF_Face_Init), src/pfr/pfrobjs.c (pfr_face_init),
src/type1/t1objs (T1_Face_Init), src/winfonts/winfnt.c
(FNT_Face_Init): Implement it.
* builds/unix/install.mk (install, uninstall): Handle it.
Fix glyph indices for PFR driver.
* src/pfr/pfrcmap.c (pfr_cmap_char_index, pfr_cmap_char_next):
Increase return value by 1.
* src/pfr/pfrobjs.c (pfr_slot_load): Decrease index by 1.
parameter sign-ness in callback function
* include/freetype/config/ftmodule.h,
include/freetype/internal/fttrace.h,
src/Jamfile, src/pfr/*:
adding a PFR font driver to the FreeType sources. Not that it
doesn't support embedded bitmaps or kerning tables for now..
* include/freetype/internal/ftmemory.h: adding the FT_MEM_ZERO
and FT_ZERO macros
* include/freetype/internal/ftstream.h: adding the FT_NEXT_OFF3,
FT_NEXT_UOFF3, FT_NEXT_OFF3_LE and FT_NEXT_UOFF3_LE to parse
in-memory 24-bit integers.