|
ee3f36f6
|
2016-07-14T10:25:20
|
|
[sfnt] Fix `face_index' value in `FT_Face' for named instances.
* src/sfnt/sfobjc.s (sfnt_init_face): Don't strip off higher 16bits.
|
|
bbcb9779
|
2016-04-13T00:11:52
|
|
Typos.
|
|
351fc4b4
|
2016-03-29T09:13:13
|
|
[pfr] Fix binary search (#47514).
* src/pfr/pfrsbit.c (pfr_lookup_bitmap_data): Handle border
conditions correctly.
|
|
32950391
|
2016-02-15T12:54:40
|
|
Whitespace.
|
|
813aca51
|
2016-02-14T16:03:15
|
|
[cff] Make old CFF engine show MM CFFs (without variations).
The new code only displays the first master in the font.
* src/cff/cffgload.c (cff_decode_parse_charstrings): Add new
parameter to allow function calls from dictionaries also.
<cff_op_blend>: Partially implement it.
Update all callers.
* src/cff/cffgload.h: Updated.
* src/cff/cffparse.c (cff_parser_init): Add new parameter to pass the
number of Multiple Master designs.
Update all callers.
(cff_parse_multiple_master): New function to rudimentarily parse
operator.
(cff_parser_run): Handle `T2' operator.
* src/cff/cffparse.h: Updated.
(CFF_ParserRec): Add `num_designs' field.
* src/cff/cffload.c: Updated.
* src/cff/cfftoken.h: Handle `MultipleMaster' operator.
* src/cff/cfftypes.h (CFF_FontRecDictRec): Add `num_designs' field.
* src/sfnt/sfobjs.c (sfnt_init_face): Don't handle `fvar' table for
MM CFFs.
|
|
9adeab64
|
2016-01-13T11:54:10
|
|
Update copyright year.
|
|
37412ff9
|
2016-01-12T21:37:13
|
|
Don't use macro names that contain `__' [1/2].
Such macro names are reserved for both C and C++.
*/*: Replace macros of the form `__XXX_H__' with `XXX_H_'.
|
|
abb33121
|
2015-11-08T10:00:34
|
|
[sfnt] Accept version 3 of `EBLC' and `CBLC' tables also.
* src/sfnt/ttsbit.c (tt_face_load_sbit): Implement it.
|
|
0f0a6bb8
|
2015-11-05T13:48:11
|
|
[sfnt] Ignore embedded bitmaps with zero size (#46379).
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bit_aligned): Implement
it.
|
|
aae88087
|
2015-11-03T17:30:36
|
|
[sfnt] Protect against zero-size bitmaps (#46345).
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Check
`glyph_size'.
|
|
40cb1dc3
|
2015-10-31T19:08:27
|
|
Formatting.
|
|
57cbb8c1
|
2015-10-31T18:47:26
|
|
[sfnt] Fix cmap 14 validation (#46346).
* src/sfnt/ttcmap.c (tt_cmap14_validate): Check limit before
accessing `numRanges' and `numMappings'.
Fix size check for non-default UVS table.
|
|
009cc150
|
2015-10-31T17:52:56
|
|
[sfnt] Handle infinite recursion in bitmap strikes (#46344).
* src/sfnt/ttsbit.c (TT_SBitDecoder_LoadFunc,
tt_sbit_decoder_load_bitmap, tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_png): Add
argument for recursion depth.
(tt_sbit_decoder_load_compound): Add argument for recursion depth.
Increase recursion counter for recursive call.
(tt_sbit_decoder_load_image): Add argument for recursion depth.
Check recurse depth.
(tt_face_load_sbit_image): Updated.
|
|
4188deac
|
2015-10-30T08:07:56
|
|
Comments.
|
|
07f27e1e
|
2015-10-24T15:22:13
|
|
Thinkos and omissions.
|
|
6f09011f
|
2015-10-24T10:10:22
|
|
[sfnt] Sanitize bitmap strike glyph height.
Problem reported by Nikolay Sivov <bunglehead@gmail.com>.
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Avoid zero value
for `metrics->height' by applying some heuristics.
|
|
e93d326c
|
2015-10-22T10:17:20
|
|
[sfnt, type42] Fix clang compiler warnings.
* src/sfnt/sfobjs.c (sfnt_init_face): Initialize `offset'.
* src/type42/t42parse.c (t42_parse_sfnts): Use proper cast.
|
|
e6593389
|
2015-10-21T08:04:29
|
|
[sfnt] Avoid unnecessarily large allocation for WOFFs (#46257).
* src/sfnt/sfobjs.c (woff_open_font): Use WOFF's `totalSfntSize'
only after thorough checks.
Add tracing messages.
|
|
4f7f6f6e
|
2015-10-11T07:55:25
|
|
[sfnt] Improve extraction of number of named instances.
* src/sfnt/sfobjs.c (sfnt_init_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check number of instances against
`fvar' table size.
|
|
8de39a79
|
2015-10-10T13:34:11
|
|
[sfnt] Fix infinite loops with broken cmaps (#46167).
* src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next): Take care
of border condidions (i.e., if the loops exit naturally).
|
|
983b00ec
|
2015-10-08T18:44:45
|
|
[sfnt] Fix some signed overflows (#46149).
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
<TT_SBIT_TABLE_TYPE_SBIX>: Use `FT_MulDiv'.
|
|
90e437e3
|
2015-10-01T20:00:27
|
|
[sfnt] Make `tt_cmap4_char_map_linear' more robust (#46078).
* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Take care of
border conditions (i.e., if the loop exits naturally).
|
|
5f8f44d2
|
2015-10-01T14:16:03
|
|
[sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
reject too large glyph indices.
|
|
2ff83a5c
|
2015-09-30T14:44:29
|
|
[sfnt] Rewrite `tt_cmap4_char_map_linear' (#46078).
* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Add code to better
skip invalid segments.
If searching the next character, provide a more efficient logic to
speed up the code.
|
|
5339c75e
|
2015-09-24T13:39:44
|
|
[sfnt] Better checks for invalid cmaps (2/2) (#46019).
While the current code in `FT_Get_Next_Char' correctly rejects
out-of-bounds glyph indices, it can be extremely slow for malformed
cmaps that use 32bit values. This commit tries to improve that.
* src/sfnt/ttcmap.c (tt_cmap8_char_next, tt_cmap12_next,
tt_cmap12_char_map_binary, tt_cmap13_next,
tt_cmap13_char_map_binary): Reject glyph indices larger than or
equal to the number of glyphs.
|
|
c409eb18
|
2015-09-24T12:39:38
|
|
[base, sfnt] Better checks for invalid cmaps (1/2).
* src/base/ftobjs.c (FT_Get_Char_Index): Don't return out-of-bounds
glyph indices.
(FT_Get_First_Char): Updated.
* src/sfnt/ttcmap.c (tt_cmap6_char_next): Don't return character
codes greater than 0xFFFF.
(tt_cmap8_char_index): Avoid integer overflow in computation of
glyph index.
(tt_cmap8_char_next): Avoid integer overflows in computation of
both next character code and glyph index.
(tt_cmap10_char_index): Fix unsigned integer logic.
(tt_cmap10_char_next): Avoid integer overflow in computation of
next character code.
(tt_cmap12_next): Avoid integer overflows in computation of both
next character code and glyph index.
(tt_cmap12_char_map_binary): Ditto.
(tt_cmap12_char_next): Simplify.
(tt_cmap13_char_map_binary): Avoid integer overflow in computation
of next character code.
(tt_cmap13_char_next): Simplify.
|
|
cbdf13e5
|
2015-09-24T12:14:38
|
|
Formatting, documentation improvements.
|
|
730b6d74
|
2015-09-19T12:41:12
|
|
[sfnt] Improve handling of invalid SFNT table entries (#45987).
This patch fixes weaknesses in function `tt_face_load_font_dir'.
- It incorrectly assumed that valid tables are always at the
beginning. As a consequence, some valid tables after invalid
entries (which are ignored) were never seen.
- Duplicate table entries (this is, having the same tag) were not
rejected.
- The number of valid tables was sometimes too large, leading to
access of invalid tables.
* src/sfnt/ttload.c (check_table_dir): Add argument to return number
of valid tables.
Add another tracing message.
(tt_face_load_font_dir): Only allocate table array for valid
entries as returned by `check_table_dir'.
Reject duplicate tables and adjust number of valid tables
accordingly.
|
|
14d6b5d7
|
2015-08-13T15:22:17
|
|
[truetype] Introduce named instance access to GX fonts.
For functions querying a face, bits 16-30 of the face index can hold
the named instance index if we have a GX font. The indices start
with value 1; value 0 indicates font access without GX variation
data.
* include/freetype/freetype.h (FT_FaceRec): Update documentation.
* include/freetype/internal/sfnt.h: Ditto.
* src/sfnt/sfobjs.c (sfnt_init_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Get number of named instances and
do argument checks.
(sfnt_load_face): Updated.
* src/truetype/ttobjs.c (tt_face_init)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Use named instance, overwriting
the style name.
* src/base/ftobjs.c (open_face_from_buffer,
open_face_PS_from_sfnt_stream): Updated.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Updated.
* src/cff/cffload.c (cff_font_load): Updated.
* src/cff/cffobjs.c (cff_face_init): Make function exit early for
pure CFF fonts if `font_index < 0'.
Updated.
* src/cid/cidobjs.c (cid_face_init): Updated.
* src/pcf/pcfdrivr.c (PCF_Face_Init): Updated.
* src/pfr/pfrobjs.c (pfr_face_init): Updated.
* src/type1/t1objs.c (T1_Face_Init): Updated.
* src/type42/t42objs.c (T42_Face_Init): Updated.
* src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init):
Updated.
* docs/CHANGES: Updated.
|
|
6343ba22
|
2015-08-01T07:53:48
|
|
Fix some bugs found by clang's `-fsanitize=undefined' (#45661).
* src/base/ftrfork.c (FT_Raccess_Get_HeaderInfo): Only accept
positive values from header.
Check overflow.
* src/base/ftoutln.c (SCALED): Correctly handle left-shift of
negative values.
* src/bdf/bdf.h (_bdf_glyph_modified, _bdf_set_glyph_modified,
_bdf_clear_glyph_modified): Use unsigned long constant.
* src/bdf/bdfdrivr.c (BDF_Size_Select, BDF_Glyph_Load): Don't
left-shift values that can be negative.
* src/pcf/pcfdrivr.c (PCF_Size_Select, PCF_Glyph_Load): Don't
left-shift values that can be negative.
* src/raster/ftraster.c (SCALED): Correctly handle left-shift of
negative values.
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Don't left-shift
values that can be negative.
* src/truetype/ttgload.c (TT_Load_Composite_Glyph,
compute_glyph_metrics, load_sbit_image): Don't left-shift values
that can be negative.
|
|
f9be567f
|
2015-07-09T15:10:31
|
|
Better support of user-supplied C++ namespaces.
See
http://lists.nongnu.org/archive/html/freetype-devel/2015-07/msg00008.html
for a rationale.
* src/autofit/afpic.h, src/base/basepic.h, src/cff/cffpic.h,
src/pshinter/pshpic.h, src/psnames/pspic.h, src/raster/rastpic.h,
src/sfnt/sfntpic.h, src/smooth/ftspic.h, src/truetype/ttpic.h
(FT_BEGIN_HEADER, FT_END_HEADER): Move macro calls to not enclose
header files that contain FT_{BEGIN,END}_HEADER macros by
themselves.
* src/autofit/aftypes.h [FT_DEBUG_AUTOFIT]: Include
FT_CONFIG_STANDARD_LIBRARY_H earlier.
* src/truetype/ttpic.h: Include FT_INTERNL_PIC_H.
|
|
1cdac10d
|
2015-07-07T14:04:44
|
|
[sfnt] Make `tt_face_get_name' member of the SFNT interface.
* include/freetype/internal/sfnt.h (TT_Get_Name_Func): New
prototype.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): New member `get_name'.
* src/sfnt/sfdriver.c (sfnt_interface): Updated.
* src/sfnt/sfobjs.c (tt_face_get_name): Tag it with `LOCAL_DEF'.
* src/sfnt/sfobjs.h: Add prototype for it.
|
|
31d97df9
|
2015-06-21T19:12:12
|
|
Make Jam support work again.
This is just very basic stuff and just a little bit tested on
GNU/Linux only. I won't delve into this since I'm not a Jam user.
* Jamfile: Call `HDRMACRO' for `ftserv.h' also.
(DEFINES): Replace with...
(CCFLAGS): ... this.
* src/Jamfile: Don't call `HDRMACRO' for `internal.h'; this is
already handled in the top-level Jamfile.
* src/autofit/Jamfile (DEFINES): Replace with...
(CCFLAGS): ... this.
(_sources): Add missing files.
* src/cache/Jamfile: Don't call `HDRMACRO' for `ftcache.h'; it no
longer contains macro header definitions.
* src/base/Jamfile, src/cff/Jamfile, src/sfnt/Jamfile,
src/truetype/Jamfile (_sources): Add missing files.
|
|
1a147ac0
|
2015-06-16T10:20:07
|
|
Fix Savannah bug #45326.
* src/sfnt/sfntpic.h (SFNT_SERVICES_GET): Remove duplicate
definitions.
|
|
792db0b9
|
2015-04-15T23:20:23
|
|
[cff,cid,pfr,sfnt,winfonts] NULL.
|
|
eee7d8ba
|
2015-03-10T11:15:15
|
|
[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
* include/ftbitmap.h, src/base/ftbitmap.c: Implement it.
Update all callers.
* docs/CHANGES: Updated.
|
|
493cc037
|
2015-03-06T05:38:31
|
|
* src/sfnt/ttload.c (tt_face_load_font_dir): Fix compiler warning.
Found by Alexei.
|
|
851e8151
|
2015-03-01T19:27:09
|
|
Various compiler warning fixes for `make multi'.
* src/autofit/afcjk.c (af_cjk_hints_compute_blue_edges),
src/autofit/aflatin.c (af_latin_hint_compute_blue_edges,
af_latin_hint_edges), src/autofit/aflatin2.c
(af_latin2_hints_compute_blue_edges, af_latin2_hint_edges): Declare
as `static'.
* src/cache/ftccmap.c (FTC_CMAP_QUERY_HASH, FTC_CMAP_NODE_HASH):
Removed. Unused.
* src/cache/ftcimage.c: Include FT_INTERNAL_OBJECTS_H.
* src/cache/ftcmanag.c (FTC_LRU_GET_MANAGER): Removed. Unused.
* src/cff/cf2intrp.c: Include `cf2intrp.h'.
* src/cff/cffdrivr.c (PAIR_TAG): Removed. Unused.
* src/gzip/ftgzip.c (NO_DUMMY_DECL): Removed. Unused.
* src/psaux/afmparse.c (afm_parser_read_int): Declare as `static'.
* src/pshinter/pshalgo.c (STRONGER, PSH_ZONE_MIN, PSH_ZONE_MAX):
Removed. Unused.
* src/raster/ftraster.c (Render_Glyph): Declare as `static'.
* src/sfnt/ttpost.c (load_format_20): Fix signedness warning.
* src/truetype/ttdriver.c (PAIR_TAG): Removed. Unused.
* src/truetype/ttsubpix.c (is_member_of_family_class,
is_member_of_style_class): Declare as `static'.
* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Declare
as `static'.
* src/type1/t1load.c (mm_axis_unmap, mm_weights_unmap): Declare as
`static'.
(T1_FIELD_COUNT): Removed. Unused.
* src/type1/t1parse.h (T1_Done_Table): Removed. Unused.
* src/type42/t42parse.c (T1_Done_Table): Removed. Unused.
|
|
b0ebcdc8
|
2015-02-22T20:42:49
|
|
* src/sfnt/ttpost.c (load_format_20): Fix error tracing message.
Bug introduced 6 commits earlier.
|
|
01f0842e
|
2015-02-22T12:03:28
|
|
[sfnt] Signedness fixes.
* src/sfnt/pngshim.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap.c,
src/sfnt/ttkern.c, src/sfnt/ttload.c, src/sfnt/ttpost.c,
src/sfnt/ttsbit.c: Apply.
* src/sfnt/sfdriver.c: Apply.
(sfnt_get_ps_name): Simplify.
|
|
92359bd8
|
2015-02-07T09:47:23
|
|
[sfnt] Fix Savannah bug #44184.
* src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir): No
longer reject `htmx' and `vmtx' tables with invalid length but
sanitize them.
|
|
f57fc59e
|
2015-01-17T20:41:43
|
|
Run `src/tools/update-copyright'.
|
|
f796cf6c
|
2015-01-17T20:11:10
|
|
Normalize copyright notice format.
|
|
36d03c9f
|
2015-01-12T11:26:30
|
|
Fix Savannah bug #43976.
Assure that FreeType's internal include directories are found before
`CPPFLAGS' (which might be set by the user in the environment), and
`CPPFLAGS' before `CFLAGS'.
* builds/freetype.mk (FT_CFLAGS): Don't add `INCLUDE_FLAGS'.
(FT_COMPILE): Make this a special variable for compiling only the
files handled in `freetype.mk'.
(.c.$O): Removed, unused.
* src/*/rules.mk (*_COMPILE): Fix order of include directories.
|
|
5018477f
|
2014-12-07T08:17:12
|
|
Minor.
|
|
ed6a9df0
|
2014-12-06T23:28:58
|
|
Whitespace.
|
|
16188ebf
|
2014-12-03T10:18:34
|
|
FT_Sfnt_Tag: s/ft_sfnt_xxx/FT_SFNT_XXX/ for orthogonality.
All public FreeType enumeration and flag values are uppercase...
* include/tttables.h (FT_Sfnt_Tag): Implement it. For backwards
compatilibity, retain the old values as macros.
* src/base/ftfstype.c (FT_Get_FSType_Flags), src/sfnt/sfdriver.c
(get_sfnt_table): Updated.
|
|
ef439fd2
|
2014-11-25T08:14:15
|
|
[Savannah bug #43682] Change some signatures to `void' return type.
* include/internal/pshints.h (PSH_Globals_SetScaleFunc),
include/internal/sfnt.h (TT_Get_Metrics_Func),
src/pshinter/pshglob.c (psh_globals_set_scale),
src/pshinter/pshrec.c (ps_hints_init), src/sfnt/ttmtx.c
(tt_face_get_metrics), src/truetype/ttinterp.c (TT_Goto_CodeRange,
TT_Set_CodeRange, TT_Clear_CodeRange, TT_Done_Context,
TT_Save_Context): Do it.
* src/pshinter/pshglob.h, src/pshinter/pshrec.h, src/sfnt/ttmtx.h,
src/truetype/ttgload.c (TT_Hint_Glyph), src/truetype/ttinterp.c
(TT_Run_Context), src/truetype/ttinterp.h, src/truetype/ttobjs.c
(tt_size_run_fpgm, tt_size_run_prep): Updated.
|
|
6889f7b7
|
2014-11-24T17:16:08
|
|
Remove all code related to FT_MAX_CHARMAP_CACHEABLE.
This is no longer used.
* src/base/ftobjs.c, src/cache/ftccmap.c, src/cff/cffobjs.c,
src/sfnt/ttcmap.c: Do it.
|
|
f0292bb9
|
2014-11-24T10:51:21
|
|
[sfnt] Fix Savannah bug #43680.
This adds an additional constraint to make the fix from 2013-01-25
really work.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_image) <index_format==4>:
Check `p' before `num_glyphs'.
|
|
f70d9342
|
2014-11-24T09:31:32
|
|
[sfnt] Fix Savannah bug #43672.
* src/sfnt/ttkern.c (tt_face_load_kern): Use correct value for
minimum table length test.
|
|
9bd20b73
|
2014-11-22T06:24:45
|
|
[sfnt] Fix Savannah bug #43656.
* src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
tests.
|
|
23c093fc
|
2014-11-21T08:41:39
|
|
Minor.
|
|
b3500af7
|
2014-11-19T21:28:21
|
|
Change some fields in `FT_Bitmap' to unsigned type.
This doesn't break ABI.
* include/ftimage.h (FT_Bitmap): Make `rows', `width', `num_grays',
`pixel_mode', and `palette_mode' unsigned types.
* src/base/ftbitmap.c: Updated.
(FT_Bitmap_Copy): Fix casts.
* src/cache/ftcsbits.c, src/raster/ftraster.c, src/sfnt/pngshim.c:
Updated.
|
|
54abd228
|
2014-11-15T09:05:22
|
|
[sfnt] Fix Savannah bug #43597.
* src/sfnt/pngshim.c (Load_SBit_Png): Protect against too large
bitmaps.
|
|
257c270b
|
2014-11-12T21:42:13
|
|
[sfnt] Fix Savannah bug #43591.
* src/sfnt/ttsbit.c (tt_sbit_decoder_init): Protect against addition
and multiplication overflow.
|
|
677ddf4f
|
2014-11-12T21:26:44
|
|
[sfnt] Fix Savannah bug #43590.
* src/sfnt/ttload.c (check_table_dir, tt_face_load_font_dir):
Protect against addition overflow.
|
|
f46add13
|
2014-11-12T21:06:08
|
|
[sfnt] Fix Savannah bug #43589.
* src/sfnt/sfobjs.c (woff_open_font): Protect against addition
overflow.
|
|
602040b1
|
2014-11-12T20:51:20
|
|
[sfnt] Fix Savannah bug #43588.
* src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate,
tt_cmap12_validate, tt_cmap13_validate, tt_cmap14_validate): Protect
against overflow in additions and multiplications.
|
|
cc7bb80b
|
2014-10-20T08:35:50
|
|
[sbit] Minor fixes.
* src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
Accept overlay format also, but emit warning message in that case.
(tt_sbit_decoder_load_metrics): Add missing newline to error
message.
(tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
7.1) to the list of unsupported formats.
|
|
03987bfd
|
2014-10-16T07:19:46
|
|
A better fix for Savannah bug #43392.
Suggested by Doug Felt <dougfelt@gmail.com>.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Set
`vertAdvance' to zero...
* src/truetype/ttgload.c (TT_Load_Glyph): ... and set here a default
value for `vertAdvance' based on `linearVertAdvance' in case
`vertAdvance' is zero. Note that the previous computed ad-hoc value
for `linearVertAdvance' was apparently not tested in a real-life
situation.
|
|
1ca5fa15
|
2014-10-12T08:31:32
|
|
[sfnt] Fix Savannah bug #43392.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics): Don't let
vertical metrics uninitialized.
|
|
3897556a
|
2014-06-27T06:55:56
|
|
Fix Apple standard glyph names.
* src/sfnt/ttpost.c (tt_post_default_names): Synchronize with
`tools/glnames.py'
Problem reported by Adam Twardoch <adam@fontlab.com>.
|
|
d708658c
|
2014-06-13T15:56:11
|
|
And another warning from Wojciech.
|
|
e5c0fff5
|
2014-06-13T14:01:20
|
|
Fix more compiler warnings.
Reported by Wojciech Mamrak <wmamrak@gmail.com>.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
Make integer constant unsigned.
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
<TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
(tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
casts.
|
|
6497b9c5
|
2014-06-13T09:28:00
|
|
Fix compiler warnings.
Reported by Wojciech Mamrak <wmamrak@gmail.com>.
* src/autofit/afglobal.c (af_face_globals_compute_style_coverage),
src/autofit/afmodule.c (af_property_set): Fix `signed' vs.
`unsigned' issues.
* src/autofit/aflatin.c (af_latin_metrics_init_blues): Make compiler
happy.
* src/base/ftlcdfil.c (_ft_lcd_filter_fir): Use only four elements
for `fir'.
Fix `signed' vs. `unsigned' issues.
* src/sfnt/sfobjs.c (WRITE_BYTE): Removed, unused.
(WRITE_USHORT, WRITE_ULONG): Add proper casts.
* src/truetype/ttgload.c (TT_Get_VMetrics): Add proper casts.
* src/truetype/ttinterp.c (Ins_DELTAP): Add proper casts for `B1'
and `B2'.
|
|
d9b4470e
|
2014-04-22T07:33:07
|
|
* src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
|
|
f8555b5d
|
2014-04-03T05:45:38
|
|
Don't require `gzip' module for `sfnt'.
Reported by Preet <prismatic.project@gmail.com>.
* src/sfnt/sfobjs.c (woff_open_font): Guard use of
FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
|
|
1a69dc7c
|
2014-03-09T06:06:58
|
|
* src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
|
|
a2b5f66b
|
2014-02-26T19:50:18
|
|
[sfnt] Fix Savannah bug #41696.
* src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate,
tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
|
|
7be2a94a
|
2014-02-08T13:55:38
|
|
Fix clang static analyzer and compiler warnings.
* src/autofit/afhints.c (af_glyph_hints_align_weak_points),
src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>,
src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c
(FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style),
src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c
(cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load),
src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c
(sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next,
tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead
code.
* src/autofit/afmodule.c (af_property_get_face_globals,
af_property_set, af_property_get), src/base/ftbitmap.c
(ft_gray_for_premultiplied_srgb_bgra): Make functions static.
* src/base/ftobjs.c (ft_remove_renderer): Protect against
library == NULL.
(ft_property_do): Make function static.
* src/base/ftrfork.c: Include `ftbase.h'.
* src/sfnt/ttsbit.c (tt_face_load_sbix_image)
[!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c
(T1_Compute_Max_Advance): Avoid compiler warning.
* src/truetype/ttinterp.c (TT_New_Context): Reduce scope of
variable.
|
|
a8ceae40
|
2014-02-08T06:30:06
|
|
Fix Savannah bug #41507.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap)
[!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
|
|
752f3912
|
2014-01-23T09:14:25
|
|
Fix Savannah bug #41310.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>:
Don't check metrics, which this format doesn't have.
This is another correction to the commit from 2013-11-21.
|
|
64b395cc
|
2013-12-04T06:18:56
|
|
[sfnt] Fix handling of embedded bitmap strikes.
This corrects the commit from 2013-11-21. Problem reported by
Andrey Panov <panov@canopus.iacp.dvo.ru>.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Fix logic to
detect excessive bytes for bit-aligned bitmaps.
|
|
a44b784b
|
2013-12-02T09:52:38
|
|
Formatting.
|
|
9326cafa
|
2013-11-23T23:59:25
|
|
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Typo.
|
|
8af2a1cd
|
2013-11-21T13:13:12
|
|
[truetype] Typo.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
* src/sfnt/sfobjs.c (sfnt_load_face): Return correct `bsize->width'
value if the font lacks an `OS/2' table.
|
|
427b1768
|
2013-11-21T13:10:56
|
|
[truetype] Improve handling of buggy embedded bitmap strikes.
We are now able to successfully load `AppleMyoungJo.ttf'.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap): Don't trust glyph
format.
|
|
bc25de66
|
2013-11-16T07:52:20
|
|
[sfnt] Fix `OS/2' table version 5 support.
We now follow the `official' announcement from Microsoft (on the
OpenType mailing list, which unfortunately hasn't a public archive).
* include/freetype/tttables.h (TT_OS2):
s/usLowerPointSize/usLowerOpticalPointSize/,
s/usUpperPointSize/usUpperOpticalPointSize/.
* src/sfnt/ttload.c (tt_face_load_os2): Update, and set correct
default values.
|
|
ee510510
|
2013-10-27T07:25:35
|
|
[sfnt] Implement support for `OS/2' table version 5.
See
http://typedrawers.com/discussion/470/new-microsoft-size-specific-design-selection-mechanism
for the announcement.
* include/freetype/tttables.h (TT_OS2): Add fields
`usLowerPointSize' and `usUpperPointSize'. Since FreeType returns
this structure only as a pointer through `FT_Get_Sfnt_Table', there
shouldn't be any ABI problems.
* src/sfnt/ttload.c (tt_face_load_os2): Implement it.
* docs/CHANGES: Updated.
|
|
01af71d4
|
2013-10-02T22:04:07
|
|
* src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
|
|
85a7fdf3
|
2013-08-29T21:03:05
|
|
[sfnt] Fix frame access while reading WOFF table directory.
* src/sfnt/sfobjs.c (woff_open_font): Using single memory frame
while reading the directory entries for the whole loop.
|
|
d689d1cf
|
2013-08-29T17:53:40
|
|
Implement support for WOFF containers.
We simply synthesize a SFNT from the WOFF, create a memory stream
for the new data, and load the SFNT as usual.
Does NOT add any API to access WOFF metadata or private blocks.
* include/freetype/internal/tttypes.h (WOFF_HeaderRec,
WOFF_TableRec): New structures.
* include/freetype/tttags.h (TTAG_wOFF): New macro.
* src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling
`open_face'.
* src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include
`FT_GZIP_H'.
(WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for
writing to a stream.
(sfnt_stream_close, compare_offsets, woff_open_font): New functions.
(sfnt_open_font): Handle `TTAG_wOFF'.
(sfnt_init_face): Set `stream' after calling `sfnt_open_font'.
* src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling
`sfnt->init_face'.
* src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an
argument so that a changed stream survives.
Update callers.
|
|
c799dd67
|
2013-08-27T21:46:03
|
|
* src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
|
|
74a9b670
|
2013-08-02T14:53:32
|
|
[sfnt] Fix compilation with g++.
* src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use
cast.
(Load_SBit_Png): Pacify compiler.
|
|
e8ed2d62
|
2013-08-01T12:20:20
|
|
Another round of cppcheck nitpicks.
The call was (from the top-level of the FreeType tree):
cppcheck --force \
--enable=all \
-I /usr/include \
-I /usr/local/include \
-I /usr/lib/gcc/i586-suse-linux/4.7/include \
-I include \
-I include/freetype \
-I include/freetype/config \
-I include/freetype/internal \
-DFT2_BUILD_LIBRARY \
. &> cppcheck.log
using cppcheck git commit f7e93f99.
Note that cppcheck still can't handle `#include FOO' (with `FOO' a
macro).
*/* Improve variable scopes.
*/* Remove redundant initializations which get overwritten.
* src/gxvalid/*: Comment out redundant code or guard it with
FT_DEBUG_LEVEL_TRACE.
|
|
21c32b08
|
2013-07-25T21:53:18
|
|
Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR.
Also disambiguate Google's color bitmap tables.
* include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR):
New macros.
* include/freetype/internal/tttypes.h (TT_SbitTableType): Add
TT_SBIT_TABLE_TYPE_CBLC.
* src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR.
* src/sfnt/ttsbit.c (tt_face_load_sbit,
tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle
TT_SBIT_TABLE_TYPE_CBLC.
|
|
b4725cb7
|
2013-07-24T14:25:39
|
|
[sfnt] Fix for `make multi' target.
* src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
|
|
ff269528
|
2013-07-20T08:02:39
|
|
[sfnt] Fix `sbix' table version handling.
* src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
USHORT version numbers are to be considered as `minor'.
|
|
778a7e6a
|
2013-07-19T14:28:28
|
|
[sfnt] `sbix' fix-ups.
* src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps
are rendered scaled and then the `glyf' outline rendered on top. We
don't support that yet, so just ignore the `glyf' outline and
advertise it as a bitmap-only font.
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
[TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units.
(tt_face_load_sbix_image): Typo.
|
|
01705395
|
2013-07-18T13:13:12
|
|
[sfnt] Add support for Apple's `sbix' color bitmap table.
* include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen
fields to FT_Short and FT_UShort, respectively.
(TT_SBitTableType): New enumeration.
(TT_FaceRec): Add `sbit_table_type' field.
* include/freetype/tttags.h (TTAG_sbix): New macro.
* src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic
FT_GlyphSlot argument instead FT_Bitmap.
Add flag to control map and metrics handling.
Update all users.
* src/sfnt/ttsbit.c: Include `ttmtx.h'.
(tt_face_load_eblc): Renamed to...
(tt_face_load_sbit): This.
Handlic `sbix' bitmaps.
(tt_face_free_eblc): Renamed to...
(tt_face_load_sbit): This.
Updated.
(tt_face_load_strike_metrics): Handle `sbix' bitmaps.
(tt_face_load_sbix_image): New function.
(tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image,
tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass
and handle load flags.
(tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better
handle formats 17-19.
Move color to grayscale conversion to...
(tt_face_load_sbit_image): Here.
Handle `sbix' bitmaps.
* src/sfnt/pngshim.h: Updated.
* src/sfnt/ttsbit.h: Updated.
* src/sfnt/sfdriver.c: Updated.
|
|
274207eb
|
2013-07-18T12:38:57
|
|
[sfnt] Ignore invalid magic number in `head' or `bhed'.
Other font engines seem to ignore it also. Problem reported by
Hin-Tak Leung <htl10@users.sourceforge.net>.
* src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if
we have an invalid magic number.
|
|
aa0ac323
|
2013-07-02T10:36:26
|
|
[sfnt] Fix documentation of `tt_face_get_metrics'.
Problem reported in Savannah bug #39383.
|
|
a25ecfdd
|
2013-06-10T12:57:16
|
|
[sfnt] Improve embedded bitmap tracing.
* src/base/ftobjs.c (FT_Request_Size): Move trace message regarding
bitmap strike match to...
(FT_Match_Size): This function.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics,
tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned,
tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png,
tt_sbit_decoder_load_image): Decorate with tracing messages.
|
|
45392b77
|
2013-06-05T13:43:20
|
|
Fix compiler warnings.
* include/freetype/internal/ftmemory.h: Decorate memory allocation
macros with `FT_Long' where appropriate.
Remove duplicate of FT_MEM_QRENEW_ARRAY definition.
* src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use
cast.
* src/base/ftobjs.c: Add warning disabling pragma for MSVC while
including `md5.c'.
* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add
cast.
* src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts.
(tt_sbit_decoder_load_bitmap): Beautification.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize
variables (earlier).
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants
where appropriate.
* src/type1/t1load.c (T1_Get_MM_Var): Ditto.
|
|
760d342d
|
2013-05-29T11:36:18
|
|
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images. If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.
Note that color bitmaps are converted to grayscale if client didn't
ask for color.
* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_USE_PNG): New macro.
* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.
* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.
* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.
* src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files.
* src/sfnt/sfnt.c: Include `pngshim.c'.
* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'. This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.
* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.
* docs/CHANGES: Updated.
|
|
ea2b4756
|
2013-05-10T08:04:33
|
|
[sfnt] Clean up bitmap code.
* src/sfnt/ttsbit.c: Deleted.
* src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'.
* rules.mk (SFNT_DRV_H): Updated.
|
|
f6aa089f
|
2013-05-10T07:58:47
|
|
*/* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
|
|
5ea06ce0
|
2013-03-17T08:14:46
|
|
Whitespace.
|
|
89f50647
|
2013-03-14T17:50:49
|
|
*/*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate.
FT_Err_XXX and friends are no longer directly used in the source
code.
|