|
7ef26604
|
2021-11-04T09:10:57
|
|
[sfnt] Reduce footprint if WOFF and WOFF2 support is not needed.
Based on a patch from metarutaiga (MR !106). The gist of this commit is
that it doesn't make sense to support WOFF without compression (which would
be only possible in WOFF 1.0 anyway).
* src/sfnt/sfobjs.c (sfnt_open_font): Guard WOFF code with
`FT_CONFIG_OPTION_USE_ZLIB` block.
Guard WOFF2 code with `FT_CONFIG_OPTION_USE_BROTLI` block.
* src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: Guard files with
`FT_CONFIG_OPTION_USE_ZLIB` blocks, not parts of the code.
* src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h, src/sfnt/woff2tags.c,
src/sfnt/woff2tags.h: Guard files with `FT_CONFIG_OPTION_USE_BROTLI` blocks,
not parts of the code.
Fixes #1111.
|
|
bb4e049a
|
2021-11-04T08:58:13
|
|
[truetype] Make trickyness checks depend on TT_USE_BYTECODE_INTERPRETER.
Based on a patch from metarutaiga (MR !106).
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag,
tt_check_trickyness_family, tt_synth_sfnt_checksum, tt_get_sfnt_checksum,
tt_check_trickyness_sfnt_ids, tt_check_trickyness): Put functions into a
`TT_USE_BYTECODE_INTERPRETER` block.
(tt_face_init): Put trickyness checks into a `TT_USE_BYTECODE_INTERPRETER`
block.
Fixes #1111.
|
|
9ebdc9cb
|
2021-11-07T23:21:40
|
|
* src/sfnt/ttload.c (tt_face_load_gasp): Fix a type mismatch warning.
|
|
7f4b9bfb
|
2021-11-07T10:20:16
|
|
[dlg] Define DLG_STATIC explicitly.
DLG_STATIC is intended to disable Windows DLL linking attributes.
It does not hurt to define it explicitly when we wrap DLG code.
This fixes tons of LNK4286 and C4273 warnings from MSVC if we
forget to define DLG_STATIC as a compiler option.
* builds/windows/vc2010/freetype.vcxproj: Remove DLG_STATIC option.
* src/dlg/dlgwrap.c [FT_DEBUG_LOGGING]: Define DLG_STATIC.
* include/freetype/internal/ftdebug.h [FT_DEBUG_LOGGING]: Ditto.
|
|
c693377e
|
2021-11-07T10:05:05
|
|
[dlg] Lighten up the inclusions.
The DLG wrapper needs to know if FT_DEBUG_LOGGING is defined in
`ftoption.h`. It does not need entire FreeType.
* src/dlg/dlgwrap.c: Include FT_CONFIG_OPTIONS_H directly.
|
|
cb9e7b7a
|
2021-11-06T22:59:31
|
|
[truetype] Avoid some memory zeroing in variations.
* src/truetype/ttgxvar.c (ft_var_readpackeddeltas, ft_var_load_avar,
ft_var_load_item_variation_store, ft_var_load_gvar): Use FT_QNEW_ARRAY
if memory immediately initialized or discarded otherwise.
|
|
fc55291b
|
2021-11-04T11:07:43
|
|
[truetype] Fix handling of packed deltas in Variation Fonts.
* src/truetype/ttgxvar (ft_var_readpackeddeltas): Don't expect the number of
bytes used to encode the deltas to be higher than the number of encoded
values. The specification allows a very compact encoding; for example, a
list of 200 zeros can be encoded with just a couple of bytes.
We now count the consumed bytes to make sure to not read more than expected.
|
|
9ed5332f
|
2021-11-04T08:56:59
|
|
[truetype] Fix CVAR handling of tuples for all points.
* src/truetype/ttgxvar (tt_face_vary_cvt): Function
`ft_var_readpackedpoints`, when it returns `ALL_POINTS`, also sets
`point_count` to value 0. However, the CVAR code was incorrectly expecting
that `point_count` would be set to match the length of the CVT table.
|
|
23d1d8ad
|
2021-11-04T08:55:39
|
|
* src/truetype/ttgxvar.c: Fix typos in macros that guard CVAR code.
|
|
d3d3ff76
|
2021-11-01T17:32:27
|
|
[sfnt] Clarify `COLR` v1 FT_Paint* format representations
* include/freetype/ftcolor.h (FT_PaintLinearGradient,
FT_PaintRadialGradient, FT_PaintSweepGradient, FT_PaintTransform,
FT_PaintTranslate, FT_PaintScale, FT_PaintRotate, FT_PaintSkew): Clarify
16.16 fixed point representation of struct fields.
* src/sfnt/ttcolr.c (read_paint): Shift coordinates for
FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintSweepGradient
accordingly.
Fixes: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1110
|
|
94cb3a2e
|
2021-10-29T10:31:59
|
|
* src/truetype/ttgload.c (load_truetype_glyph): Fix MSVC warning C4312.
|
|
793c0126
|
2021-10-27T22:36:11
|
|
[woff] Optimize table tagging.
* include/freetype/internal/wofftypes.h (WOFF_TableRec): Use
32-bit tag.
* src/sfnt/sfwoff.c (woff_open_font): Use 32-bit tag.
|
|
a577bbcb
|
2021-10-27T22:24:27
|
|
[woff2] Optimize table tagging.
Fixes #1107.
* include/freetype/internal/wofftypes.h (WOFF2_TableRec): Use
32-bit tag.
* src/sfnt/sfwoff2.c (compare_tags, find_table, woff2_open_font):
Use 32-bit tag.
* src/sfnt/woff2tags.[ch] (woff2_known_tags): Use static storage and
return 32-bit tag.
|
|
80b13f57
|
2021-10-26T10:57:17
|
|
Formatting.
|
|
535c67dd
|
2021-10-25T22:38:05
|
|
[mm] Tolerate missing Blend dictionary entries
In a Multiple Master font, the Blend dictionary must contain valid
Private, FontInfo, and FontBBox. The current code will error if any of
these are present and invalid, but will not error and will provide
uninitialized data if the Blend dictionary exists but does not contain
one of these entries. This change reverts to the older behavior of
treating any missing entries as containing all zero data and not
returning an error.
In the future it may be best to keep track of when these are actually
initialized and error if they are not.
* src/type1/t1load.c (t1_allocate_blend): Zero initiailize.
|
|
65be4b21
|
2021-10-21T09:55:28
|
|
[mm] Delay setting blend weight and design position.
Previously the `blend->weight_vector`, `blend->default_weight_vector`,
and `blend->design_pos` were set early to allocated but uninitialized
memory under the assumption that the memory would eventually be
initialized. However, it is possible that some of the required
keywords may not actually be present, leaving the memory uninitialized.
This is different from a present but invalid table, which would produce
an error.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1261762
* src/type1/t1load.c (t1_allocate_blend): Remove early allocation and
initialization.
(parse_blend_design_positions, parse_weight_vector): Parse into local
and assign to blend if valid.
(T1_Open_Face): Check that if a blend exists that it has the weight
vector and design positions.
|
|
b5e003f1
|
2021-10-21T09:48:38
|
|
[cff] Commit vstore data and regions on allocation.
The vstore->regionCount and vstore->dataCount were read directly
from the data. However, vstore->varRegionList and vstore->varData
would still contain uninitialized entries with uninitialized
pointers in the event of an error, leading to issues when attempting
to clean up.
Reportd as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40104
* src/cff/cffload.c (cff_vstore_load): Read the region and data counts
into locals and update the vstore counts immediately after each entry
becomes free-able.
|
|
fde91ab8
|
2021-10-20T11:45:15
|
|
[sfnt] Delay setting gasp ranges and count until computed.
Previously, the gasp.numRanges was set and gasp.gaspRanges was
allocated and assigned before a possible early exit if the frame could
not be entered. It is also possible that the gaspRanges allocation
could fail but the numRanges still be set to non-zero. In such cases
an error would be returned, but the face would have a gasp in an
inconsistent state which may still be accessed.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1261450
* src/sfnt/ttload.c (tt_face_load_gasp): Delay setting gasp.numRanges
and gasp.gaspRanges until after the ranges are initialized.
|
|
6d12e3a0
|
2021-10-20T11:38:16
|
|
[sfnt] Delay setting names and langTags until computed.
Previously, the table->names and table->langTags fields were created
pointing to uninitialized memory and an early exit could happen if the
frame could not be entered. The caller would then be unable to properly
dispose of the memory as the string fields had not been initialized.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1261343
* src/sfnt/ttload.c (tt_face_load_name): delay setting table->langTags
and table->names until after the memory they will point to is fully
initialized.
|
|
8ef8072b
|
2021-10-19T22:59:46
|
|
[bdf, cid, pfr, winfonts] Improve rejection of other font formats.
This is mainly for better diagnostics of malformed fonts.
* src/bdf/bdflib.c (_bfd_readstream): Stop font format testing if the first
input line is too long or doesn't end with `\r` or `\n`.
* src/cid/cidparse.c (cid_parser_new): Don't handle too short input as an
error but as an unknown format.
* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
* src/winfonts/winfnt.c (fnt_font_load, fnt_face_get_dll_font): Ditto.
|
|
38b349c4
|
2021-10-18T20:35:28
|
|
[pcf] Zero out the allocated properties.
Fallout reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40033
* src/pcf/pcfread.c (pcf_get_properties): Use FT_NEW_ARRAY and zero
out `properties` in case of failure.
|
|
986d503f
|
2021-10-17T09:14:27
|
|
* src/sfnt/ttload.c (tt_face_load_name): NULL-initialize langTag.
Another attempt to fix fallout reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40024
|
|
30ca63d4
|
2021-10-16T23:02:47
|
|
[bdf] Fix up user properties.
Fallout reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40027
* src/bdf/bdflib.c (_bdf_add_property): Cosmetic NULL.
(bdf_create_property): Limit allocations to customary signed
FT_Long and NULL-initialize unused storage.
(bdf_free_font): Do not free unused storage.
|
|
afd1cb28
|
2021-10-16T20:25:11
|
|
* src/sfnt/ttload.c (tt_face_load_name): Accounting fix.
Fallout reported as
https://crbug.com/40024
|
|
c71eb22d
|
2021-10-15T22:18:38
|
|
Fix typos in memory macros.
FT_QNEW_ARRAY and FT_QRENEW_ARRAY were using the non-Q
FT_MEM_NEW_ARRAY and FT_MEM_RENEW_ARRAY. Change these to use the Q
versions. Also fix the one issue discovered in tt_face_load_name
where table->names is created with FT_QNEW_ARRAY but the extra
string member is not initialized to NULL.
* include/freetype/internal/ftmemory.h (FT_Q(RE)NEW_ARRAY):
Use FT_MEM_Q(RE)NEW_ARRAY as needed.
* src/sfnt/ttload.c (tt_face_load_name): Initialize `entry->string`.
|
|
8406ae53
|
2021-10-15T14:16:30
|
|
[truetype] Reload context after re-executing `prep`.
When a different hinting mode from the current is selected, the `prep` table
must be re-executed with the new mode. After this happens the context must
be re-loaded in preparation for the glyph program to be run.
Fixes #1104.
* truetype/ttgload.c (tt_loader_init): Add call to `TT_Load_Context`.
|
|
0b92c56c
|
2021-10-15T19:02:41
|
|
[truetype] Minor documentation improvements.
|
|
e294a95c
|
2021-10-11T23:25:29
|
|
* src/cid/cidload.c (parse_fd_array): Protect against trancation.
|
|
1029eb93
|
2021-10-11T22:25:14
|
|
[type1] Revert to signed size for binary data.
Recently introduced and reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39838
* src/type1/t1load.c (read_binary_data): Reject negative size.
(parse_subrs, parse_charstrings): Use customary signed size.
|
|
77bd46e9
|
2021-10-10T23:12:12
|
|
[psaux] Signedness revisions.
Unsigned indexes are easier to check.
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Updated.
* src/psaux/psintrp.c (cf2_interpT2CharString): Ditto.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
* src/type1/t1load.c (read_binary_data): Ditto.
|
|
3b036820
|
2021-10-10T23:11:10
|
|
[cid] Signedness revisions.
Unsigned checks are simpler.
* include/freetype/t1tables.h (CID_FaceInfoRec): Change to unsignd
`num_dicts`.
* src/cid/cidparse.h (CID_Parser): Change to unsigned `num_dict`.
* src/cid/cidgload.c (cid_load_glyph): Updated.
* src/cid/cidload.c (cid_load_keyword, parse_fd_array,
parse_expansion_factor, parse_font_name, cid_read_subrs,
cid_face_open): Updated.
* src/cid/cidobjs.c (cid_face_done): Updated.
* src/cid/cidparse.c (cid_parser_new): Updated.
|
|
012b4f2d
|
2021-10-08T22:14:12
|
|
* src/cid/cidload.c (cid_face_open): Streamline CIDCount check.
|
|
946df221
|
2021-10-07T22:44:53
|
|
* src/cid/cidload.c (cid_face_open): Streamline SubrCount check.
|
|
0313a11c
|
2021-10-07T22:43:12
|
|
* src/cid/cidgload.c (cid_load_glyph): Fortify incremental loading.
|
|
22befeef
|
2021-10-07T22:41:56
|
|
Signedness revisions.
This eliminates explicit casting by switching to unsigned fields.
The revisions mostly impact the handling of CID fonts.
* include/freetype/fttypes.h (FT_Data): Change to unsigned `length`.
* include/freetype/t1tables.h (CID_FaceDictRec): Ditto for `sd_bytes`.
(CID_FaceInfoRec): Ditto for `gd_bytes` and `gd_bytes`.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Ditto for
`byte_len`.
* src/cid/cidgload.c (cid_load_glyph): Updated.
* src/cid/cidload.h (cid_get_offset): Update argument.
* src/cid/cidload.c (cid_get_offset, cid_read_subrs, cid_face_open):
Updated.
* src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data):
Updated.
* src/psaux/psft.c (cf2_getT1SeacComponent): Updated.
* src/truetype/ttgload.c (TT_Process_Composite_Glyph,
load_truetype_glyph): Updated.
|
|
0f23ae2e
|
2021-10-05T16:28:40
|
|
* src/smooth/ftgrays.c (FT_DIV_MOD): Limit the ARM workaround.
|
|
ec6a4588
|
2021-10-04T23:10:59
|
|
[pshinter] Additional clean-ups.
* src/pshinter/pshalgo.h (psh_hint_table_find_strong_points): Streamline code.
* src/pshinter/pshalgo.h (PSH_Glyph): Remove unused fields.
|
|
227445f6
|
2021-10-03T22:48:23
|
|
[pshinter] More convenient direction definition.
It is easier to check directions using flags than integer values.
* src/pshinter/pshalgo.h (PSH_Dir): Redefine directions.
(PSH_PointRec): Use them as an enum type.
* src/pshinter/pshalgo.c (psh_compute_dir): Modify return type.
(psh_glyph_init, psh_hint_table_find_strong_points,
psh_glyph_find_blue_points): Update users.
|
|
d102a514
|
2021-10-03T22:45:42
|
|
[pshinter] Remove unnecessary check.
* src/pshinter/pshalgo.c (psh_hint_table_find_strong_points): Do not
check if direction is defined before checking how.
|
|
68fae526
|
2021-09-30T22:59:04
|
|
* src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting.
|
|
1d79c892
|
2021-09-29T22:17:31
|
|
* src/tools/apinames.c: Facilitate OpenVMS linker options.
|
|
dd0ccdc3
|
2021-09-28T22:57:58
|
|
* src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation.
|
|
a69320a9
|
2021-09-24T22:06:44
|
|
[bdf] Simplify comment collection or lack thereof.
BDF comments are neither actually collected nor retrieved. There is
no need to be fancy with delimiters.
* src/bdf/bdflib.c (_add_bdf_comment): Delimit comments with zeros...
(bdf_load_font): ...and do not null-terminate comments additionally.
(_bdf_parse_glyphs): Check if comments are kept, which they are not.
(_bdf_parse_start): Minor clean up.
|
|
a29e0200
|
2021-09-23T23:10:26
|
|
Use NULL for pointers only.
* src/bdf/bdflib.c (*): Code changes.
* include/freetype/freetype.h: Comments only.
* src/cff/cffload.c, src/cff/cffobjs.c: Ditto.
* src/winfonts/winfnt.c: Ditto.
|
|
90b14882
|
2021-09-22T20:20:04
|
|
[bdf, pcf] Minor optimization.
* src/pcf/pcfread.c (pcf_load_font): Do not call `FT_MulDiv` for a
small job.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto.
* src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a comment.
|
|
b4dddd82
|
2021-09-22T00:30:03
|
|
[base] Initialize stream memory earlier.
With Windows memory management tracking heap, it is important to use
it during the stream opening fallback. In Unix, the argument is
unused, but it is better to set it correctly.
* src/base/ftobjs.c (FT_Stream_New): Set memory before calling
`FT_Stream_Open`.
* builds/windows/ftsystem.c, builds/unix/ftsystem.c (FT_Stream_Open,
ft_close_stream_by_free): Call `ft_alloc` and `ft_free` with proper
memory argumment.
|
|
892e7ead
|
2021-09-21T14:39:21
|
|
* src/bdf/bdflib.c (_bdf_parse_{start,glyphs}): Use appropriate scanner.
|
|
61903609
|
2021-09-20T22:18:29
|
|
Minor.
|
|
71969d1e
|
2021-09-20T14:31:45
|
|
* src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW.
|
|
52915898
|
2021-09-18T07:05:55
|
|
[cache] Minor clean-ups.
* src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Remove parantheses.
* src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
(FTC_Cache_RemoveFaceID): Remove unnecessary variable.
|
|
6e1ef98a
|
2021-09-16T23:08:46
|
|
[cff] Explicitly set StandardEncoding or ExpertEncoding offsets.
Fixes #1097.
* src/cff/cffload.c (cff_encoding_load): Set special offset values.
|
|
fce74b73
|
2021-09-16T17:03:19
|
|
[cache] Miscellaneous clean-ups.
* src/cache/ftccache.c (ftc_get_top_node_for_hash, FTC_Cache_Clear):
Remove barely used variables.
(ftc_cache_add): Adjust casting.
* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove casting.
* src/cache/ftcsbits.c (ftc_snode_load): Remove casting.
|
|
79d14cc2
|
2021-09-16T16:41:56
|
|
* src/cff/cffload.c (cff_fd_select_get): Remove casting.
|
|
ae516e6a
|
2021-09-16T16:39:23
|
|
* src/pcf/pcfread.c (pcf_read_TOC): Remove casting.
|
|
801b7540
|
2021-09-14T22:55:50
|
|
Minor type adjustments.
* src/cff/cffobjs.c (cff_face_init): Reduce casting.
* src/truetype/ttobjs.c (tt_size_ready_bytecode): Ditto.
* src/type1/t1load.c (T1_Set_MM_Design): Ditto.
|
|
49270c17
|
2021-09-14T21:32:43
|
|
Replace boolean allocation macros with MEM ones.
* src/base/ftbitmap.c (FT_Bitmap_Copy): Use MEM-macro.
* src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Ditto.
* src/bzip2/ftbzip2.c (ft_bzip2_alloc): Ditto.
* src/cache/ftccache.c (ftc_cache_init): Ditto
* src/gzip/ftgzip.c (ft_gzip_alloc): Ditto.
* src/psnames/psmodule.c (ps_unicodes_init): Ditto.
* src/sfnt/sfobjs.c (sfnt_load_face): Ditto.
* src/sfnt/ttload.c (tt_face_load_name): Ditto.
|
|
9a4c846e
|
2021-09-14T21:25:47
|
|
[cache] Revert to some zeroing.
* src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Zero
`buckets` again to fix some crashes.
|
|
0a8ee851
|
2021-09-14T10:26:37
|
|
* src/pshinter/pshrec.c (ps_mask_table_merge_all): Tweak loops.
Fixes fallout from 731d0b685685 reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38685
|
|
731d0b68
|
2021-09-13T16:29:08
|
|
[cff, pshinter] Clean up unsigned counters.
Loops with unsigned decrement can be reliably stopped when the counter
wraps around after reaching zero.
* src/cff/cffload.c (cff_charset_compute_cids): Use unsigned counter.
* src/pshinter/pshalgo.c (psh_hint_table_activate_mask): Ditto.
* src/pshinter/pshrec.c (ps_mask_table_merge): Ditto.
|
|
058f3f2d
|
2021-09-13T16:24:25
|
|
[bdf, psnames, sfnt] Avoid some memory zeroing.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Use Q-macro.
* src/sfnt/sfobjs.c (sfnt_load_face): Ditto.
* src/psnames/psmodule.c (src/psnames/psmodule.c): Remove zero.
|
|
59b43ae6
|
2021-09-13T16:16:18
|
|
* src/base/ftobjs.c (FT_CMap_New): Revert to zeroing.
Fixes fallout from c1fa7aa2bc96, reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38641
|
|
073ff2d7
|
2021-09-13T00:04:45
|
|
[truetype] Clean up `exec` initialization.
* src/truetype/ttinterp.c (Init_Context): Absorbed into...
(TT_New_Context): ... this function.
|
|
fab94f9f
|
2021-09-12T23:30:07
|
|
[truetype] Avoid some memory zeroing.
* src/truetype/ttgload.c (load_truetype_glyph): Use Q-macro.
* src/truetype/ttinterp.c (Update_Max): Ditto.
* src/truetype/ttpload.c (src/truetype/ttpload.c): Ditto.
|
|
c1fa7aa2
|
2021-09-12T23:25:46
|
|
[base] Avoid some memory zeroing.
* src/base/ftobjs.c (FT_New_Size, FT_CMap_New, FT_CMap_Done,
ft_open_face_internal, ft_open_face_internal): Use Q-macros.
|
|
a8e8d9d7
|
2021-09-12T23:21:32
|
|
[cache, psaux] Remove zeros.
* src/cache/ftcmru.c (FTC_MruList_New): Remove initialization.
* src/psaux/psstack.c (cf2_stack_init): Ditto.
|
|
9870b6c0
|
2021-09-12T14:32:22
|
|
[cache] Avoid some memory zeroing.
* src/cache/ftcmru.c (FTC_MruList_New): Use Q-macro.
* src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Ditto.
* src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Ditto.
|
|
2d57b059
|
2021-09-11T10:38:08
|
|
* src/cache/ftcmanag.c (FTC_Manager_New): Add missing zero.
Fixes fall out from a7b199d081e7.
|
|
5b626281
|
2021-09-10T10:19:07
|
|
[truetype] Tweak `hdmx` checking.
Fixes #1096.
* src/truetype/ttpload.c (tt_face_load_hdmx): Account for padding.
|
|
e942a310
|
2021-09-09T22:17:46
|
|
[truetype] Tweak `loca` clamping.
Fixes #1095.
* src/truetype/ttpload.c (tt_face_load_loca): Fix up clamping.
* include/freetype/internal/tttypes.h (TT_Face): Correct docs.
|
|
c350aac0
|
2021-09-08T12:18:23
|
|
Fortify memory debugging (cont'd).
* src/base/ftdbgmem.c (FT_DumpMemory): Check for active debugger.
(ft_mem_table_destroy): Move `FT_DumpMemory` call from here...
(ft_mem_debug_done): ... to here.
|
|
63806aad
|
2021-09-08T10:54:44
|
|
Fortify memory debugging.
These changes are neccessary to properly recover `memory->user` that
holds the Windows heap handle now.
* src/base/ftdbgmem.c (ft_mem_debug_init): Handle all table allocations,
initializations, and sizing instead of...
(ft_mem_table_new): ... this function removed.
(ft_mem_debug_done): Better check for the active debugger and free the
debugger table here instead of...
(ft_mem_table_destroy): ... here.
|
|
77dcc5ed
|
2021-09-07T18:49:36
|
|
src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): Set to 600.
This allows C99 compilation on Solaris.
Problem reported by Mojca Miklavec.
|
|
60a93ea2
|
2021-09-07T06:38:09
|
|
[dlg] Synchronize with upstream.
* src/dlg/dlgwrap.c (_XOPEN_SOURCE): Set to 600.
Fixes #1093.
|
|
aee1fd3b
|
2021-09-03T22:13:22
|
|
Cosmetic zeros.
|
|
7bf655b2
|
2021-09-03T11:31:41
|
|
* src/bdf/bdflib.c (_bdf_parse_start): Keep parser memory.
|
|
7f8f0c1c
|
2021-09-02T23:30:31
|
|
[smooth, raster, sdf] Clean up initialization calls.
* src/raster/ftraster.c (ft_black_init): Removed.
(ft_black_new): Clean up.
* src/sdf/ftbsdf.c (bsdf_raster_new): Ditto.
* src/sdf/ftsdf.c (sdf_raster_new): Ditto.
* src/smooth/ftgrays.c (gray_raster_new): Ditto.
|
|
a7b199d0
|
2021-09-02T22:58:50
|
|
* src/cache/ftcmanag.c (FTC_Manager_New): Avoid some zeroing.
|
|
0a6f0f8f
|
2021-09-02T22:52:21
|
|
* src/bdf/bdflib.c (bdf_load_font): Remove memory shuffling.
|
|
a81cf5aa
|
2021-09-02T22:10:57
|
|
Cosmetic zeros.
|
|
7482c98f
|
2021-09-01T22:18:29
|
|
[base] Clean up stream reading.
* src/base/ftstream.c (FT_Stream_ReadUShort, FT_Stream_ReadUOffset,
FT_Stream_ReadULong and their LE variants): Remove unnecessary
initialization and slightly refactor.
(FT_Stream_GetByte, FT_Stream_ReadByte): Rename to return unsigned
value and align with sister functions.
* include/freetype/internal/ftstream.h (FT_Stream_GetByte,
FT_Stream_ReadByte): Update prototypes and caller macros.
|
|
612925ff
|
2021-09-01T21:37:21
|
|
s/0/NULL/ where appropriate.
|
|
b6c11d49
|
2021-08-30T07:09:53
|
|
[smooth] Reduce shift in multiply-shift optimization.
* src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): Reduce shift.
Smaller shifts that keep the division operands of FT_UDIVPREP within
32 bits result in slightly faster divisions, which is noticeable in
the overall performance. The loss of precision is tolerable until the
divisors (the components dx and dy) approach 32 - PIXEL_BITS. With
PIXEL_BITS = 8, this corresponds to 65,000 pixels or the bitmap size
that we refuse to render anyway.
Using `ftbench -p -s60 -t5 -bc timesi.ttf`,
Before: 8.52 us/op
After: 8.32 us/op
|
|
d1c20005
|
2021-08-28T07:29:05
|
|
[truetype] Fix compilation if !TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
* src/truetype/ttgxvar.c (tt_cvt_ready_iterator): Compile function
conditionally.
(tt_face_vary_cvt) [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Add code.
Fixes #1091.
|
|
a842a098
|
2021-08-26T16:12:22
|
|
[smooth] Detect SSE2 with MSVC for x86
MSVC does not set `__SSE2__`. Instead one must check whether `_M_IX86_FP` is
defined and greater than or equal to 2.
* src/smooth/ftgrays.c (FT_SSE2): New macro.
Use it where appropriate.
|
|
3785393d
|
2021-08-26T15:31:11
|
|
Expand comment (cont'd).
|
|
686e2a5e
|
2021-08-25T23:18:43
|
|
Expand comment.
|
|
f7f9cb0d
|
2021-08-24T15:29:06
|
|
* src/smooth/ftgrays.c (gray_render_conic): Refactor redundancy.
|
|
50318357
|
2021-08-25T00:31:26
|
|
[truetype] Fix for the family name shorter than 8 characters.
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag):
If the family name to be checked is shorter than 8 characters,
do not check its syntax.
|
|
c4fc0e69
|
2021-08-24T12:29:47
|
|
[truetype] Simplify `trick_names'.
* src/truetype/ttobjs.c (tt_check_trickyness_family): For the case
that the beginning part of a long tricky family name is already
registered as another tricky family name, no need to double-check
the longer one. Such long tricky family names are removed from
the `trick_names'.
|
|
992382ba
|
2021-08-24T12:11:46
|
|
[truetype] Add 2 tricky font names.
Additional fix for the issue #1087.
* src/truetype/ttobjs.c (tt_check_trickyness_family): Add 2 tricky
font names reported in #1087.
|
|
2b3ccd6e
|
2021-08-24T11:43:11
|
|
[truetype] New function to skip the randomization tag.
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag):
New function to skip the randomization tag in the names of the
fonts embedded in a PDF. It is used by tt_check_trickyness_family(),
to keep from mistaking "DLC" in the randomization tag as a
tricky font name. See discussion in:
https://lists.nongnu.org/archive/html/freetype-devel/2021-02/msg00002.html
For technical detail about the randomization tag, please find
PDF Reference 5.5.3 "Font Subsets". Thanks to Justyna Wawrzynska
for pointing out the issue caused by the randomization tag.
|
|
1c23982d
|
2021-08-24T10:25:22
|
|
[truetype] Add checksums for 2 tricky fonts.
Thanks to Ting717 for providing sample PDF. Fixes #1087.
* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add
checksums for 2 tricky fonts `DFHei-Bd-WIN-HK-BF' and
`DFMing-Md-WIN-HK-BF'.
|
|
78f2bd0b
|
2021-08-22T22:32:07
|
|
Whitespace formatting.
|
|
d92aa23f
|
2021-08-22T13:12:45
|
|
Decorate const arguments.
* src/base/ftglyph.c (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it.
* include/freetype/ftglyph.h (FT_Glyph_Transform, FT_Glyph_To_Bitmap):
Do it.
|
|
d62d583d
|
2021-08-20T23:40:49
|
|
[smooth] Clean up the null cell usage.
Put the null cell at the end of the pool and store it explicitly so that
we can use it as both the limit and the dumpster.
* src/smooth/ftgrays.c (gray_TWorker): Store the last `cell_null` and
remove unnecesary fields.
(NULL_CELL_PTR, CELL_IS_NULL): Remove in favor of explicit `cell_null`.
(gray_dump_cells, gray_set_cell, gray_sweep{,_direct}): Update callers.
(gray_convert_glyph_inner): Trace remaining cells (oh well).
(gray_convert_glyph): Set up `cell_null` and slightly improve the pool
management.
|
|
6e9d8d31
|
2021-08-20T16:01:32
|
|
[base] Restore quiet no-op rendering of bitmap glyphs.
Fixes #1076.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when
rendering a bitmap glyph.
|
|
de3b5c20
|
2021-08-20T13:51:40
|
|
[smooth] Fortify 64-bit algorithm.
* src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): s/long/FT_Int64/ and
s/unsigned long/FT_UInt64/.
(gray_render_line): Adjust a critical variable type.
|
|
633fe087
|
2021-08-19T16:56:22
|
|
[sfnt] Fix format expectation for `COLR` v1 ClipList
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Change ClipList
format expectation to 1 instead of 0 to make it compliant with the
latest spec.
|
|
85703839
|
2021-08-18T23:05:51
|
|
Use FT_INT64 instead of FT_LONG64.
* include/freetype/config/integer-types.h: Remove synonymous FT_LONG64.
* include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/.
* src/base/ftcalc.c: Ditto.
* src/base/fttrigon.c: Ditto.
* src/smooth/ftgrays.c: Ditto.
|
|
f44c2d58
|
2021-08-18T08:52:21
|
|
* src/sdf/ftsdf.c (get_control_box): Fix compiler warning.
|