summaryrefslogtreecommitdiff
path: root/src/type1/t1driver.c
Commit message (Collapse)AuthorAgeFilesLines
* * src/type1/*: Clean up interface.Werner Lemberg2023-05-071-10/+17
| | | | | | | Ensure that all driver functions use the signature of the service or driver. This avoids pointer mismatches, which are technically undefined behaviour. Recent compilers are more picky in catching them as part of Control Flow Integrity tests.
* [truetype] Fix PostScript name handling for variation fonts.Werner Lemberg2023-05-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A variation font's PostScript name of a named instance is usually different from the PostScript name of an unnamed instance. However, if a change between a named instance and an unnamed instance with exactly the same design axis values happened, it was possible that the PostScript name wasn't correctly updated. This commit reorganizes the code to handle this issue within the top-level API functions, using a new service to trigger recomputation of the PostScript name. * include/freetype/internal/services/svmm.h (FT_Construct_PS_Name_Func): New typedef. (FT_Service_MultiMasters): New field `construct_ps_name`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Call `mm->construct_ps_name` to handle `postscript_name`. (FT_Set_Named_Instance): Call `mm->construct_ps_name` to handle `postscript_name`. Use shortcut. * src/cff/cffdrivr.c (cff_construct_ps_name): New function. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (tt_set_mm_blend): Don't handle `postscript_name`. (TT_Set_MM_Blend): Simplify. (TT_Set_Named_Instance): Return -1 if axis values haven't changed. Don't set `face_index`. (tt_construct_ps_name): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated. * src/type1/t1load.c (T1_Set_MM_Blend): Simplify.
* s/set_instance/set_named_instance/Werner Lemberg2023-05-061-1/+2
| | | | | | | | | | | | | | | | | | | * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): Renamed to... (FT_Set_Named_Instance_Func): ...this. (FT_Service_MultiMasters): Rename `set_instance` to `set_named_instance`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/base/ftmm.c (FT_Set_Named_Instance): Updated. * src/cff/cffdrivr.c (cff_set_instance): Renamed to... (cff_set_named_instance): ...this. (cff_service_multi_masters): Updated. * src/cff/cffobjs.c (cff_face_init): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* New Variation Font function `FT_Get_Default_Named_Instance`.Werner Lemberg2023-05-061-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/freetype/ftmm.h, src/base/ftmm.c (FT_Get_Default_Named_Instance): New function. * include/freetype/internal/services/svmm.h (FT_Get_Default_Named_Instance_Func): New typedef. (FT_Service_MultiMasters): New field `get_default_named_instance`. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * include/freetype/internal/tttypes.h (TT_Face): New field `var_default_named_instance`. * src/sfnt/sfobjc.s (sfnt_init_face): Initialize `var_default_named_instance`. * src/cff/cffdrivr.c (cff_get_default_named_instance): New function. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `var_default_named_instance`. (TT_Get_Default_Named_Instance): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated. * docs/CHANGES: Updated.
* Update all copyright notices.Werner Lemberg2023-01-171-1/+1
|
* [truetype, snft] Add service methods for `DeltaSetIdxMap` and `VarStore`.Dominik Röttsches2022-05-191-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be needed for 'COLR' v1 variation support. * src/truetype/ttgxvar.h (GX_ItemVarData, GX_AxisCoords, GX_VarRegion, GX_VarItemStore, GX_DeltaSetIdxMap): Move structures to... * include/freetype/internal/ftmmtypes.h: ... this new file. * include/freetype/internal/service/svmm.h (MultiMasters): Include `ftmmtypes.h`. (FT_Var_Load_Delta_Set_Idx_Map_Func, FT_Var_Load_Item_Var_Store_Func, FT_Var_Get_Item_Delta_Func, FT_Var_Done_Item_Var_Store_Func, FT_Var_Done_Delta_Set_Idx_Map_Func): New function typedefs. (MultiMasters): Add them. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cff/cffdrivr.c (cff_load_item_variation_store, cff_load_delta_set_index_mapping, cff_get_item_delta, cff_done_item_variation_store, cff_done_delta_set_index_map): New wrapper methods calling into mm service. (cff_service_multi_masters): Updated. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store, ft_var_load_delta_set_index_mapping, ft_var_get_item_delta, ft_var_done_item_variation_store, ft_var_done_delta_set_index_map): Renamed to ... (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, tt_var_get_item_delta, tt_var_done_item_variation_store, tt_var_done_delta_set_index_map): ... this for consistency. Mark them as non-static. * src/truetype/ttgxvar.h: Add corresponding prototypes. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* Update all copyright notices.Werner Lemberg2022-01-111-1/+1
|
* Update all copyright notices.Werner Lemberg2021-01-171-1/+1
|
* Remove redundant inclusion of `ft2build.h'.Werner Lemberg2020-06-131-1/+0
| | | | | | | * */*: Remove `#include <ft2build.h>' where possible. * include/freetype/freetype.h: Remove cpp error about missing inclusion of `ft2build.h'.
* Make macros for header file names optional.David Turner2020-06-081-14/+14
| | | | | | | | | | | | | | | | | We no longer have to take care of the 8.3 file name limit; this allows us (a) to introduce longer, meaningful file names, and (b) to avoid macro names in `#include' lines altogether since some compilers (most notably Visual C++) doesn't support this properly. */*: Replace #include FOO_H with #include <freetype/foo.h> or something similar. Also update the documentation.
* Update all copyright notices.Werner Lemberg2020-01-191-1/+1
|
* Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.Antony Lee2019-04-061-2/+2
| | | | | | | | | | | * include/freetype/freetype.h (FT_Get_Name_Index), include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc), include/freetype/internal/services/svgldict.h (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index), src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index), src/type42/t42drivr.c (t42_get_name_index): Add `const' to second argument.
* Update all copyright notices.Werner Lemberg2019-02-231-1/+1
|
* Update copyright years.Werner Lemberg2019-01-221-1/+1
|
* [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.Chris Liddell2018-11-271-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For multiple master fonts, common usage (in Postscript) is to modify the WeightVector of an existing font instance, this addition supports that use. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector, FT_Get_MM_WeightVector): New API functions. * include/freetype/internalservices/svmm.h (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New function types. (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector' members. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cffcffdrivr.c (cff_set_mm_weightvector, cff_get_mm_weightvector): New functions. (cff_service_multi_masters): Register them. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. This driver doesn't use the new interface. * src/type1/t1load.c (T1_Set_MM_WeightVector, T1_Get_MM_WeightVector): New functions. * src/type1/t1driver.c (t1_service_multi_masters): Register them. * src/type1/t1load.h: Updated.
* Don't use `trace_' prefix for FT_COMPONENT arguments.Werner Lemberg2018-08-151-1/+1
| | | | | | | | * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. (FT_TRACE): Use `FT_TRACE_COMP'. */* (FT_COMPONENT): Updated.
* [type1] Avoid segfaults with `FT_Get_PS_Font_Value'.Werner Lemberg2018-07-281-19/+38
| | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610 * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
* [GSoC] src/*.*: Convert block comments to `light' style.Werner Lemberg2018-06-031-63/+67
| | | | | | | | | | | This monster commit was created by applying Nikhil's scripts `docconverter.py' and `markify.py' to all C header and source files, followed up by minor manual clean-up. No change in functionality, of course. I used commit f7419907bc6044b9b7057f9789866426c804ba82 from https://github.com/nikramakrishnan/freetype-docs.git.
* Update copyright year.Werner Lemberg2018-01-021-1/+1
|
* Add missing ChangeLog entry, copyright notices, whitespace, formatting.Werner Lemberg2017-12-271-0/+1
|
* Move PostScript drivers' property handlers to `base'Ewald Hew2017-12-251-222/+3
| | | | | | | | | | | | | | | | This reduces the amount of duplicated code across PostScript drivers. * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c ({cff,cid,t1}_property_{get,set}): Moved to... * include/freetype/internal/ftpsprop.h: ...this new file. (ps_property_{get,set}): New functions to replace moved ones. * src/base/ftpsprop.c: Implement above functions. * include/freetype/internal/internal.h (FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro. * src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c: Updated. * src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated.
* New `ftdriver.h' file, covering all driver modules.Werner Lemberg2017-12-081-5/+5
| | | | | | | | | | | | | | | | | | | | | This reduces redundancy and increases synergy; it also reduces the number of header files. * include/freetype/config/ftheader.h (FT_DRIVER_H): New macro. (FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H, FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to FT_DRIVER_H. * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h, include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h, include/freetype/ftttdrv.h: Replaced with... * include/freetype/ftdriver.h: ...this new file. (FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to... (FT_HINTING_ADOBE): ... this new macro. (FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to... (FT_HINTING_FREETYPE): ... this new macro. * src/*/*: Updated accordingly.
* [type1, cid] Add hinting engine switch.Ewald Hew2017-10-121-0/+234
| | | | | | | | | | | | | Implement property service in `type1' and `cid' drivers to allow switching between FreeType or Adobe hinting engine when both are available. * src/cid/cidriver.c (cid_property_{set,get}, cid_services), src/type1/t1driver.c (t1_property_{set,get}, t1_services): Add Properties service. * src/cid/cidobjs.c (cid_driver_init), src/type1/t1objs.c (T1_Driver_Init): Add default property values.
* Make `FT_Set_Named_Instance' work.Werner Lemberg2017-10-071-1/+1
| | | | | | | | | | | | | | * src/cff/cffdrivr.c (cff_set_instance): New function. (cff_service_multi_masters): Register it. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Register it. * src/type1/t1load.c (T1_Reset_MM_Blend): New function. * src/type1/t1load.h: Updated. * src/type1/t1driver.c (t1_service_multi_masters): Register it.
* Add framework for setting named instance in MM service.Werner Lemberg2017-10-071-0/+1
| | | | | | | | | | | * include/freetype/internal/services/svmm.h (FT_Set_Instance_Func): New function typedef. (MultiMasters): Add `set_instance' member. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. * src/cff/cffdrivr.c (cff_service_multi_masters), src/truetype/ttdriver (tt_service_gx_multi_masters), src/type1/t1driver.c (t1_service_multi_masters): Updated.
* Add Adobe engine configuration.Ewald Hew2017-09-251-1/+1
| | | | | | | | | | | | | Use the previously changed PS_Driver in type1 module to store hinting engine configuration. * include/freetype/ftt1drv.h: New file. Duplicate and rename config options from CFF. * include/freetype/config/ftheader.h (FT_TYPE1_DRIVER_H): New macro. * src/type1/t1driver.c (t1_driver_class): Update declaration. * src/type1/t1objs.c: Include FT_TYPE1_DRIVER_H. (T1_Driver_Init): Update code.
* Update copyright year.Werner Lemberg2017-01-041-1/+1
|
* [truetype, type1] Add `get_var_blend' to MM service.Werner Lemberg2016-12-111-0/+1
| | | | | | | | | | | | | | | | For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Get_Var_Blend_Func): New typedef. (MultiMasters): Add `get_var_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_get_var_blend): New function. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* [truetype, type1] Add `done_blend' to MM service.Werner Lemberg2016-12-101-1/+3
| | | | | | | | | | | | | | | | | | For internal use; we want to share code between the forthcoming CFF2 support and TrueType. * include/freetype/internal/services/svmm.h (FT_Done_Blend_Func): New typedef. (MultiMasters): Add `done_blend'. (FT_Service_MultiMasters): Updated. * src/truetype/ttgxvar.c (tt_done_blend): Use `TT_Face' as argument. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttobjs.c (TT_Face_Done): Updated. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated. * src/type1/t1driver.c (t1_service_multi_masters): Updated.
* Add `FT_Get_Var_Design_Coordinates' function.Dave Arnold2016-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Note that the low-level functions aren't implemented yet. * include/freetype/ftmm.h: Declare. * include/freetype/internal/services/svmm.h (FT_Get_Var_Design_Func): New typedef. (MultiMasters): New MM service function `get_var_design'. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. Update all callers. * src/base/ftmm.c (FT_Get_Var_Design_Coordinates): Implement. * src/truetype/ttdriver.c: Updated. * src/truetype/ttgxvar.c (TT_Get_Var_Design): New dummy function to handle `get_var_design' service. * src/truetype/ttgxvar.h: Updated. * src/type1/t1driver.c: Updated. * src/type1/t1load.c (T1_Get_Var_Design): New dummp function to handle `get_var_design' service. * src/type1/t1load.h: Updated.
* Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.Werner Lemberg2016-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * include/freetype/ftmm.h: Declare. * include/freetype/internal/services/svmm.h (FT_Get_MM_Blend_Func): New typedef. (MultiMasters): New MM service function `get_mm_blend'. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated. Update all callers. * src/base/ftmm.c (FT_Get_MM_Blend_Coordinates, FT_Get_Var_Blend_Coordinates): Implement. * src/truetype/ttdriver.c: Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Blend): New function to handle `get_mm_blend' service. * src/truetype/ttgxvar.h: Updated. * src/type1/t1driver.c: Updated. * src/type1/t1load.c (T1_Get_MM_Blend): New function to handle `get_mm_blend' service. * src/type1/t1load.h: Updated. * docs/CHANGES: Document.
* s/0/NULL/ for function pointers; comments, formatting.Werner Lemberg2016-09-171-4/+4
|
* Various minor clang fixes.Werner Lemberg2016-01-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Initialize `ch'. * src/base/ftcalc.c (FT_MulFix) [FT_LONG64]: Add cast. * src/base/ftdbgmem.c (ft_mem_table_destroy): Add cast. * src/base/fthash.c (hash_num_lookup): Add cast. * src/base/fttrigon.c (ft_trig_downscale) [FT_LONG64]: Fix cast. * src/gxvalid/gxvcommn.c (gxv_EntryTable_validate): Comment out redundant code. * src/type1/t1driver.c (t1_get_ps_font_value) <PS_DICT_SUBR>: Add cast. * src/type1/t1load.c (parse_subrs): Fix type of `count'.
* Update copyright year.Werner Lemberg2016-01-131-1/+1
|
* [type1, psaux] Handle large values of num_subrs correctly (#46692).Werner Lemberg2015-12-201-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now use a hash to map from subr indices to array elements holding the subroutines, if necessary. * include/freetype/internal/t1types.h: Include FT_INTERNAL_HASH_H. (T1_FontRec): Add `subrs_hash' field. * include/freetype/internal/psaux.h: Include FT_INTERNAL_HASH_H. (T1_DecoderRec): Add `subrs_hash' field. * src/type1/t1load.h (T1_LoaderRec): Add `subrs_hash' field. * src/type1/t1driver.c: Include FT_INTERNAL_HASH_H. (t1_ps_get_font_value) [PS_DICT_SUBR]: Look up hash if necessary. * src/type1/t1load.c: Include FT_INTERNAL_HASH_H. (parse_subrs): Use hash for subr indices that exceed the allocated number of subr slots. (t1_init_loader): Remove unnecessary code. (t1_done_loader, T1_Open_Face): Updated. * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances, T1_Load_Glyph): Updated. * src/type1/t1objs.c (T1_Face_Done): Updated. * src/psaux/t1decode.c: Include FT_INTERNAL_HASH_H. (t1_decoder_parse_charstrings) [op_callsubr]: Look up hash if necessary. * src/cid/cidgload.c (cid_load_glyph): Updated.
* Comments.Werner Lemberg2015-10-301-14/+14
|
* Comments.Werner Lemberg2015-10-191-18/+19
|
* Rename `svxf86nm.h' to `svfntfmt.h'; update related symbols.Werner Lemberg2015-03-111-2/+2
| | | | | | | | | | | | | | | * 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.
* * src/type1/t1driver.c (t1_ps_get_font_value): Clean up.Werner Lemberg2015-02-181-14/+16
| | | | This handles negative values better, avoiding many casts.
* Run `src/tools/update-copyright'.Werner Lemberg2015-01-171-1/+1
|
* Fix clang warnings.Sean McBride2014-03-181-4/+1
| | | | | | | | | | | | | | | | | | | * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize some variables. * src/base/ftcalc.c (FT_MulFix): Only use code if `FT_MULFIX_INLINED' is not defined. * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class), src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make function static. * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant code.
* Next round of compiler fixes.Werner Lemberg2013-06-061-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init): Add proper cast. * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix cast. * include/freetype/internal/ftstream.h: Decorate stream and frame macros with `FT_Long' and `FT_ULong' as appropriate. * src/base/ftrfork.c (raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Use cast. * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast. * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast. * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto. * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast. * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto. * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto. * src/cid/cidparse.c (cid_parser_new): Use cast. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast. * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type. * src/raster/ftraster.c (ft_black_reset): Use cast. * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast. (ALL_POINTS): Fix cast. * src/type1/t1driver.c (t1_ps_get_font_value): Add casts. * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
* Apply fixes for cppcheck nitpicks.Werner Lemberg2013-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | | http://cppcheck.sourceforge.net/ Note that the current version heavily chokes on FreeType, delivering even wrong results. I will report those issues to the cppcheck team so that a newer version gives improved results hopefully. */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable): Remove unused variable. * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): Remove functionless code. * src/tools/ftrandom.c (main): Fix memory leak.
* */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.Werner Lemberg2013-05-101-4/+0
|
* */*: Use FT_Err_Ok only.Werner Lemberg2013-03-141-6/+6
| | | | This is a purely mechanical conversion.
* Add some variable initializations.Werner Lemberg2011-12-101-2/+2
| | | | | | | | Reported by Richard COOK <rscook@unicode.org>. * src/type1/t1driver.c (t1_ps_get_font_value): Initialize `val'. * src/smooth/ftgrays.c (gray_render_conic): Initialize `levels' earlier.
* [type1] Remove casts.Werner Lemberg2011-11-301-21/+24
| | | | | | | | | | * src/type1/t1driver.c (t1_driver_class): Remove all casts and update affected functions. * src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1objs.c: Updated for t1driver changes. src/type1/t1objs.h (T1_Driver): Remove unused typedef. Updated for t1driver changes.
* Whitespace.Werner Lemberg2011-11-301-4/+4
|
* Add FT_Get_PS_Font_Value() API.Chris Liddell2011-11-131-1/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Formatting, copyright years.Werner Lemberg2009-03-031-20/+30
|