summaryrefslogtreecommitdiff
path: root/src/winfonts/winfnt.c
Commit message (Collapse)AuthorAgeFilesLines
* XXX_cmap_encoding_char_next() return FT_UInt32 values.suzuki toshiya2009-07-031-1/+1
|
* For warning messages, replace FT_ERROR with FT_TRACE0.Werner Lemberg2009-06-261-4/+4
| | | | | | | FT_ERROR is now used only if a function produces a non-zero `error' value. Formatting, improving and harmonizing debug strings.
* Set `face_index' field in FT_Face for all font formats.Werner Lemberg2008-12-251-0/+2
| | | | | | | * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init), sfnt/sfobjs.c (sfnt_init_face): Do it. * docs/CHANGES: Document it.
* * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c,Werner Lemberg2008-12-211-3/+3
| | | | | | src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c: s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for errors in the bytecode interpreter only.
* * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c,Werner Lemberg2008-11-291-5/+6
| | | | | | | | src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c, src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c, src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c, src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings (Atari PureC).
* * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.cWerner Lemberg2008-10-011-7/+9
| | | | | | | | (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done), src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done), src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0. Reported by Graham Asher.
* * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):Werner Lemberg2008-05-131-3/+13
| | | | | Handle case `face_index < 0'. * docs/CHANGES: Document it.
* * src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driverWerner Lemberg2007-10-291-7/+3
| | | | | | can handle the font at all, then check `face_index'. Otherwise, the driver might return the wrong error code. This fixes Savannah bug #21468.
* Add support for cmap type 14.Werner Lemberg2007-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * devel/ftoption.h, include/freetype/config/ftoption.h (TT_CONFIG_CMAP_FORMAT_14): New macro. * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc, FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc, FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New support function prototypes. (FT_CMap_ClassRec): Add them. Update all users. * include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New macro. * include/freetype/freetype.h (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API functions. * src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary function. (FT_Set_Charmap): Disallow cmaps of type 14. (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API functions. * src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros. (TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info, tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant, tt_cmap14_char_var_index, tt_cmap14_char_var_isdefault, tt_cmap14_variants, tt_cmap14_char_variants, tt_cmap14_def_char_count, tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars, tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and structures for cmap 14 support. (tt_cmap_classes): Register tt_cmap14_class_rec. (tt_face_build_cmaps): One more error message. * docs/CHANGES: Mention cmap 14 support.
* * src/winfonts/winfnt.c (fnt_face_get_dll_font): Return errorWerner Lemberg2007-06-191-4/+20
| | | | | | | | | | | | FNT_Err_Invalid_File_Format if file format was recognized but the file doesn't contain any FNT(NE) or RT_FONT(PE) resources. Add verbose debug logs to make it easier to debug failing load attempts. (FNT_Face_Init): A single FNT font can't contain more than 1 face, so return an error if requested face index is > 0. Do not do further attempt to load fonts if a previous attempt has failed but returned error FNT_Err_Invalid_File_Format, i.e., the file format has been recognized but no fonts found in the file.
* * src/winfonts/winfnt.c (fnt_face_get_dll_font): Exit in case ofWerner Lemberg2007-06-171-0/+10
| | | | | invalid font. (FNT_Load_Glyph): Protect against invalid bitmap width.
* * src/winfonts/winfnt.h: Add necessary structures for PE resourceWerner Lemberg2007-06-161-3/+257
| | | | | | | | | | | | | parsing. (WinPE32_HeaderRec): New structure. (WinPE32_SectionRec): New structure. (WinPE_RsrcDirRec): New structure. (WinPE_RsrcDirEntryRec): New structure. (WinPE_RsrcDataEntryRec): New structure. (FNT_FontRec): Remove unused `size_shift' field. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Add support for loading bitmap .fon files in PE format.
* * src/winfonts/winfnt.c (fnt_face_get_dll_font): Do a rough check ofWerner Lemberg2007-06-061-0/+9
| | | | | | | | | | | | | | `font_count'. * src/type1/t1load.c (parse_font_matrix): Check `temp_scale'. * src/cff/cffgload.c (cff_decoder_prepare): Change return type to `FT_Error'. Check `fd_index'. (cff_slot_load): Updated. * src/cff/cffgload.h: Updated.
* * src/winfnt/winfnt.c (FNT_Face_Init): Check `family_size'.Werner Lemberg2007-06-051-1/+7
|
* * src/base/ftobjs.c (destroy_charmaps), src/type1/t1objs.cWerner Lemberg2007-06-031-5/+8
| | | | | (T1_Face_Done), src/winfonts/winfnt.c (FNT_Face_Done): Check for face == NULL. Suggested by Graham Asher.
* Because FT_Load_Glyph expects CID values for CID-keyed fonts, theWerner Lemberg2006-11-191-1/+2
| | | | | | | | | | | | | test for a valid glyph index must be deferred to the font drivers. This patch fixes Savannah bug #18301. * src/base/ftobjs.c (FT_Load_Glyph): Don't check `glyph_index'. * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/pcf/pcfdrivr.c (PCF_Glyph_Load), src/pfr/pfrobjs.c (pfr_slot_load), src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c (T1_Load_Glyph), src/winfonts/winfnt.c (FNT_Load_Glyph): Check validity of `glyph_index'.
* * include/freetype/internal/ftmemory.h, src/base/ftbitmap.c,David Turner2006-05-021-2/+6
| | | | | | | | | | src/base/ftmac.c, src/base/ftrfork.c, src/lzw/ftzopen.c, src/raster/ftrend1.c, src/sfnt/ttpost.c, src/truetype/ttgxvar.c, src/type42/t42parse.c, src/winfonts/winfnt.c: hardening the code against out-of-bounds conditions when allocating arrays. This is for the cases where FT_NEW_ARRAY and FT_RENEW_ARRAY are not used already. Introducing the new FT_ALLOC_MULT and FT_REALLOC_MULT macros.
* * builds/amiga/src/base/ftsystem.c, devel/ftoption.hDavid Turner2006-02-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | 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.
* * include/freetype/freetype.h (FT_Select_Size): Rename the secondWu, Chia-I (吳佳一)2006-01-231-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument from `idx' to `strike_index'. (FT_Size_Request_Type): Add FT_SIZE_REQUEST_TYPE_MAX to the end of this enum. * include/freetype/internal/ftobjs.h (FT_REQUEST_WIDTH, FT_REQUEST_HEIGHT): New macros to get the width and height of a request, in fractional pixels. * include/freetype/internal/ftobjs.h (FT_Select_Metrics, FT_Request_Metrics), src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): New base functions to set the font metrics. They were part of FT_Select_Size/FT_Request_Size and are made independent functions so that metrics are not set again and again. * src/base/ftobjs.c (FT_Select_Size, FT_Request_Size): Metrics are set only when driver's size_select/size_request is NULL. That is, drivers should set the metrics themselves. (FT_Match_Size): Round before matching. This was what we did and it does cause some problems without rounding. * src/cff/cffobjs.c (cff_size_select), src/truetype/ttdriver.c (tt_size_select): Set the font metrics. s/index/strike_index/. The scaled metrics are always preferred over strikes' metrics, even when some strike is selected. This is done because the strikes' metrics are not reliable, e.g., the sign of the descender is wrong for some fonts. * src/cff/cffobjs.c (cff_size_request), src/truetype/ttdriver.c (tt_size_request): Set the font metrics. Call cff_size_select/tt_size_select when some strike is matched. * src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/cid/cidobjs.c, src/pcf/pcfdrivr.c, src/truetype/ttdriver.c, src/type1/t1objs.c, src/type1/t1objs.h, src/type42/t42objs.c, src/winfonts/winfnt.c: Set the font metrics. s/index/strike_index/. * src/tools/test_afm.c, src/psaux/psconv.c: Older versions of these files were committed. Just a catch-up. (PS_Conv_ToFixed): Remove the `goto'. (PS_Conv_ASCIIHexDecode, PS_Conv_EexecDecode): Speed up a little. * src/sfnt/ttsbit.c (tt_face_load_sbit_strikes, tt_face_load_strike_metrics), src/sfnt/ttsbit0.c (tt_face_load_sbit_strikes, tt_face_load_strike_metrics): The advertised metrics in `available_sizes' are different from those actually used.
* * include/freetype/internal/ftobjs.h, src/base/ftobjs.c,Wu, Chia-I (吳佳一)2006-01-151-2/+2
| | | | | | | | | src/bdf/bdfdrivr.c, src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c: s/ft_fake_vertical_metrics/ft_synthesize_vertical_metrics/. * docs/CHANGES: Mention that vertical metrics are synthesized for fonts not having this info.
* * include/freetype/internal/ftobjs.h (ft_fake_vertical_metrics),Wu, Chia-I (吳佳一)2006-01-151-0/+3
| | | | | | | | | | | | | src/base/ftobjs.c (ft_fake_vertical_metrics): New function to fake the vertical metrics. * src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c: Fake the vertical metrics. The fake metrics is monotone. * src/truetype/ttgload.c (compute_glyph_metrics): Some fixes and formattings in vertical metrics faking. There are still rooms for improvements (and so do the CFF module).
* * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/pcf/pcfdrivr.cWu, Chia-I (吳佳一)2006-01-151-3/+0
| | | | | | | | | | | | | | | | (PCF_Glyph_Load), src/winfonts/winfnt.c (FNT_Load_Glyph): Don't set the linear advance fields as they are only for the outline glyphs. * include/freetype/freetype.h: Documentation updates/clarificatoins. The meaning of FT_LOAD_FORCE_AUTOHINT is changed so that no real change need be made to the code. * src/base/ftobjs.c (FT_Load_Glyph): Resolve flag dependencies and decide whether to use the auto-hinter according to documentation. There should to be no real difference. Some checks (e.g., is text height positve?) after the glyph is loaded. (FT_Select_Size, FT_Request_Size): Scales are set to wrong values. Be careful that scales won't be negative.
* Formatting, comment fixes.Werner Lemberg2006-01-141-0/+2
|
* * docs/CHANGES: Mention the size selection change.Wu, Chia-I (吳佳一)2006-01-141-8/+31
| | | | | | | | | | | | | | * src/bdf/bdfdrivr.c (BDF_Size_Request, BDF_Size_Select), src/pcf/pcfdrivr.c (PCF_Size_Request, PCF_Size_Select), src/winfonts/winfnt.c (FNT_Size_Request, FNT_Size_Select): Do size matching for request of type NOMINAL and REAL_DIM. * src/winfonts/winfnt.c (FNT_Face_Init): Print trace message when `pixel_height' is used for nominal height. * src/base/ftobjs.c (FT_Request_Size): Call `FT_Match_Size' if the face is bitmap only and driver doesn't provide `request_size'. This is added merely for completion as no driver satisfies the conditions.
* Formatting, copyright year updates.Werner Lemberg2006-01-131-1/+2
| | | | Decorate long constants with `L' and `UL' where appropriate.
* * include/freetype/internal/sfnt.h (SFNT_Interface): New methodWu, Chia-I (吳佳一)2006-01-131-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.
* * src/winfonts/winfnt.c (FNT_Face_Init): Set x_ppem and y_ppemWerner Lemberg2004-06-151-7/+3
| | | | | based on pixel_width and pixel_height. (FNT_Size_Set_Pixels): Updated.
* * src/winfonts/winfnt.c: adding missing initialization of theDavid Turner2004-06-091-0/+2
| | | | | slot->metrics.width and slot->metrics.height when loading a Windows FNT glyph. Thanks to Huw Davies
* Handle broken FNT files which don't have a trailing NULL byteWerner Lemberg2004-04-011-6/+22
| | | | | | | | | | | in the face name string. * src/winfnt/winfnt.h (FNT_FontRec): New member `family_name'. * src/winfnt/winfnt.c (fnt_font_done): Free font->family_name. (FNT_Face_Init): Append a final zero byte to the font face name. * src/sfnt/ttload.c (tt_face_load_sfnt_header): Fix change from 2004-03-19.
* * src/base/ftobjs.c (destroy_charmaps): New function.Werner Lemberg2004-01-051-1/+1
| | | | (destroy_face, open_face): Use `destroy_charmaps'.
* * docs/CHANGES: Updated.Werner Lemberg2004-01-021-2/+2
| | | | | * src/winfonts/winfnt.c (FNT_Size_Set_Pixels): Fix sign of size->metrics.descender.
* * include/freetype/ftwinfnt.h (FT_WinFNT_ID_*): New definitionsWerner Lemberg2003-12-221-3/+10
| | | | | | | | | | | to describe the `charset' field in FT_WinFNT_HeaderRec. * src/winfonts/winfnt.c (FNT_Face_Init): Set encoding to FT_ENCODING_NONE except for FT_WinFNT_ID_MAC. * include/freetype/freetype.h (FT_Encoding): Improve comment, based on work by Detlef Wrkner <TetiSoft@apg.lahn.de>. * docs/CHANGES: Updated.
* Only whitespace changes.Werner Lemberg2003-10-231-2/+2
|
* * src/winfonts/winfnt.c (fnt_cmap_class): Fix position of `const'.Werner Lemberg2003-10-211-1/+1
|
* * src/autohint/ahglobal.c (blue_chars), src/winfonts/winfnt.cWerner Lemberg2003-10-151-8/+5
| | | | | | | | | (fnt_cmap_class_rec, fnt_cmap_class), src/bdf/bdflib.c (empty, _num_bdf_properties), src/gzip/infutil.c (inflate_mask), src/gzip/inffixed.h (fixed_bl, fixed_bd, fixed_tl, fixed_td), src/gzip/inftrees.h (inflate_trees_fixed), srf/gzip/inftrees.c (inflate_trees_fixed): Decorate with more `const' to avoid writable global variables which are disallowed on ARM.
* * src/winfonts/winfnt.c (FT_WinFNT_HeaderRec): `color_table_offset'Werner Lemberg2003-10-021-3/+22
| | | | | | has four bytes, not two. Fix all users. (fnt_font_load, FNT_Load_Glyph): Add more font validity tests.
* * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE):Werner Lemberg2003-09-221-0/+2
| | | | | | | Fix compilation warning (s/pptr/Pptr/). * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H, FT_INTERNAL_FNT_TYPES_H): Removed.
* * include/freetype/internal/fnttypes.h,David Turner2003-09-211-4/+44
| | | | | | | | | | include/freetype/internal/ftserv.h, src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c, src/base/ftpfr.c, src/base/ftwinfnt.c, src/base/ftxf86.c, src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/winfonts/winfnt.h, include/freetype/internal/service/svwinfnt.h,: simplification of service lookup macros, updating the PFR and WINFNT font drivers to new services
* * include/freetype/internal/ftserv.h,David Turner2003-09-211-3/+3
| | | | | | | | | | | | | | | | include/freetype/internal/service/svpfr.h, include/freetype/internal/pfr.h, src/base/ftpfr.c: migrating the functions of "ftpfr.h" to the new service-base internal API * src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrsbit.c, src/psaux/psobjs.c, src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/truetype/ttobjs.c, src/type1/t1driver.c, src/type1/t1objs.c, src/type42/t42objs.c, src/winfonts/winfnt.c: removing various compiler warnings
* A new try to synchronize bitmap font access.Werner Lemberg2003-07-011-148/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char inWerner Lemberg2003-06-221-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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_/.
* * src/psnames/psmodule.c (ps_unicode_value): Add support toWerner Lemberg2003-06-201-4/+3
| | | | | | recognize `uXXXX[X[X]]' glyph names. Don't handle glyph names starting with `uni' which have more than four digits.
* * include/freetype/freetype.h (FT_Open_Flags): Replaced withWerner Lemberg2003-06-181-4/+4
| | | | | | | | | | | | | | | | | | | | #defines for the constants. (FT_Open_Args): Change type of `flags' to FT_UInt. (FT_GlyphSlot): Move `flags' to FT_Slot_Internal. * include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag): Replaced with #defines for the constants. * include/freetype/internal/ftobjs.h (FT_Slot_Internal): New field `flags' (from FT_GlyphSlot). Updated all affected source files. (FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h). * include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved to ftobjs.h. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy FT_GlyphSlot_Internal object.
* * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,Werner Lemberg2003-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change fromWerner Lemberg2003-06-021-4/+20
| | | | 2003-03-20.
* Cleanups.Werner Lemberg2003-04-231-2/+2
|
* * docs/*: serious rewriting of the documentationDavid Turner2003-03-201-17/+3
| | | | | | | | | | | | | | | | * 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
* * include/freetype/config/ftheader.h, include/freetype/internal/fnttypes.h,David Turner2003-01-151-4/+5
| | | | | | | | include/freetype/ftwinfnt.h, src/base/winfnt.c, src/winfonts/winfnt.c, src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: added a Windows .FNT specific API (mostly for Wine). Also fixed a nasty bug in the header loader which would cause invalid memory overwrites
* * src/winfonts/winfnt.c: read 16 bytes into "reserved2", not "reserved"David Turner2003-01-081-1/+1
|
* * src/winfonts/winfnt.c: included George Williams' fix to supportDavid Turner2002-12-181-3/+14
| | | | version 2 fonts correctly