summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* vms_make.com: Create shared executable for x86 version of OpenVMS.HEADmasterJouk Jansen2023-05-171-1/+1
|
* Add new load flag `FT_LOAD_NO_SVG`.Werner Lemberg2023-05-155-8/+21
| | | | | | | | | | | | | | Modern color fonts often contain both an 'SVG' and 'COLR' table. FreeType always preferred 'SVG' over 'COLR' (this was a design decision), however, this might not be the right choice for the user. The new flags makes FreeType ignore the 'SVG' table while loading a glyph. Fixes #1229. * include/freetype/freetype.h (FT_LOAD_NO_SVG): New macro. * src/base/ftobjs.c (FT_Load_Glyph), src/cff/cffgload.c (cff_slot_load), src/truetype/ttgload.c (TT_Load_Glyph): Use it.
* .mailmap: Updated.Werner Lemberg2023-05-131-1/+2
|
* [cache] Merge functions.Alexei Podtelezhnikov2023-05-121-30/+17
| | | | | * src/cache/ftccache.c (FTC_Cache_Init): Merge into... (ftc_cache_done): ... this function, with unnecessary checks removed.
* [cache] Minor casting and cosmetic updates.Alexei Podtelezhnikov2023-05-122-17/+17
| | | | | | * src/cache/ftcglyph.c (ftc_gcache_{init,done}): Remove casting. (FTC_GCache_Lookup): Cosmetic variable renaming. * src/cache/ftcsbits.c (ftc_snode_compare): Formatting.
* * include/freetype/ftcache.h: Typo, punctuation.Werner Lemberg2023-05-121-10/+9
|
* * include/freetype/ftcache.h: Formatted and updated.Alexei Podtelezhnikov2023-05-111-42/+43
|
* * include/freetype/internal/t1types.h: Fix the indentation.suzuki toshiya2023-05-121-13/+13
|
* [cache] Revise the dynamic hash table accounting.Alexei Podtelezhnikov2023-05-112-48/+45
| | | | | | | | | | | | | Instead of counting entries relative to the middle of the hash table, this switches to the absolute counter with the full index range mask. As a result, some calculations become a bit simpler. The cache resizing logic stays largely the same. * src/cache/ftccache.h (FTC_NODE_TOP_FOR_HASH): Revised with new counter. * src/cache/ftccache.c (ftc_get_top_node_for_hash): Ditto. (ftc_cache_resize): Simplify reallocations and stop their zeroing. (ftc_cache_init): Stop over-allocating but keep zeroing initially. (FTC_Cache_Clear, FTC_Cache_RemoveFaceID): Updated accordingly.
* [t1cid] Set FT_FACE_FLAG_CID_KEYED.suzuki toshiya2023-05-112-1/+15
| | | | | | | * cidobjs.c (cid_face_init): Set FT_FACE_FLAG_CID_KEYED. * cidriver.c (cid_get_is_cid): Comment about the case that is_cid cannot guarantee the glyph collection specification.
* * src/smooth/ftgrays.c (FT_SSE2): Don't define for VMS.Jouk Jansen2023-05-091-3/+3
|
* * src/cff/cffdrivr.c (cff_glyph_load): Fix guard for `size`.Werner Lemberg2023-05-081-1/+1
| | | | | | | | This was forgotten to change in commit 2b54eba36b (in May 2004). Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58739
* Minor compiler warning fixes.Werner Lemberg2023-05-083-5/+5
| | | | | | | * src/autofit/afcjk.c (af_cjk_get_standard_widths), src/autofit/aflatin.c (af_latin_get_standard_widths): Use `FT_CALLBACK_DEF`. * src/cff/cffparse.c (cff_parser_run): Initialize and fix allocation of `q`.
* * src/psaux/t1cmap.c: Signature fixes.Werner Lemberg2023-05-081-58/+77
|
* * src/bzip2/ftbzip2.c: Signature fixes.Werner Lemberg2023-05-081-7/+12
|
* [cache] Signature fixes.Werner Lemberg2023-05-085-58/+5
| | | | | | | | | | | | * src/cache/ftcglyph.c, src/cache/ftcglyph.h (FTC_GNode_Compare): Remove redundant function. It is equivalent to `ftc_gnode_compare` and becomes completely meaningless with fixed signatures. Update all callers. * src/cache/ftcsbits.c, src/cache/ftcsbits.h (FTC_SNode_Compare): Remove redundant function. It is equivalent to `ftc_snode_compare` and becomes completely meaningless with fixed signatures. Update all callers.
* [sdf] Signature fixes.Werner Lemberg2023-05-073-10/+17
|
* * src/svg/ftsvg.c: Signature fixes.Werner Lemberg2023-05-071-9/+14
|
* [raster] Signature fixes.Werner Lemberg2023-05-072-5/+12
|
* [smooth] Signature fixes.Werner Lemberg2023-05-072-12/+36
|
* [pshinter] Signature fixes.Werner Lemberg2023-05-072-14/+58
| | | | | | | | * src/pshinter/pshrec.c (t1_hints_close, t1_hints_apply): New wrapper functions. (t1_hints_funcs_init): Use them. (t2_hints_close, t2_hints_apply): New wrapper functions. (t2_hints_funcs_init): Use them.
* [autofit] Signature fixes.Werner Lemberg2023-05-079-59/+88
|
* * src/sfnt/ttcmap: Signature fixes.Werner Lemberg2023-05-071-182/+239
|
* * src/pcf/pcfdrivr.c: Signature fix.Werner Lemberg2023-05-071-1/+1
|
* * src/winfonts/winfnt.c: Signature fixes.Werner Lemberg2023-05-071-17/+21
|
* * src/type42/t42parse.c: Signature fixes.Werner Lemberg2023-05-071-42/+50
|
* [pfr] Signature fixes.Werner Lemberg2023-05-072-48/+58
|
* * src/cid/cidload.c: Signature fixes.Werner Lemberg2023-05-071-21/+30
|
* * src/cff/cffcmap.c: Signature fixes.Werner Lemberg2023-05-071-35/+46
|
* * src/type1/t1load.c: Signature fixes.Werner Lemberg2023-05-071-61/+85
|
* [truetype] Signature fixes.Werner Lemberg2023-05-072-2/+4
|
* [base] Signature fixes.Werner Lemberg2023-05-072-22/+40
|
* * src/type42/t42drivr.c: Clean up interface.Werner Lemberg2023-05-071-16/+27
| | | | | | | 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.
* * src/type1/*: Clean up interface.Werner Lemberg2023-05-074-52/+67
| | | | | | | 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.
* * src/truetype/*: Clean up interface.Werner Lemberg2023-05-077-198/+220
| | | | | | | 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.
* * src/sfnt/sfdriver.c, src/sfnt/ttbdf.c: Clean up interface.Werner Lemberg2023-05-073-44/+66
| | | | | | | | | | 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. * src/sfnt/sfdriver.c (sfnt_load_table): New wrapper function. (sfnt_service_sfnt_table): Use it.
* * src/psnames/psmodule.c: Use `FT_CALLBACK_DEF`.Werner Lemberg2023-05-071-6/+6
|
* * src/pfr/pfrdrivr.c: face -> pfrface, pfrface -> face.Werner Lemberg2023-05-071-13/+13
|
* * src/pcf/pcfdrivr.c: Clean up interface.Werner Lemberg2023-05-071-58/+62
| | | | | | | 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.
* * src/cid/cidriver.c: Clean up interface.Werner Lemberg2023-05-071-20/+24
| | | | | | | 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.
* * src/bdf/bdfdrivr.c: Clean up interface.Werner Lemberg2023-05-071-56/+60
| | | | | | | 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.
* * src/cff/*: Clean up interface.Werner Lemberg2023-05-074-155/+173
| | | | | | | 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 style name handling for variation fonts.Werner Lemberg2023-05-063-2/+25
| | | | | | | | | | | * include/freetype/internal/tttypes.h (TT_FaceRec): New field `non_var_style_name`. * src/sfnt/sfobjs.c (sfnt_load_face): Initialize `non_var_style_name`. (sfnt_done_face): Free `non_var_style_name`. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Restore non-VF style name if switching back to non-VF mode.
* [truetype] Fix PostScript name handling for variation fonts.Werner Lemberg2023-05-068-38/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * include/freetype/internal/services/svmm.h: Minor changes.Werner Lemberg2023-05-061-5/+5
|
* [truetype] Fix deactivation of variation font handling.Werner Lemberg2023-05-066-46/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the documentation, the functions `FT_Set_Named_Instance`, `FT_Set_MM_Design_Coordinates`, `FT_Set_Var_Design_Coordinates`, and `FT_Set_Var_Blend_Coordinates` can unset the `FT_FACE_FLAG_VARIATION` flag. (The same is true for `FT_Set_MM_WeightVector` but this information was accidentally omitted from the documentation.) However, if a call of these functions didn't change the axis values this could fail because internal shortcuts exited too early. This commit reorganizes the code to handle `FT_FACE_FLAG_VARIATION` in the top-level API functions, also taking care of the issue at hand. * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_MM_WeightVector, FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Handle `FT_FACE_FLAG_VARIATION`. * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design, TT_Set_Named_Instance) Don't handle `FT_FACE_FLAG_VARIATION`. * src/type1/t1load.c (T1_Set_MM_Blend, T1_Set_MM_WeightVector, T1_Set_MM_Design): Ditto. * src/cff/cffobjs.c (cff_face_init): Use `FT_Set_Named_Instance` instead of low-level functions. * src/truetype/ttobjs.c (tt_face_init): Ditto.
* s/set_instance/set_named_instance/Werner Lemberg2023-05-066-14/+18
| | | | | | | | | | | | | | | | | | | * 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-0611-91/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* [cid] Improve tracing messages; formatting.Werner Lemberg2023-05-063-49/+56
|
* * src/cache/ftccache.c (ftc_node_hash_unlink): Minor.Alexei Podtelezhnikov2023-05-041-1/+1
|