|
602be7c8
|
2016-12-01T11:36:37
|
|
[gzip] Improve building with external zlib (#49673).
Building FreeType with external zlib 1.2.8 makes msvc 14 stop with
the following error.
ftgzip.c
zlib-1.2.8\zlib.h(86): error C2061:
syntax error: identifier 'z_const'
zlib-1.2.8\zlib.h(94): error C2054:
expected '(' to follow 'z_const'
zlib-1.2.8\zlib.h(94): error C2085:
'msg': not in formal parameter list
...
zlib-1.2.8\zlib.h(877): fatal error C1003:
error count exceeds 100; stopping compilation
The error happens because FreeType keeps an own copy of zlib-1.1.4
under `src/gzip'. When building `src/gzip/ftgzip.c' with
FT_CONFIG_OPTION_SYSTEM_ZLIB defined, it uses
#include <zlib.h>
which correctly finds an external `zlib.h', but `zlib.h' itself has
a line
#include "zconf.h"
which makes Visual Studio 2015 find `src/gzip/zconf.h' while
compiling the files in `src/gzip'.
* src/gzip/zconf.h: Rename to...
* src/gzip/ftzconf.h: ... this.
* src/gzip/zlib.h, src/gzip/rules.mk (GZIP_DRV_SRCS): Updated.
|
|
255828c8
|
2016-12-01T07:07:22
|
|
[autofit] Fix Emscripten crash (patch #9180).
Function calls through pointers must use a matching signature to
work on Emscripten, since such calls are dispatched through lookup
tables grouped by signature.
* src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Fix
typedef.
|
|
1d28f697
|
2016-11-29T18:45:22
|
|
[smooth] Revert previous commit. Already fixed with 6ca54c64.
|
|
d949a3db
|
2016-11-29T12:09:56
|
|
[smooth] Avoid conditional jump on uninitialized value (#49711).
* src/smooth/ftgrays.c (gray_raster_render): Initialize `worker'.
|
|
b37b799c
|
2016-11-27T16:30:53
|
|
[autofit] Code shuffling.
Also improve some comments and remove unused code.
No functional change.
* src/autofit/afloader.c (af_loader_load_g): Merged with...
(af_loader_load_glyph): ...this function.
Split off emboldening code into...
(af_loader_embolden_glyph_in_slot): ... this function.
|
|
48c77da3
|
2016-11-17T07:37:50
|
|
Add minor comment to avoid confusion (#19044).
|
|
e1ee5476
|
2016-11-06T12:39:05
|
|
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Fix tracing.
|
|
1c6fd994
|
2016-11-06T12:37:55
|
|
[sfnt] Improve FT_LOAD_BITMAP_METRICS_ONLY for `sbix' format.
It's unavoidable to call the PNG engine, but to get the metrics it
is sufficient to read the PNG image's header only.
* src/sfnt/pngshim.c (Load_SBit_Png): Add argument to control the
allocation of the glyph slot.
* src/sfnt/pngshim.h: Updated.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_png,
tt_face_load_sbix_image, tt_face_load_sbit_image): Updated.
|
|
565db95b
|
2016-11-06T12:33:51
|
|
[sfnt] Speed up `sbix' lookup.
This also fixes a bug introduced in 2016-10-01 which prevents
display of embedded bitmap fonts that use the `sbix' format.
* src/sfnt/ttsbit.c (tt_face_load_sbit): Store `sbix' size and
offset also in `ebdt_size' and `ebdt_start', respectively. This
makes the test for an embedded bitmap data table succeed for this
format.
(tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Use
`ebdt_size' and `ebdt_start'
(tt_face_load_sbix_image): Ditto.
|
|
37e193e9
|
2016-11-06T12:32:51
|
|
Introduce a way of quickly retrieving (embedded) bitmap metrics.
`FT_Load_Glyph' doesn't generate a bitmap for a non-bitmap glyph
until the user calls `FT_Render_Glyph'. However, it always
allocates memory for bitmaps and copies or decodes the contents of a
bitmap glyph, which can be quite slow for PNG data.
* include/freetype/freetype.h (FT_LOAD_BITMAP_METRICS_ONLY): New
macro.
* src/base/ftobjs.c (FT_Load_Glyph): Unset FT_LOAD_RENDER if
FT_LOAD_BITMAP_METRICS_ONLY is used.
* src/sfnt/ttsbit.c (tt_sbit_decoder_alloc_bitmap,
tt_sbit_decoder_load_bitmap): Add argument to control allocation of
the glyph slot.
(tt_sbit_decoder_load_image, tt_sbit_decoder_load_compound,
tt_face_load_sbit_image): Updated.
* src/pcf/pcfdrivr.c (PCF_Glyph_Load): Quickly exit if
`FT_LOAD_BITMAP_METRICS_ONLY' is set.
* src/pfr/pfrsbit.c, src/pfr/pfrsbit.h (pfr_slot_load_bitmap): Add
argument to control allocation of the glyph slot.
* src/pfr/pfrobjs (pfr_slot_load): Updated.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
* docs/CHANGES: Updated.
|
|
b72858c9
|
2016-11-03T06:41:00
|
|
[truetype] Clamp variation requests to valid range.
This is required by OpenType 1.8; it also avoids rounding surprises.
* src/truetype/ttgxvar.c (TT_Set_Var_Design): Clamp design coordinates
outside of the allowed range to always stay within the range instead
of producing an error.
|
|
328d6844
|
2016-10-29T00:18:56
|
|
[truetype] Remove clang warnings.
* src/truetype/ttinterp.h (TT_ExecContextRec): Using `FT_ULong' for
loop counter handling.
* src/truetype/ttinterp.c: Updated.
(Ins_SCANTYPE): Use signed constant.
(TT_RunIns): Ensure `num_twilight_points' is 16bit.
|
|
ddf38726
|
2016-10-27T07:27:27
|
|
[truetype] Fix commit from 2014-11-24.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
* src/truetype/ttpload.c (tt_face_load_hdmx): Fix file checking
logic.
|
|
9c45ac39
|
2016-10-26T16:00:00
|
|
Add `FT_Get_{MM,Var}_Blend_Coordinates' functions.
* 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.
|
|
56140907
|
2016-10-26T08:10:59
|
|
* src/type1/t1load.c (parse_subrs): Fix limit check.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=81
|
|
c5f1bc4b
|
2016-10-25T22:31:42
|
|
[cff] Correct cmap format reporting (#24819).
* src/cff/cffdrivr.c (cff_get_cmap_info): Throw an error on synthetic
charmap instead of guessing its format and language.
|
|
5081674c
|
2016-10-22T19:16:08
|
|
[truetype] Fix SCANTYPE instruction (#49394).
* src/truetype/ttinterp.c (Ins_SCANTYPE): Only use lower 16bits.
|
|
57741403
|
2016-10-22T18:34:48
|
|
[sfnt] Improve handling of invalid post 2.5 tables [#49393].
* src/sfnt/ttpost.c (load_format_25): We need at least a single
table entry.
|
|
7eeaf986
|
2016-10-14T08:58:17
|
|
[truetype] Fix handling of `cvar' table data.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53
* src/truetype/ttgxvar.c (tt_face_vary_cvt): Ignore invalid CVT
indices.
|
|
83702957
|
2016-10-13T22:52:40
|
|
URL updates.
|
|
9c54d124
|
2016-10-11T08:57:55
|
|
[psaux] Fix handling of invalid flex subrs.
Problem reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<op_callothersubr>: Set `flex_state' after error checking.
|
|
92281228
|
2016-10-11T07:12:12
|
|
* src/truetype/ttgxvar.c (tt_done_blend): Fix deallocation.
|
|
6b354931
|
2016-10-08T20:26:59
|
|
* src/cid/cidload.c (cid_face_open): Properly propagate `error'.
|
|
d61b0425
|
2016-10-08T19:20:33
|
|
[cid] Fix parsing of subr offsets.
Bug introduced 2016-05-16.
* src/cid/cidparse.c (cid_parser_new): Fix off-by-one error.
|
|
fcc0ee80
|
2016-10-01T20:12:25
|
|
[sfnt] Disable bitmap strikes if we don't have a bitmap data table.
* src/sfnt/ttsbit.c (tt_face_load_sbit): Check whether we have
a bitmap data table.
|
|
b0aacff4
|
2016-10-01T12:55:33
|
|
[smooth] Remove impossibility.
* src/smooth/ftgrays.c (TWorker): Rearrange fields.
(gray_convert_glyph): Remove impossible condition and clean up.
|
|
3576487a
|
2016-09-30T08:11:52
|
|
[pcf] Enrich family name with foundry name and glyph width info.
This is a very old patch from openSuSE (from 2006, submitted to
FreeType in 2011) that I forgot to apply.
https://build.opensuse.org/package/view_file/openSUSE:Factory/freetype2/freetype2-bitmap-foundry.patch
Prepend the foundry name plus a space to the family name. There are
many fonts just called `Fixed' which look completely different, and
which have nothing to do with each other. When selecting `Fixed' in
KDE or Gnome one gets results that appear rather random, the style
changes often if one changes the size and one cannot select some
fonts at all.
We also check whether we have `wide' characters; all put together,
we get family names like `Sony Fixed' or `Misc Fixed Wide'.
* src/pcf/pcfread.c (pcf_load_font): Implement it.
* docs/CHANGES: Document it.
|
|
71b617d8
|
2016-09-29T19:53:39
|
|
[ftfuzzer] Speed up.
* src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Don't
check for embedded bitmaps if we have a non-default instance.
|
|
bfa83bdc
|
2016-09-29T19:51:28
|
|
Comments.
|
|
2067c698
|
2016-09-29T19:49:07
|
|
[truetype] Disallow bitmap strokes for non-default instances.
Also speed up access of default instances if GX variations are
active.
* include/freetype/internal/tttypes.h (TT_FaceRec): Add
`is_default_instance' member.
* src/sfnt/sfobjs.c (sfnt_init_face): Initialize
`is_default_instance'.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph,
load_truetype_glyph): Add test for default instance.
(TT_Load_Glyph): Load embedded bitmaps for default instance only.
* src/truetype/ttgxvar.c (TT_Set_MM_Blend): Compute
`is_default_instance'.
|
|
bf90239c
|
2016-09-29T13:04:46
|
|
[truetype] Clean up `TT_Face' structure.
* include/freetype/internal/tttypes.h (TT_FaceRec): Remove unused
fields `horz_metrics' and `vert_metrics'.
Update documentation.
* src/sfnt/sfobjs.c (sfnt_done_face): Updated.
|
|
45cad2e5
|
2016-09-28T19:10:52
|
|
More FT_ZERO usage.
* src/gxvalid/gxvcommn.c (gxv_ClassTable_validate):
s/ft_memset/FT_MEM_ZERO/.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings):
s/ft_memset/FT_ARRAY_ZERO/.
* src/raster/ftraster.c (FT_ZERO): Define.
(ft_black_new): Use it.
* src/raster/ftrend1.c (ft_raster1_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
* src/smooth/ftgrays.c (FT_ZERO): Define.
(gray_raster_new): Use it.
* src/smooth/ftsmooth.c (ft_smooth_get_cbox):
s/FT_MEM_ZERO/FT_ZERO/.
|
|
2ecf89b4
|
2016-09-28T19:06:21
|
|
*/*: s/FT_MEM_ZERO/FT_ZERO/ where appropriate.
|
|
a3e2c832
|
2016-09-27T21:42:02
|
|
[truetype] Trace number of executed opcodes.
* src/truetype/ttinterp.c (TT_RunIns): Implement it.
|
|
e27b8a55
|
2016-09-27T21:21:01
|
|
[truetype] Speed up `TT_Load_Glyph'.
This avoids additional calls to `tt_face_lookup_table' for the
`glyf' table, which can be expensive.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Move
`glyf_offset' field to ...
(TT_FaceRec): ... this structure.
* src/truetype/ttgload.c (load_truetype_glyph): Updated.
(tt_loader_init): Move initialization of `glyf_offset' to ...
* src/truetype/ttpload.c (tt_face_load_loca): .. this function.
|
|
0d945929
|
2016-09-27T08:44:31
|
|
[truetype] Introduce dynamic limits for some bytecode opcodes.
This speeds up FreeType's handling of malformed fonts.
* src/truetype/ttinterp.c (TT_RunIns): Set up limits for the number
of twilight points, the total number of negative jumps, and the
total number of loops in LOOPCALL opcodes. The values are based on
the number of points and entries in the CVT table.
(Ins_JMPR): Test negative jump counter.
(Ins_LOOPCALL): Test loopcall counter.
* src/truetype/ttinterp.h (TT_ExecContext): Updated.
* docs/CHANGES: Updated.
|
|
a764963f
|
2016-09-25T16:29:05
|
|
[truetype] Sanitize only last entry of `loca' table.
Without this patch, a loca sequence like `0 100000 0 100000 ...',
where value 100000 is larger than the `glyf' table size, makes
FreeType handle the whole `glyf' table as a single glyph again and
again, which is certainly invalid (and can be very slow, too).
* src/truetype/ttpload.c (tt_face_get_location): Implement.
Improve tracing messages.
|
|
d11e8b6e
|
2016-09-25T15:32:04
|
|
* src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Fix typo.
|
|
2f2e73c5
|
2016-09-24T22:42:58
|
|
[autofit] Tracing fixes.
* src/autofit/afmodule.c (af_autofitter_load_glyph): Call dumping
functions only if we actually do tracing.
|
|
53ae7a54
|
2016-09-22T22:48:15
|
|
[smooth] Reduce divisions in the line renderer.
We don't need some divisions if a line segments stays within a single
row or a single column of pixels.
* src/smooth/ftgrays.c (gray_render_line) [FT_LONG64]: Make divisions
conditional.
|
|
c95b7652
|
2016-09-17T17:12:50
|
|
s/0/NULL/ for function pointers; comments, formatting.
|
|
d5f7533e
|
2016-09-15T00:13:36
|
|
* src/smooth/ftgrays.c (gray_sweep): Remove check for empty table.
|
|
ad47550b
|
2016-09-14T23:15:03
|
|
[smooth] Another tiny speed-up.
* src/smooth/ftgrays.c (gray_find_cell): Merge into...
(gray_record_cell): ... this function.
|
|
c38be52b
|
2016-09-11T22:44:44
|
|
* src/smooth/ftgrays.c (gray_{find,set}_cell): Remove dubious code.
|
|
6ca54c64
|
2016-09-11T16:00:52
|
|
[smooth] Fix valgrind warning and reoptimize.
The algorithm calls `gray_set_cell' at the start of each new contour
or when the contours cross the cell boundaries. Double-checking for
that is wasteful.
* src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
(gray_convert_glyph): Remove initialization introduced by 44b172e88.
|
|
e421a0bf
|
2016-09-10T08:02:30
|
|
[sfnt] Fix previous commit.
Problems reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40
We now map the strike index right before accessing the physical
data, not earlier.
* src/sfnt/sfobjs.c (sfnt_load_face): Set `face->sbit_strike_map'
after creating the map so that...
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): ... this function
can be used before and after setting up `sbit_strike_map'.
(tt_face_set_sbit_strike): Revert change.
(tt_sbit_decoder_init, tt_face_load_sbix_image): Map strike index.
* src/truetype/ttdriver.c (tt_size_select): Revert change.
|
|
deb26155
|
2016-09-09T22:13:33
|
|
[ftfuzzer] Minor improvements.
* src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
invalid strikes.
Use better values for call to `FT_Set_Char_Size'.
|
|
d609b7c1
|
2016-09-09T22:11:07
|
|
[sfnt] Don't provide (completely) broken strike data.
FreeType tries to sanitize strike header data; we now reject
completely broken ones.
* include/freetype/internal/tttypes.h (TT_FaceRec): New
`sbit_strike_map' array pointer.
* src/base/ftobjs.c (FT_Match_Size): Reject matches where either
width or height would be zero.
Add tracing message in case of error.
* src/sfnt/sfobjs.c (sfnt_load_face): Populate `sbit_strike_map',
only using (more or less) valid strike header data for
FT_Face's `available_sizes' array.
(sfnt_done_face): Updated.
* src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use
`sbit_strike_map'.
(tt_face_load_strike_metrics): Improve tracing.
* src/truetype/ttdriver.c (tt_size_select): Use `sbit_strike_map'.
|
|
b1e7b68e
|
2016-09-08T08:56:34
|
|
* src/truetype/ttinterp.c: Include `ttgxvar.h'.
This fixes the `multi' build.
|
|
9749f269
|
2016-09-08T07:51:03
|
|
[autofit] Another improvement to Armenian support.
Suggested by Hrant H Papazian <hpapazian@gmail.com>.
* src/autofit/afscript.h: Use better suited characters to derive
default stem widths.
|
|
a0b92bcb
|
2016-09-07T23:19:57
|
|
* src/smooth/ftgrays.c (gray_hline): Microptimize.
|
|
9d0a3bd8
|
2016-09-06T23:59:33
|
|
[smooth] Operate in absolute bitmap coordinates.
Simpler bitmap addressing improves performance by 1.5%.
* src/smooth/ftgrays.c (gray_TWorker): Remove count fields.
(gray_dump_cells, gray_find_cell, gray_set_cell, gray_hline,
gray_sweep, gray_convert_glyph, gray_raster_render): Updated.
|
|
44b172e8
|
2016-09-06T23:24:17
|
|
[smooth] Improve contour start (take 2).
* src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
instead of...
(gray_start_cell): ... this function, which is removed.
(gray_convert_glyph): Make initial y-coordinate invalid.
|
|
ebbb8b2e
|
2016-09-06T16:28:57
|
|
[type1] MM fonts support exactly zero named instances (#48748).
* src/type1/t1load.c (T1_Get_MM_Var): Set `num_namedstyles' to zero.
|
|
a15133e6
|
2016-09-06T06:33:36
|
|
[cff] Fix uninitialized memory.
Problem reported as
https://bugzilla.mozilla.org/show_bug.cgi?id=1270288
* src/cff/cf2interp.c (cf2_interpT2CharString): Initialize `storage'
array to handle a `get' opcode without a previous `put'.
|
|
9773d5f7
|
2016-09-05T23:33:35
|
|
* src/smooth/ftgrays.c (gray_move_to, gray_start_cell): Revert.
|
|
7effc279
|
2016-09-05T21:58:56
|
|
[smooth] Improve contour start.
* src/smooth/ftgrays.c (gray_move_to): Call `gray_set_cell' directly
instead of...
(gray_start_cell): ... this function, which is removed.
|
|
3ebfe3c5
|
2016-09-05T10:55:07
|
|
[cff] Fix memory initialization.
* src/cff/cf2stack.c (cf2_stack_init): Use `FT_NEW'. The `Q'
variants of FreeType's memory allocation macros don't do zeroing.
|
|
1c8bb632
|
2016-09-05T08:13:42
|
|
[ftrandom] Minor improvements.
* src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): New macro, set to
500.
* src/tools/ftrandom/Makefile (CFLAGS): Split off include
directories to ...
(INCLUDES): ... this new variable.
(LDFLAGS): New variable.
(ftrandom.o, ftrandom): Updated.
|
|
c9adf1a1
|
2016-09-05T07:32:37
|
|
[autofit] Improve Armenian support.
Thanks to Hrant H Papazian <hpapazian@gmail.com> for help.
* src/autofit/afblue.dat (AF_BLUE_STRING_ARMENIAN_*): Improve
selection of characters.
* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
|
|
4b28f6ac
|
2016-09-04T19:05:45
|
|
[ftrandom] Improve Makefile.
It now supports both a normal build (`./configure && make') and a
development build (`make devel').
* src/tools/ftrandom/Makefile (VPATH): Set it so that
`libfreetype.a' gets searched in both `objs' (for the development
build) and `objs/.libs' (for a normal build which uses libtool).
(LIBS): Add missing libraries.
(ftrandom.o): New rule.
(ftrandom): Use automatic variables.
|
|
4e659d7e
|
2016-09-03T18:14:00
|
|
[truetype] More fixes for handling of GX deltas.
Problems reported by Bob Taylor <Bob.Taylor@monotype.com>.
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix rough
sanity test for glyph variation array header size.
Always set stream position before reading packed x and y deltas.
Fix thinko w.r.t. `localpoints' array.
|
|
ca8e98d9
|
2016-09-03T13:06:16
|
|
[ftrandom] Various fixes.
* src/tools/ftrandom/ftrandom.c (GOOD_FONTS_DIR): Provide better
default.
(error_fraction): Make it of type `double' to work as advertized –
this was completely broken.
Update all related code.
(error_count, fcnt): Make it unsigned to fix compiler warnings.
Update all related code.
(fontlist): Change `len' member to `long' to fix compiler warnings.
(FT_MoveTo, FT_LineTo, FT_ConicTo, FT_CubicTo, abort_test): Tag
unused variables.
(TestFace, FindFonts, copyfont, do_test): Fix compiler warnings.
(ExecuteTest): Ditto.
Call `FT_Done_FreeType'.
(getErrorCnt): Replace `ceil' with an ordinary cast to `unsigned
int'.
(usage): Improve output.
(main): Fix compiler warnings.
* src/tools/ftrandom/README: Updated.
|
|
b98dfda3
|
2016-09-03T08:20:31
|
|
[base] Avoid negative bitmap stroke dimensions (#48985).
* src/base/ftobjs.c (FT_Open_Face): Check whether negation was
actually successful. For example, this can fail for value
-32768 if the type is `signed short'. If there are problems,
disable the stroke.
|
|
f0fa7a67
|
2016-09-03T06:33:36
|
|
[cff] Avoid null pointer passed to FT_MEM_COPY (#48984).
* src/cff/cffload.c (cff_index_get_name): Check `byte_len'.
|
|
d8ef7266
|
2016-09-02T23:27:50
|
|
[sfnt] Avoid left shift of negative value (#48980).
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Use unsigned
constant.
|
|
16583ccd
|
2016-09-02T22:45:14
|
|
* src/smooth/ftgrays.c (gray_hline): Fix clang compiler warnings.
|
|
11d3336a
|
2016-09-01T22:56:24
|
|
[smooth] Simplify span rendering more.
It turns out that there is significant cost associated with `FT_Span'
creation and calls to `gray_render_span' because it happerns so
frequently. This removes these steps from our internal use but leaves
it alone for `FT_RASTER_FLAG_DIRECT" to preserve API. The speed gain
is about 5%.
* src/smooth/ftgrays.c (gray_render_span): Removed. The code is
migrated to...
(gray_hline): ... here.
|
|
f44ddfda
|
2016-08-30T23:21:23
|
|
[smooth] Streamline pixmap drawing a bit more.
Zero coverage is unlikely (1 out of 256) to warrant checking. This
gives 0.5% speed improvement in dendering simple glyphs.
* src/smooth/ftgrays.c (gray_hline, gray_render_span): Remove checks.
|
|
e73055c7
|
2016-08-29T23:15:35
|
|
[smooth] Streamline pixmap drawing.
This gives 2% speed improvement in rendering simple glyphs.
* src/smooth/ftgrays.c (TPixmap): Reduced pixmap descriptor with a
pointer to its bottom-left and pitch to be used in...
(gray_TWorker): ... here.
(gray_render_span): Move pixmap flow check from here...
(gray_raster_render): .. to here.
|
|
bffe5fd6
|
2016-08-28T13:16:37
|
|
[cff] Minor comment.
|
|
4d3f7ca8
|
2016-08-27T23:25:54
|
|
[smooth] Reduce stack of band boundaries.
* src/smooth/ftgrays.c (gray_TBand): Removed.
(gray_convert_glyph): Updated to stack band boundaries concisely.
|
|
57aa8391
|
2016-08-26T11:59:50
|
|
* src/cid/cidload.c (cid_face_open): Improve handling of `SDBytes'.
|
|
3c61a2f5
|
2016-08-26T11:50:09
|
|
[cid] Fix commit from 2016-05-16.
* src/cid/cidparse.c (cid_parser_new): Fix off-by-one errors.
|
|
f3e71bab
|
2016-08-26T10:31:30
|
|
[sfnt] Cache offset and size to bitmap data table.
This commit avoids `EBDT' and friends being looked up again and
again while loading a single embedded bitmap.
* include/freetype/internal/tttypes.h (TT_FaceRec)
[TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New fields `ebdt_start' and
`ebdt_size'.
* src/sfnt/ttsbit.c (tt_sbit_decoder_init): Move table lookup to ...
(tt_face_load_sbit): ... this function; also store the table size
and offset.
|
|
1034ff4a
|
2016-08-26T08:42:27
|
|
[sfnt] Comments.
|
|
9a444f05
|
2016-08-25T22:36:01
|
|
* src/smooth/ftgrays.c (gray_raster_render): Minor tweaks.
|
|
a660e3de
|
2016-08-26T00:23:27
|
|
[type1] Fix heap buffer overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
* src/type1/t1load.c (parse_charstrings): Reject fonts that don't
contain glyph names.
|
|
69ce9739
|
2016-08-25T19:49:52
|
|
[sfnt] Fix previous commit (#48901).
* src/sfnt/ttcmap.c (tt_cmap4_char_map_binary): Thinkos.
|
|
acd18798
|
2016-08-25T17:12:46
|
|
[sfnt] Speed up handling of invalid format 4 cmaps.
* src/sfnt/ttcmap.c (tt_cmap4_next, tt_cmap4_char_map_binary): Add
tests for `num_glyph' from `tt_cmap4_char_map_linear'.
|
|
cb438878
|
2016-08-22T23:06:45
|
|
[smooth] Simplify span rendering.
This removes unnecessary complexity of span merging and buffering.
Instead, the spans are rendered as they come, speeding up the
rendering by about 5% percents as a result.
* src/smooth/ftgrays.c [FT_MAX_GRAY_SPANS]: Macro removed.
(gray_TWorker): Remove span buffer and related fields.
(gray_sweep, gray_hline): Updated.
* include/freetype/ftimage.h: Remove documentation note about
`FT_MAX_GRAY_SPANS', which was never in `ftoption.h' and is now gone.
|
|
a4c2a311
|
2016-08-22T19:32:34
|
|
[truetype] Fix `MPS' instruction.
According to Greg Hitchcock, MPS in DWrite really returns the point
size.
* src/truetype/ttobjs.h (TT_SizeRec): Add `point_size' member.
* src/truetype/ttdriver.c (tt_size_request): Set `point_size'.
* src/truetype/ttinterp.h (TT_ExecContextRec): Add `pointSize'
member.
* src/truetype/ttinterp.c (TT_Load_Context): Updated.
(Ins_MPS): Fix instruction.
|
|
8521ad99
|
2016-08-16T13:44:38
|
|
[lzw] Optimize last commit.
* src/lzw/ftzopen.c (ft_lzwstate_get_code): Move check into
conditional clause.
|
|
548f68d8
|
2016-08-16T09:46:40
|
|
[lzw] Avoid invalid left shift.
* src/lzw/ftzopen.c (ft_lzwstate_get_code): Limit `num_bits'.
|
|
8d7b9198
|
2016-08-16T08:07:58
|
|
[lzw] Avoid buffer overrun.
Reported as
https://bugzilla.mozilla.org/show_bug.cgi?id=1273283
* src/lzw/ftzopen.c (ft_lzwstate_refill): Ensure `buf_size' doesn't
underflow.
|
|
cf4224ad
|
2016-08-16T06:44:23
|
|
[truetype] Fix compiler warning.
* src/truetype/ttgload.c (load_truetype_glyph): Add cast.
|
|
248f5629
|
2016-08-13T06:53:53
|
|
[winfonts] Avoid zero bitmap width and height.
Reported as
https://bugzilla.mozilla.org/show_bug.cgi?id=1272173
* src/winfonts/winfnt.c (FNT_Face_Init): Check zero pixel height.
(FNT_Load_Glyph): Check for zero pitch.
|
|
125f2b63
|
2016-08-11T23:40:05
|
|
* src/truetype/ttinterp.c (Pop_Push_Count): Revert changes.
|
|
49d474f6
|
2016-08-11T23:03:09
|
|
* src/truetype/ttinterp.c (TT_RunIns): Minor and formatting.
|
|
dce554b1
|
2016-08-11T07:29:19
|
|
* src/truetype/ttinterp.c (Pop_Push_Count): Fix some entries.
|
|
3b37bfc4
|
2016-08-10T22:38:08
|
|
* src/smooth/ftgrays.c (gray_hline): Fix uninitialized access.
|
|
5224aae8
|
2016-08-10T19:47:29
|
|
[sfnt] Use correct type for `italicAngle' field (#48732).
* src/sfnt/ttload.c (tt_face_load_post): Fix types.
|
|
53059f92
|
2016-08-07T09:01:33
|
|
[sfnt] Fix `FT_Get_Advance' for bitmap strikes.
`FT_Get_Advance' returns 0 for bitmap fonts. It first gets the
advance value from the font table and then scales it by the
`font->size->metrics->x_scale' field. But `FT_Select_Size' doesn't
set that value for bitmap fonts and the advance gets scaled to zero.
Taken from
https://github.com/behdad/harfbuzz/issues/252
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
<TT_SBIT_TABLE_TYPE_EBLC>: Set scale values.
|
|
8183eeb1
|
2016-08-06T23:12:55
|
|
[truetype] Fix GX variation handling of composites.
* src/truetype/ttgload.c (load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `ARGS_ARE_XY_VALUES' flag.
|
|
97718f3c
|
2016-08-05T23:36:16
|
|
[smooth] Minor refactoring.
* src/smooth/ftgrays.c (gray_render_scanline, gray_render_line):
Updated.
|
|
053943a7
|
2016-07-30T00:27:48
|
|
[truetype] Comment.
|
|
fae4ec05
|
2016-07-29T06:43:32
|
|
[sfnt, truetype] Don't abort on invalid `maxComponentDepth'.
Since 2016-05-16 we detect infinite recursion directly.
* src/sfnt/ttload.c (tt_face_load_maxp): Don't adjust
`maxComponentDepth'.
* src/truetype/ttgload.c (load_truetype_glyph): Don't abort if
`maxComponentDepth' is not valid. Instead, simply adjust its value
and emit a tracing message.
|
|
d9c7f5aa
|
2016-07-26T20:20:27
|
|
* src/autofit/aflatin.c (af_latin_metrics_scale_dim): Minor.
No functional change.
|
|
3a528bbe
|
2016-07-22T06:59:36
|
|
[truetype] Record the end of IDEFs.
To match the logic in FDEF. The value of the end is only used for
bound-checking in `Ins_JMPR', so it may not have been obvious that
it was not recorded. Tested (as part of Font Validator 2.0) all the
fonts on Fedora and did not see any change.
* src/truetype/ttinterp.c (Ins_IDEF): Updated.
|
|
7f63105c
|
2016-07-19T21:35:58
|
|
[truetype] Sanitizer fix, second try.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Fix boundary
tests and use only one slot more.
|