|
d8b8b6e3
|
2018-06-10T21:37:15
|
|
s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
* include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
|
|
6732f055
|
2018-06-10T09:12:24
|
|
Implement `FT_Palette_Get'.
* src/base/ftcolor.c: New file.
* src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
src/base/ftbase.c: Add `ftcolor.c'.
|
|
8f1ed548
|
2018-06-07T02:48:48
|
|
[base] API for Harmony LCD rendering.
This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
LCD subpixel geometry including non-striped patterns.
* src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
* include/freetype/ftlcdfil.h: Document it.
* include/freetype/freetype.h: Minor.
* include/freetype/ftchapters.h: Minor.
|
|
78d85b9c
|
2018-06-04T18:42:29
|
|
Restore missing comment lines and other minor fixes
|
|
9ac9060d
|
2018-06-03T09:01:17
|
|
[GSoC] src/*.*: Convert block comments to `light' style.
This monster commit was created by applying Nikhil's scripts
`docconverter.py' and `markify.py' to all C header and source files,
followed up by minor manual clean-up.
No change in functionality, of course.
I used commit f7419907bc6044b9b7057f9789866426c804ba82 from
https://github.com/nikramakrishnan/freetype-docs.git.
|
|
ae2cd1b7
|
2018-05-30T09:34:57
|
|
Various minor color fixes.
* include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
* include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
type of `load_flags' to `FT_Int32'.
* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
type of `idx' to `FT_UInt'.
(TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
`load_flags' to `FT_Int32'.
* src/sfnt/ttcolr.c (find_base_glyph_record,
tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
(tt_face_find_color, tt_face_colr_blend_layer): Change type of
`color_index' to `FT_UInt'.
Fix signedness and type issues.
* src/sfnt/ttcolr.h: Updated.
|
|
7b73cb07
|
2018-05-24T22:38:24
|
|
[smooth] Formalize Harmony LCD rendering.
This generalizes magic outline shifts that make Harmony LCD
rendering work in terms of precise two-dimensional RGB subpixel
positions. These coordinates are now set in time of the `smooth'
module initialization and later used to shift a glyph outline for
rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
coordinates. The letter, however, rotates them before using.
The LCD bitmap padding is also calculated using these coordinates.
* include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
`lcd_geometry'.
* src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
* src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
(ft_smooth_init): Initialize `lcd_geometry'.
(ft_smooth_render_generic): Formalize outline shifts.
|
|
583dabf2
|
2018-05-16T20:37:43
|
|
Add function `FT_Get_GlyphLayers' to access `COLR' table data.
* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
structure to...
* include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
header file.
(FT_Glyph_Layer): New typedef.
Update code to use it where appropriate.
* src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
|
|
f1458d2e
|
2018-05-15T21:47:18
|
|
[base] Fix mono bitmap presetting (#53896).
It is rather fundamental to set monochrome bitmap based on rounded
CBox because the b/w rasterizer turns on pixels when their centers are
inside the glyph outline. The dropout control is unpredictable and can
distort narrow glyphs if the bitmap is too wide.
Reported by Chris Liddell.
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
are too close, adjust them before rounding.
|
|
5fd12564
|
2018-05-15T11:30:49
|
|
Grammar fixes.
|
|
2dd20916
|
2018-05-15T09:05:53
|
|
[sfnt] If `COLR' is present, don't assume that all glyphs use it.
* src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
current glyph is not a `COLR' base glyph.
* src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
`color_layers' if there are no color layers.
|
|
06820637
|
2018-05-14T09:45:16
|
|
* src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
|
|
c5a8a535
|
2018-05-14T09:42:20
|
|
Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
* src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
|
|
1b2abda9
|
2018-05-13T10:58:49
|
|
* src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
|
|
f04d8175
|
2018-05-13T03:25:09
|
|
[sfnt] Preliminary support of coloured layer outlines.
This commit enables OpenType's COLR/CPAL table handling; a typical
application are color emojis that can be scaled to any size.
If the color palette does not exist or is invalid, the rendering
step rasterizes the outline instead. The current implementation
assumes that the foreground is black.
Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
There are still some issues with metrics; additionally, an API to
fetch color layers is missing.
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
FT_Colr_InternalRec): New structures.
(FT_Slot_InternalRec): Add `color_layers' field.
* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
TT_Blend_Colr_Func): New function types.
(SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
and `colr_blend' fields.
* include/freetype/internal/tttypes.h (TT_FaceRec): Add
`colr_and_cpal' field.
* include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
macros.
* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
* src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
Handle glyph color layers.
* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
`ttcolr.c'.
* src/sfnt/sfdriver.c: Include `ttcolr.h'.
(PUT_COLOR_LAYERS): New macro.
Update call to `FT_DEFINE_SFNT_INTERFACE'.
* src/sfnt/sfnt.c: Include `ttcolr.c'.
* src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
(sfnt_done_face): Updated.
* src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
|
|
95149592
|
2018-05-02T20:27:48
|
|
Remove FT_CONFIG_OPTION_PIC and related code.
*/* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
preprocessor symbol.
*/*: Replace `XXX_GET' macros (which could be either a function in
PIC mode or an array in non-PIC mode) with `xxx' arrays.
* include/freetype/internal/ftpic.h, src/autofit/afpic.c,
src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
Removed.
|
|
86bc8a95
|
2018-05-01T20:27:24
|
|
* Version 2.9.1 released.
=========================
Tag sources with `VER-2-9-1'.
* docs/VERSION.TXT: Add entry for version 2.9.1.
* docs/CHANGES: Updated.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
src/base/ftver.rc, builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.9/2.9.1/, s/29/291/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 22:1:16.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* include/freetype/ftgasp.h: Use FT_BEGIN_HEADER and FT_END_HEADER.
|
|
2157d8fa
|
2018-04-24T10:29:19
|
|
[base] Avoid undefined behaviour in lcd filtering code (#53727).
* src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
Ensure `height > 0'.
|
|
67697d00
|
2018-04-22T21:15:10
|
|
* src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing.
|
|
3b88576b
|
2018-04-22T17:22:35
|
|
[base] Fix bitmap emboldening.
Bug introduced after release 2.8.
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): We use
`FT_QALLOC_MULT', which doesn't zero out the buffer. Adjust the
bitmap copying code to take care of this fact.
|
|
c2e2a8e5
|
2018-04-22T17:13:50
|
|
Revert "[base] Fix bitmap copying where the new pitch is smaller."
This reverts commit c0f1adedcfaad4f7d2fe912ff4b2933845d61d93.
|
|
c0f1aded
|
2018-04-22T11:44:24
|
|
[base] Fix bitmap copying where the new pitch is smaller.
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Handle it.
|
|
733a21bd
|
2018-03-05T23:37:17
|
|
Make `ftlcdfil.c' part of the `base' module.
`ftobjs.c' needs `ft_lcd_padding'.
Problem reported by duhuanpeng <548708880@qq.com>.
* modules.cfg (BASE_EXTENSIONS): Don't include `ftlcdfil.c'.
* src/base/ftbase.c: Include `ftlcdfil.c'.
* src/base/rules.mk (BASE_SRC): Add `ftlcdfil.c'.
* src/base/Jamfile (_sources): Adjusted.
* docs/INSTALL.ANY: Updated.
|
|
f4a35316
|
2018-03-05T20:45:12
|
|
Make `ftfntfmt.c' part of the `base' module.
`ftobjs.c' needs `FT_Get_Font_Format'.
Problem reported by duhuanpeng <548708880@qq.com>.
* modules.cfg (BASE_EXTENSIONS): Don't include `ftfntfmt.c'.
* src/base/ftbase.c: Include `ftfntfmt.c'.
* src/base/rules.mk (BASE_SRC): Add `ftfntfmt.c'.
* src/base/Jamfile (_sources): Adjusted.
* docs/INSTALL.ANY: Updated.
|
|
6ce66856
|
2018-01-18T21:29:48
|
|
* src/base/ftver.rc: Fix mingw-w64 compilation.
|
|
4b8ccc56
|
2018-01-18T04:32:52
|
|
[build] Enable VERSIONINFO resource for Cygwin/MinGW.
* builds/unix/configure.raw: Check for resource compiler.
* builds/unix/unix-cc.in: Conditionally set up resource compiler.
* builds/freetype.mk: Add conditional rule for `ftver.rc'.
* src/base/ftver.rc: Copyright notice and year update.
|
|
fd8000f0
|
2018-01-18T03:58:34
|
|
[build] Move VERSIONINFO resource.
* builds/windows/vc2010/freetype.vcxproj: Updated.
* builds/windows/ftver.rc: Move file from here...
* src/base/ftver.rc: ... to here.
|
|
3758aed7
|
2018-01-06T08:39:36
|
|
Add `FT_Done_MM_Var'.
This is necessary in case the application's memory routines differ
from FreeType. A typical example is a Python application on Windows
that calls FreeType compiled as a DLL via the `ctypes' interface.
* include/freetype/ftmm.h, src/base/ftmm.c (FT_Done_MM_Var): Declare
and define.
* docs/CHANGES: Updated.
|
|
0a0c2256
|
2018-01-02T09:33:57
|
|
Update copyright year.
|
|
14cd0734
|
2017-12-27T08:59:46
|
|
Fix compiler warnings.
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Make `pitch' and
`new_pitch' unsigned.
* src/base/ftpsprop.c: Include FT_INTERNAL_POSTSCRIPT_PROPS_H.
|
|
3cc88e2e
|
2017-12-27T08:19:09
|
|
Fixes for `make multi'.
* include/freetype/internal/ftpsprop.h: Use `FT_BASE_CALLBACK'.
(ps_property_get): Harmonize declaration with corresponding
function typedef.
* include/freety[e/internal/fttrace.h: Add `trace_psprops'.
* src/base/ftpsprop.c: Include necessary header files.
(FT_COMPONENT): Define.
(ps_property_set): Tag with `FT_BASE_CALLBACK_DEF'.
(ps_property_get): Tag with `FT_BASE_CALLBACK_DEF'.
Harmonize declaration with corresponding function typedef.
|
|
dd6330d7
|
2017-12-27T08:06:47
|
|
Add missing ChangeLog entry, copyright notices, whitespace, formatting.
|
|
a956e36c
|
2017-12-25T12:34:37
|
|
Move PostScript drivers' property handlers to `base'
This reduces the amount of duplicated code across PostScript drivers.
* src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c
({cff,cid,t1}_property_{get,set}): Moved to...
* include/freetype/internal/ftpsprop.h: ...this new file.
(ps_property_{get,set}): New functions to replace moved ones.
* src/base/ftpsprop.c: Implement above functions.
* include/freetype/internal/internal.h (FT_INTERNAL_POSTSCRIPT_PROPS_H):
New macro.
* src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c: Updated.
* src/base/Jamfile, src/base/rules.mk, src/base/ftbase.c: Updated.
|
|
08cd62de
|
2017-12-20T22:06:19
|
|
Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.
We exit early if the current design or blend coordinates are
identical to the new ones.
* src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Set_Var_Design):
Implement it, returning internal error code -1 if there will be no
variation change.
* src/type1/t1load.c (t1_set_mm_blend): Ditto.
* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
|
|
068a7a03
|
2017-12-18T20:34:05
|
|
* src/*/*: Only use `ft_' and `FT_' variants of stdc library stuff.
|
|
7d3dfcd4
|
2017-12-17T08:19:51
|
|
Fix incorrect advance width scaling (#52683).
* src/base/ftadvance.c (FT_Get_Advances): Always respect the
FT_LOAD_NO_SCALE flag if present.
|
|
2c048a8a
|
2017-12-11T19:24:30
|
|
Fix compiler warning (#52640).
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Remove unused
variable.
|
|
98ba0c4a
|
2017-12-08T18:38:41
|
|
New `ftdriver.h' file, covering all driver modules.
This reduces redundancy and increases synergy; it also reduces the
number of header files.
* include/freetype/config/ftheader.h (FT_DRIVER_H): New macro.
(FT_AUTOHINTER_H, FT_CFF_DRIVER_H, FT_TRUETYPE_DRIVER_H,
FT_PCF_DRIVER_H, FT_TYPE1_DRIVER_H): Make them aliases to
FT_DRIVER_H.
* include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
include/freetype/ftpcfdrv.h, include/freetype/ftt1drv.h,
include/freetype/ftttdrv.h: Replaced with...
* include/freetype/ftdriver.h: ...this new file.
(FT_CFF_HINTING_ADOBE, FT_T1_HINTING_ADOBE): Renamed to...
(FT_HINTING_ADOBE): ... this new macro.
(FT_CFF_HINTING_FREETYPE, FT_T1_HINTING_FREETYPE): Renamed to...
(FT_HINTING_FREETYPE): ... this new macro.
* src/*/*: Updated accordingly.
|
|
e1090c60
|
2017-12-08T09:54:36
|
|
Fix access to uninitalized memory (#52613).
Also reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=791317
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): If increasing the
bitmap size needs a larger bitmap buffer, assure that the new memory
areas are initialized also.
|
|
87ddad20
|
2017-12-04T20:43:30
|
|
Update or fix links to use the https protocol instead of http.
|
|
2f1863cf
|
2017-11-23T20:40:52
|
|
Silence unused function warnings.
Some static function declarations cause unused function warnings if
certain config options are turned off via `ftoption.h'.
* src/base/ftbase.h, src/base/ftrfork.c, src/sfnt/ttbdf.h,
src/truetype/ttgxvar.h: Add #ifdef guards around these sections.
|
|
a364e38a
|
2017-11-14T07:54:53
|
|
Use Adobe hinting engine for `light' hinting of both CFF and Type 1.
Since Ewald Hew factored the Adobe hinting engine out of the CFF
driver code, we can now use it on Type 1 (and CID) font formats, as
both have the same hinting philosophy.
This change activates the Adobe hinter when in LIGHT mode, and
therefore always unless explicitly asking for the auto-hinter. This
makes LIGHT behavior consistent with CFF fonts. As of this commit,
the hinting engine table looks as follows.
LIGHT NORMAL
-------------------------
TrueType Auto v40
CFF Adobe Adobe
Type 1 Adobe Adobe
|
|
8f5568bf
|
2017-11-06T21:42:46
|
|
* src/base/ftobjs.c (FT_Load_Glyph): Relocate condition.
|
|
d74440a3
|
2017-10-20T16:27:33
|
|
[base] Improve tracing in FT_Load_Glyph, FT_*_Size.
* src/base/ftobjs.c (FT_Load_Glyph): Tag tracing messages with
function name, glyph index, and load flags.
(FT_Select_Metrics, FT_Request_Metrics): Remove all tracing.
(FT_Select_Size, FT_Request_Size): Improve tracing.
|
|
c10e7800
|
2017-10-18T23:05:51
|
|
[base] Improve tracing in FT_Render_Glyph.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Add total coverage
calculations and downgrade Netpbm dump to bitmap:7.
|
|
ccb0f799
|
2017-10-15T14:19:13
|
|
[base, cff] Fix MSVC warnings.
* src/base/ftobjs.c (FT_New_Library): C4702: unreachable code.
(ft_glyphslot_preset_bitmap): C4244: possible loss of data.
* src/cff/cffload.c (cff_blend_doBlend): C4244: possible loss of data.
Turn `sum' into unsigned.
|
|
6bea49e0
|
2017-10-14T22:45:11
|
|
[base] Netpbm image tracing.
* src/base/ftobjs.c (FT_Load_Glyph): Trace bitmap size.
(FT_Render_Glyph_Internal): Trace bitmap in Netpbm format.
* src/smooth/ftgrays.c (gray_sweep): Sweep remnants of span tracing.
|
|
64985519
|
2017-10-09T07:45:03
|
|
* src/base/ftoutln.c (FT_Outline_Translate): Fix integer overflow.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=772775
|
|
b7e43f7d
|
2017-10-08T11:58:39
|
|
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Integer overflows.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3579
|
|
dd8539ef
|
2017-10-07T11:40:03
|
|
New function `FT_Set_Named_Instance'.
No effect yet.
* src/base/ftmm.c (FT_Set_Named_Instance): New function.
* include/freetype/ftmm.h: Updated.
|
|
c3083e45
|
2017-10-05T14:32:24
|
|
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Fix integer
overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3539
|
|
9b549fa6
|
2017-09-30T16:36:28
|
|
[base,cff,cid] Whitespace, formatting.
|
|
c8d8e158
|
2017-09-30T14:28:58
|
|
Signedness fixes in bitmap presetting.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3514.
* src/raster/ftrend1.c (ft_raster1_render): Exlicitly signed height.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Explicitly unsigned
subtraction.
|
|
c26f7f97
|
2017-09-29T00:13:19
|
|
Bitmap metrics presetting [2/2].
* src/base/ftobjs.c (FT_Load_Glyph): Preset the bitmap metrics when
appropriate but `FT_Render_Glyph' is not called.
* include/freetype/freetype.h (FT_GlyphSlotRec): Document the change.
|
|
61d1818b
|
2017-09-28T00:20:50
|
|
Bitmap metrics presetting [1/2].
This mainly just extracts the code for presetting the bitmap metrics
from the monochrome, grayscale, and LCD renderers into a separate
function.
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): New function that
calculates prespective bitmap metrics for the given rendering mode.
* include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
Declare it.
* src/base/ftlcdfil.c (ft_lcd_padding): New helper function that adds
padding to CBox taking into account pecularities of LCD rendering.
* include/freetype/ftlcdfil.h (ft_lcd_padding): Declare it.
* src/raster/ftrend1.c (ft_raster1_render): Reworked to use
`ft_glyphslot_preset_bitmap'.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
(ft_smooth_render_lcd, ft_smooth_render_lcd): The pixel_mode setting
is moved to `ft_glyphslot_preset_bitmap'.
|
|
02e80da6
|
2017-09-24T22:18:34
|
|
Tweak per-face LCD filtering controls.
Thing are simpler with a NULL-function pointer.
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): New
pointer to the filter function.
(FT_LibraryRec): Remove unused `lcd_filter'.
(FT_Bitmap_LcdFilterFunc, ft_lcd_filter_fir): Move from here...
* include/freetype/ftlcdfil.h (FT_Bitmap_LcdFilterFunc,
ft_lcd_filter_fir): ... to here.
* src/base/ftobjs.c (ft_open_face_internal): NULL-initialize the
per-face filter.
(FT_Face_Properties): Set it.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Simplify.
* src/base/ftlcdfil.c (ft_lcd_filter_fir, FT_Libary_SetLcdFilter):
Minor.
|
|
39ce3ac4
|
2017-09-16T19:08:17
|
|
* Version 2.8.1 released.
=========================
Tag sources with `VER-2-8-1'.
* docs/VERSION.TXT: Add entry for version 2.8.1.
* docs/CHANGES: Updated.
* README, Jamfile (RefDoc), builds/windows/vc2005/freetype.vcproj,
builds/windows/vc2005/index.html,
builds/windows/vc2008/freetype.vcproj,
builds/windows/vc2008/index.html,
builds/windows/vc2010/freetype.vcxproj,
builds/windows/vc2010/index.html,
builds/windows/visualc/freetype.dsp,
builds/windows/visualc/freetype.vcproj,
builds/windows/visualc/index.html,
builds/windows/visualce/freetype.dsp,
builds/windows/visualce/freetype.vcproj,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/freetype.vcproj,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/freetype.vcproj,
builds/wince/vc2008-ce/index.html: s/2.8/2.8.1/, s/28/281/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 21:0:15.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
|
|
3ef59e59
|
2017-09-09T01:28:24
|
|
[base] Remove a check for resource ID in the resource fork driver.
LastResort.dfont has a marginal resource ID 0xFFFF for sfnt
resource. Inside Macintosh: More Macintosh Toolbox, `Resource IDs'
(1-46), tells that some IDs are reserved and should not be used.
FreeType2 just uses resource ID to sort the fragmented resource.
To accept the marginal fonts, the checking is removed.
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove res_id
validity check, fix a trace message format.
|
|
22a7f5b8
|
2017-09-07T22:36:02
|
|
Branding fixes.
|
|
a3dd6d99
|
2017-09-05T23:02:04
|
|
Fix multiple calls of `FT_Bitmap_Convert'.
The documentation of `FT_Bitmap_Convert' says that multiple calls do
proper reallocation of the target FT_Bitmap object. However, this
failed for the sequence
non-empty bitmap
empty bitmap
non-empty bitmap
Reason was that `FT_Bitmap_Convert' only reallocated the bitmap
buffer if it became too small; it didn't make the buffer smaller.
For an empty bitmap following a non-empty one, only the buffer
dimension got set to zero, without deallocation. If the next call
was a non-empty buffer again, an assertion in `ft_mem_qrealloc' was
triggered.
* src/base/ftbitmap.c (FT_Bitmap_Convert): Always reallocate target
buffer to the correct size.
* docs/CHANGES: Document it.
|
|
f0898b92
|
2017-08-25T21:40:01
|
|
Swap `ALLOC_MULT' arguments (#51833).
* src/base/ftbitmap.c (ft_bitmap_assure_buffer): Updated.
* src/winfonts/winfnt.c (FNT_Load_Glyph): Updated.
* src/raster/ftrend1.c (ft_raster1_render): Updated.
|
|
bd28952e
|
2017-08-22T08:41:03
|
|
[base] Don't zero out allocated memory twice (#51816).
Patch applied from bug report.
* src/base/ftutil.c (ft_mem_qrealloc): Use low-level allocation to
avoid unnecessary overhead.
|
|
f2e121ab
|
2017-08-10T12:56:50
|
|
[base] Minor API improvement for default variation axis setting.
* src/base/ftmm.c (FT_Set_MM_Design_Coordinates,
FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates,
FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0.
* docs/CHANGES: Updated.
|
|
f43b3094
|
2017-08-05T18:22:17
|
|
[base, truetype] New function `FT_Get_Var_Axis_Flags'.
The reserved `flags' field got a value in OpenType version 1.8.2;
unfortunately, the public `FT_Var_Axis' structure misses the
corresponding element. Since we can't add a new field, we add an
access function.
* src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function.
* include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro.
Updated.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory
of `mmvar' to hold axis flags.
Fill the axis flags array.
* docs/CHANGES: Updated.
|
|
fe0a7d9d
|
2017-07-13T10:25:42
|
|
[base] Fix memory leak.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=738362
* src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case
of error.
|
|
134de096
|
2017-07-12T22:16:37
|
|
[base] Integer overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573
* src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG.
|
|
c56d8851
|
2017-07-03T22:49:07
|
|
* src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code.
|
|
7819aeb6
|
2017-06-28T22:57:41
|
|
Avoid Microsoft compiler warnings (#51331).
While clang's sanitizer recommends a cast to unsigned for safe
negation (to handle -INT_MIN), both MSVC and Visualc emit warning
C4146 if an unsigned value gets negated.
* include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32),
src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a
subtraction.
|
|
dde8f5ab
|
2017-06-27T06:16:04
|
|
[truetype] Integer overflows.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391
* src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use
NEG_LONG.
* src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG.
|
|
7b727833
|
2017-06-17T23:28:14
|
|
[base, smooth] LCD filtering cleanups.
* src/base/ftlcdlil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
Clean up, start filtering from the bottom-left origin.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
|
|
2c4fba9c
|
2017-06-10T11:03:41
|
|
* src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.
Bug introduced 2017-05-28.
|
|
dcd8de27
|
2017-06-09T11:21:58
|
|
*/*: Remove `OVERFLOW_' prefix.
This increases readability.
|
|
addb2ddd
|
2017-06-03T21:05:42
|
|
[base, cff, truetype] Integer overflows.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068
* src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use
OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
* src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c
(cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32.
* src/truetype/ttgload.c (compute_glyph_metrics): User
OVERFLOW_SUB_LONG.
* src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig,
Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X,
Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use
OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
|
|
0ad32623
|
2017-06-01T17:00:37
|
|
* src/base/ftglyph.c (FT_Get_Glyph): Check `slot->advance'.
|
|
fbe2fe4c
|
2017-05-29T13:29:28
|
|
Handle some integer overflow run-time errors (#46149, #48979).
This commit (mainly for 32bit CPUs) is the first of a series of
similar commits to handle known integer overflows. Basically, all
of them are harmless, since they affect rendering of glyphs only,
not posing security threats. It is expected that fuzzying will show
up more overflows, to be fixed in due course.
The idea is to mark places where overflows can occur, using macros
that simply cast to unsigned integers, because overflow arithmetic
is well defined in this case. Doing so suppresses run-time errors
of sanitizers without adding computational overhead.
* include/freetype/internal/ftcalc.h (OVERFLOW_ADD_INT,
OVERFLOW_SUB_INT, OVERFLOW_MUL_INT, OVERFLOW_ADD_LONG,
OVERFLOW_SUB_LONG, OVERFLOW_MUL_LONG): New macros.
* src/base/ftcalc.c (FT_RoundFix, FT_CeilFix, FT_Matrix_Multiply,
FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled,
ft_corner_orientation): Use new macros.
* src/base/ftoutln.c (FT_Outline_Get_Orientation): Use new macros.
|
|
93572190
|
2017-05-28T07:20:09
|
|
Fix negation of INT_MIN and LONG_MIN (#46149).
* src/base/ftcalc.c (FT_MOVE_SIGN): Add argument to pass unsigned
value, to be used as the result.
(FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix, FT_MulFix,
FT_Vector_NormLen): Updated.
|
|
ab2599ea
|
2017-05-20T00:35:21
|
|
[smooth] Implement minimal dynamic padding for LCD filtering.
Extra bitmap padding for LCD filtering depends on the filter. The
default 5-tap filter needs 2 extra subpixels. The light 3-tap filter
needs only 1 extra subpixel. This space could be already available
due to rounding. In order to optimize the padding, we now expand
CBox for the given filter weights before rounding.
This change breakes current Skia (and Firefox).
* include/freetype/internal/ftobjs.h (FT_LibraryRec)
[FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Remove `lcd_extra' field.
* src/base/ftlcdfil.c (FT_Library_SetLcdFilterWeights,
FT_Library_SetLcdFilter): Remove `lcd_extra' initializations.
* src/smooth/ftsmooth.c (ft_smooth_render_generic): Implement dymanic
LCD padding.
|
|
e99b26aa
|
2017-05-14T21:57:27
|
|
Remove remnants of raster pool.
* include/freetype/internal/ftobjs.h (FT_LibraryRec): Remove
`raster_pool' and `raster_pool_size' fields.
* src/base/ftobjs.c (FT_New_Library), src/raster/ftrend1.c
(ft_raster1_init), src/smooth/ftsmooth.c (ft_smooth_init): Updated.
|
|
8cd31eb7
|
2017-05-03T23:54:29
|
|
*/*: s/backwards compatibility/backward compatibility/.
|
|
ba40054c
|
2017-05-02T12:32:19
|
|
[autofit] Remove `slight' auto-hint mode again.
A poll on freetype-devel favoured changes directly applied to
`light'.
* include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT,
FT_RENDER_MODE_SLIGHT): Removed.
* src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
(af_latin_hints_init), src/autofit/aflatin2.c
(af_latin2_hints_init): Revert change from 2017-04-22.
* src/autofit/afloader.c (af_loader_load_glyph) Remove references to
FT_RENDER_MODE_SLIGHT.
[AF_CONFIG_OPTION_TT_SIZE_METRICS]: Enable TrueType-like metrics
unconditionally.
* src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Revert change from
2017-04-22.
* src/base/ftobjs.c (FT_Load_Glyph): Revert change from 2017-04-22.
* src/pshinter/pshalgo.c (ps_hints_apply): Revert change from
2017-04-22.
* src/smooth/ftsmooth.c (ft_smooth_render): Revert change from
2017-04-22.
* docs/CHANGES: Updated.
|
|
7abf0cb7
|
2017-04-30T17:25:11
|
|
[autofit] Fix metrics computation.
Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and
Nikolaus Waxweiler <madigens@gmail.com>.
* src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of
auto-hinter metrics. Without this change, multiple size changing
calls for a single face fail.
|
|
5aa6716a
|
2017-04-22T13:27:21
|
|
Add new `slight' auto-hinting mode.
This mode uses fractional advance widths and doesn't scale glyphs
horizontally, only applying vertical scaling and hinting.
At the same time, the behaviour of the `light' auto-hinter gets
restored for backwards compatibility: Both vertical and horizontal
scaling is again based on rounded metrics values (this was changed
in a commit from 2017-03-30 as a side effect). To be more precise,
the behaviour is restored for TrueType fonts only; for other font
formats like Type 1, this is a new feature of the `light' hinting
mode.
* include/freetype/freetype.h (FT_LOAD_TARGET_SLIGHT): New macro.
(FT_RENDER_MODE_SLIGHT): New render mode.
* include/freetype/internal/ftobjs.h (FT_Size_InternalRec): Add
`autohint_mode' and `autohint_metrics' fields.
* src/autofit/afcjk.c (af_cjk_hints_init), src/autofit/aflatin.c
(af_latin_hints_init), src/autofit/aflatin2 (af_latin2_hints_init):
Updated.
* src/autofit/afloader.c (af_loader_embolden_glyph_in_slot): Use
`autohint_metrics'.
(af_loader_load_glyph): s/internal/slot_internal/.
Initialize `autohint_metrics' and `autohint_mode' depending on
current auto-hint mode.
Use `autohint_metrics'.
Updated.
* src/base/ftadvanc.c (LOAD_ADVANCE_FAST_CHECK): Updated.
* src/base/ftobjs.c (FT_Load_Glyph): Updated.
(FT_New_Size): Allocate `internal' object.
* src/pshinter/pshalgo.c (ps_hints_apply): Updated.
* src/smooth/ftsmooth.c (ft_smooth_render): Updated.
|
|
5412d886
|
2017-04-22T12:48:50
|
|
Introduce `FT_Size_InternalRec' structure.
We are going to extend this later on.
* include/freetype/internal/ftobjs.h (FT_Size_InternalRec): New
structure with a single field `module_data'.
* src/base/ftobjs.c (FT_New_Size): Allocate `internal' field of
`FT_Size' structure.
* src/cff/cffgload.c (cff_builder_init, cff_decoder_prepare): Use
`size->internal->module_data' instead of `size->internal'.
* src/cff/cffobjs.c (cff_size_done): Deallocate `module_data'.
(cff_size_init, cff_size_select, cff_size_request): Use
`size->internal->module_data' instead of `size->internal'.
* src/cif/cidobjs.c (cid_size_done, cid_size_init,
cid_size_request): Use `size->internal->module_data' instead of
`size->internal'.
* src/psaux/psobjs.c (t1_builder_ini): Use
`size->internal->module_data' instead of `size->internal'.
* src/type1/t1objs.c (T1_Size_Done, T1_Size_Init, T1_Size_Request):
Use `size->internal->module_data' instead of `size->internal'.
|
|
5efba4c4
|
2017-04-16T07:23:24
|
|
Fix tracing messages.
* src/base/ftobjs.c (FT_Face_GetCharVariantIndex,
FT_Face_GetCharVariantIsDefault, FT_Face_GetVariantsOfChar): Print
correct function name.
|
|
67ff7664
|
2017-03-23T12:41:30
|
|
Make MM fonts work (again).
* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Ignore
return value of `ft_face_get_mvar_service'; instead, check whether a
service is actually returned.
|
|
9931175d
|
2017-03-18T07:06:49
|
|
Improve `make multi'.
* src/autofit/aflatin2.c: Guard file with FT_OPTION_AUTOFIT2.
* src/base/ftmac.c: Guard more parts of the file with FT_MACINTOSH.
* src/psaux/afmparse.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
* src/sfnt/pngshim.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS also.
* src/sfnt/ttbdf.c: Avoid empty source file.
* src/sfnt/ttpost.c: Guard file with
TT_CONFIG_OPTION_POSTSCRIPT_NAMES.
* src/sfnt/ttsbit.c: Guard file with
TT_CONFIG_OPTION_EMBEDDED_BITMAPS.
* src/truetype/ttgxvar.c, src/truetype/ttinterp.c: Avoid empty
source file.
* src/truetype/ttsubpix.c: Guard file with
TT_USE_BYTECODE_INTERPRETER also.
* src/type1/t1afm.c: Guard file with T1_CONFIG_OPTION_NO_AFM.
* src/autofit/autofit.c, src/base/ftbase.c, src/cache/ftcache.c,
src/cff/cff.c, src/cid/type1cid.c, src/gxvalid/gxvalid.c,
src/pcf/pcf.c, src/pfr/pfr.c, src/psaux/psaux.c,
src/pshinter/pshinter.c, src/psnames/psnames.c, src/raster/raster.c,
src/sfnt/sfnt.c, src/smooth/smooth.c, src/truetype/truetype.c,
src/type1/type1.c, src/type42/type42.c: Remove conditionals; sort
entries.
|
|
bffb7fe9
|
2017-03-17T07:52:30
|
|
`make multi' fixes; compiler warnings.
* src/base/ftsnames.c: Include FT_INTERNAL_DEBUG_H.
* src/cff/cffobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
* src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H and FT_SERVICE_MULTIPLE_MASTERS_H.
(get_win_string, get_apple_string): Initialize `result'.
|
|
9357ef80
|
2017-03-15T07:56:22
|
|
Typo: s/stroke/strike/.
|
|
753e1131
|
2017-02-20T09:01:14
|
|
[cff] Introduce `random-seed' property (2/2).
* src/base/ftobjs.c: Include `FT_CFF_DRIVER_H'.
(open_face): Initialize `face->internal->random_seed'.
(FT_Face_Properties): Handle `FT_PARAM_TAG_RANDOM_SEED'.
* src/cff/cffdrivr.c (cff_property_set): Handle `random-seed'
property.
|
|
467b026c
|
2017-02-18T10:42:48
|
|
Remove clang warnings.
* src/autofit/aflatin.c (af_latin_sort_blue): Add missing `static'
keyword.
* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
Initialize some variables.
|
|
2b0ac189
|
2017-02-18T10:42:23
|
|
Add face property for stem darkening.
* include/freetype/ftautoh.h (FT_PARAM_TAG_STEM_DARKENING): New
macro.
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Add
`no_stem_darkening' field.
* src/autofit/afloader.c (af_loader_load_glyph),
src/autofit/afmodule.c (af_property_set): Updated.
* src/base/ftobjs.c: Include FT_AUTOHINTER_H.
(ft_open_face_internal): Updated.
(FT_Face_Properties): Handle FT_PARAM_TAG_STEM_DARKENING.
* src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Updated.
* src/cff/cffdrivr.c (cff_property_set): Updated.
|
|
2e951988
|
2017-02-16T20:45:45
|
|
Add face property for LCD filter weights.
* include/freetype/ftlcdfil.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS,
FT_LCD_FILTER_FIVE_TAPS): New macros.
(FT_LcdFiveTapFilter): New typedef.
* include/freetype/ftobjs.h (FT_Face_InternalRec)
[FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Add `lcd_weights' field.
(FT_Bitmap_LcdFilterFunc): Change third argument to weights array.
(ft_lcd_filter_fir): New prototype.
(FT_LibraryRec): Updated.
* src/base/ftlcdfil.c (_ft_lcd_filter_fir): Renamed to...
(ft_lcd_filter_dir): ... this base function.
Updated.
(_ft_lcd_filter_legacy): Updated.
(FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated.
* src/base/ftobjs.c (ft_open_face_internal): Updated.
(FT_Face_Properties): Handle FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
* src/smooth/ftsmooth.c (ft_smooth_render_generic)
[FT_CONFIG_OPTION_SUBPIXEL_RENDERING: Handle LCD weights from
`FT_Face_Internal'.
|
|
64cdee73
|
2017-02-15T08:06:35
|
|
Add new function `FT_Face_Properties'.
This commit provides the framework, to be filled with something
useful in the next commits.
* include/freetype/freetype.h (FT_Face_Properties): Declare.
* src/base/ftobjs.c (FT_Face_Properties): New function.
|
|
1e550601
|
2017-01-31T18:47:10
|
|
[base] Fix error handing in MM functions.
* src/base/ftmm.c (FT_Set_Var_Design_Coordinates,
FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates):
Implement it.
|
|
f4253366
|
2017-01-27T00:06:52
|
|
[base] Add `FT_Get_Sfnt_LangTag' function.
* include/freetype/ftsnames.h (FT_SfntLangTag): New structure.
(FT_Get_Sfnt_LangTag): New declaration.
* src/base/ftsnames.c (FT_Get_Sfnt_LangTag): New funtion.
* docs/CHANGES: Updated.
|
|
f4e56966
|
2017-01-25T15:08:41
|
|
[sfnt] s/TT_NameEntry/TT_Name/.
* include/freetype/internal/tttypes.h (TT_NameEntryRec): Renamed
to...
(TT_NameRec): This.
(TT_NameTableRec): Updated.
* src/base/ftsnames.c (FT_Get_Sfnt_Name): Updated.
* src/sfnt/sfdriver.c (sfnt_get_ps_name): Updated.
* src/sfnt/sfobjs.c (tt_name_entry_ascii_from_utf16,
tt_name_entry_ascii_from_other): Renamed to...
(tt_name_ascii_from_utf16, tt_name_entry_ascii_from_other): This,
respectively.
(TT_NameEntry_ConvertFunc): Renamed to...
(TT_Name_ConvertFunc): This.
(tt_face_get_name): Updated.
* src/sfnt/ttload.c (tt_face_load_name, tt_face_free_names):
Updated.
|
|
983fb0df
|
2017-01-24T23:56:59
|
|
Typos.
|
|
693f56ff
|
2017-01-23T12:53:18
|
|
[base] Add `FT_Set_Default_Properties' (#49187).
* include/freetype/ftmodapi.h: Add declaration.
* src/base/ftinit.c (ft_set_default_properties): Renamed to...
(FT_Set_Default_Properties): ... this.
(FT_Init_FreeType): Updated.
* docs/CHANGES: Updated.
|
|
a32270ae
|
2017-01-19T23:01:44
|
|
Typos.
|
|
c529885b
|
2017-01-12T08:42:55
|
|
* src/base/ftobjs.c (ft_open_face_internal): Improve tracing.
|