summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Adds transformation support for OT-SVG glyphs.ot-svg-cleanMoazin Khatti2019-08-175-3/+131
| | | | | | | | | | | | | | | | * include/freetype/ftglyph.h: Adds `transform' and `delta' fields to `FT_SvgGlyphRed'. * include/freetype/otsvg.h: Adds `transform' and `delta' fields to `FT_SVG_Document'. * src/base/ftglyph.c: Creates method `ft_svg_glyph_transform' and modifies existing functions for the new fields. * src/sfnt/ttsvg.c: (tt_face_load_svg_doc) Set `transform' to unity and `delta' to zero by default. * src/svg/ftsvg.c: Adds `ft_svg_transform'.
* Adds OT-SVG glyph support to FT Glyph Management API.Moazin Khatti2019-08-172-0/+237
| | | | | | | | | | * include/freetype/ftglyph.h: Adds `FT_SvgGlyph' and `FT_SvgGlyphRec'. * src/base/ftglyph.c: Adds glyph class `ft_svg_glyph_class' and its methods. (FT_New_Glyph) Adds code to set the class of OT-SVG glyphs. (FT_Glyph_To_Bitmap) Adds code to free memory allocated for `FT_SVG_Document' in `dummy.other'.
* [cache] Consider `FT_GLYPH_FORMAT_SVG' a valid format.Moazin Khatti2019-08-101-1/+2
|
* [svg] Creates new module for rendering OT-SVG glyphs.Moazin Khatti2019-08-1014-2/+559
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For rendering OT-SVG glyphs, a new renderer module `ot-svg' is created. The module holds hooks to an external library which are used for rendering. The hooks can be set via module properties. Also enabled bitmap presetting of OT-SVG glyphs at loading stage. * include/freetype/fterrdef.h: Adds two errors, namely, `Missing_SVG_Hooks' and `Invalid_SVG_Document'. * include/freetype/internal/ftobjs.h: Adds `svg_renderer_state' to `FT_LibraryRec' to let external libraries store state. * include/freetype/internal/fttrace.h: Adds entry for `ot-svg'. * modules.cfg: Ditto. * include/freetype/internal/internal.h: Adds `FT_INTERNAL_SVG_INTERFACE_H' for `svginterface.h'. * include/freetype/internal/svginterface.h: Internal header file to contain the interface of `ot-svg' module. Just exposes the preset function. * include/freetype/otsvg.h: Adds functypes for the four hooks and a structure to hold them. * src/base/ftobjs.c: (ft_glyphslot_preset_bitmap) Enable proper presetting of OT-SVG glyphs by using `ot-svg' renderer. (ft_add_renderer) Set `renderer->render' for `ot-svg' module. * src/svg/ftsvg.h: Declaration for `ot-svg' module. * src/svg/ftsvg.c: Module definition of `ot-svg' and its functions. * src/svg/svg.c: Single source file of `ot-svg' module. * src/svg/svgtypes.c: Defines `SVG_Renderer'. * src/svg/rules.mk: Compilation rules for `ot-svg' module. * src/svg/module.mk: Module definition of `ot-svg'.
* Adds the functionality to load SVG documents.Moazin Khatti2019-08-1011-11/+490
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SVG document corresponding to a glyphID is fetched and stored in an `FT_SVG_Document' structure which is referenced in the glyphslot. * include/freetype/config/ftheader.h: Adds `FT_OTSVG_H'. * include/freetype/ftimage.h: Adds `FT_GLYPH_FORMAT_SVG'. * include/freetype/internal/ftobjs.h: Adds `FT_GLYPH_OWN_GZIP_SVG'. * include/freetype/internal/sfnt.h: Adds `load_svg_doc' and its function type `TT_Load_Svg_Doc_Func'. * include/freetype/otsvg.h: Adds `FT_SVG_Document' and its struct. * src/base/ftobjs.c: Adds code to allocate and free memory for `FT_SVG_Document' in `slot->other'. * src/cff/cffgload.c: Adds code to load SVG glyph if it's present. * src/truetype/ttgload.c: Ditto. * src/sfnt/sfdriver.c: Adds `tt_face_load_svg_doc'. * src/sfnt/ttsvg.h: Ditto. * src/sfnt/ttsvg.c: Adds implementation of `tt_face_load_svg_doc' and its helper functions.
* [sfnt] Adds the functionality to load `SVG' table.Moazin Khatti2019-08-059-3/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds code to load the SVG table data into an `svg' structure and set the flag `FT_FACE_FLAG_SVG'. * include/freetype/freetype.h: Adds `FT_FACE_FLAG_SVG'. * include/freetype/internal/sfnt.h: Adds the fields `load_svg' and `free_svg' to `SFNT_Interface'. * include/freetype/internal/tttypes.h: Adds a void pointer field `svg' to hold info from `SVG' table. * include/freetype/internal/tttags.h: Adds the tag `TTAG_SVG'. * src/sfnt/ttsvg.c: Writes the functions `tt_face_load_svg' and `tt_face_free_svg' * src/sfnt/ttsvg.h: Writes header declarations for `tt_face_load_svg' and `tt_face_free_svg'. * src/sfnt/sfdriver.c: Adds the functions `tt_face_load_svg' and `tt_face_free_svg' to `sfnt_interface'. * src/sfnt/sfnt.c: Includes `ttsvg.c'. * src/sfnt/sfobjs.c: (sfnt_load_face) Adds code to load `svg' table struct. (sfnt_done_face) Adds code to free `svg' table struct.
* Adds `FT_CONFIG_OPTION_SVG' to allow toggling of OT-SVG support.Moazin Khatti2019-08-051-0/+9
|
* * src/base/ftbbox.c (cubic_peak): Sanitize left shift (#56586).Alexei Podtelezhnikov2019-07-232-4/+8
|
* * src/cid/cidload.c (cid_hex_to_binary): Fix typo (#56653).Weiyi Wu2019-07-222-1/+5
|
* [sfnt, winfonts] Avoid memory leaks in case of error (#56587).Werner Lemberg2019-07-123-4/+21
| | | | | | | * src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case of error. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto.
* Properly handle phantom points for variation fonts (#56601).Ben Wagner2019-07-122-6/+28
| | | | | * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Scale phantom points if HVAR and/or VVAR is present.
* [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580).Werner Lemberg2019-07-042-6/+23
| | | | | | The same as previous commit but for the old engine. * src/psaux/t1decode.c (t1operator_seac): Implement it.
* [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580).Chris Liddell2019-07-042-6/+37
| | | | | | | | | | | | | | | | | | | As originally intended, a Type 1 SEAC charstring would be used for an accented glyph (like `acaron' or `uumlaut'), where the advance width of the SEAC glyph is the same as that of the `base' glyph (like `a' or `u'). In this case it is not uncommon for the SEAC glyph to not use an (H)SBW opcode of its own but to rely on the value from the base glyph. However, out-of-spec fonts also use SEAC glyphs for ligatures (like `oe' or `fi'), and in those cases the overall advance width is greater than that of the `base' glyph. For this reason we have to allow that the SEAC glyph can have an (H)SBW value of its own, and if it has, retain this value, rather than the one from the base glyph. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSEAC>: Implement it.
* * Version 2.10.1 released.VER-2-10-1Werner Lemberg2019-07-0120-156/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-10-1'. * docs/VERSION.TXT: Add entry for version 2.10.1. * README, Jamfile (RefDoc), src/base/ftver.rc, 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.10.0/2.10.1/, s/2100/2101/. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1. * builds/unix/configure.raw (version_info): Set to 23:1:17. * CMakeLists.txt (VERSION_PATCH): Set to 1. * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
* * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality.Alexei Podtelezhnikov2019-06-262-2/+8
| | | | Reported by Armin Hasitzka.
* Doc polishing.Alexei Podtelezhnikov2019-06-223-6/+7
|
* Minor.Alexei Podtelezhnikov2019-06-191-1/+1
|
* docs/CHANGES: Updated.Werner Lemberg2019-06-191-0/+5
|
* * src/tools/apinames.c: Formatting, minor edits.Werner Lemberg2019-06-162-204/+241
|
* [autofit] Disable hinting if no blue zones are available (#56450).Werner Lemberg2019-06-163-7/+64
| | | | | | | | | | | | * src/autofit/afglobal.c (af_face_global_get_metrics): Start again (with dummy hinter module) if no blue zones are present. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change signature to return error code. If no blue zones are found, update `glyph_styles' array to hold AF_STYLE_NONE_DFLT instead of the current style. (af_latin_metrics_init): Return internal error code if no blue zones are found.
* Towards better VMS support.Werner Lemberg2019-06-165-2/+40
| | | | | | | | | | More to come. * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64, builds/vms/vmslib.dat: New files provided by Jouk Jansen <joukj@hrem.nano.tudelft.nl>. * builds/vms/ftconfig.h: Update, also from Jouk.
* * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor.Werner Lemberg2019-06-132-0/+8
|
* Add memory access macro summary.Werner Lemberg2019-06-131-0/+11
|
* [smooth] Restore the span buffering for direct mode only.Alexei Podtelezhnikov2019-06-132-6/+39
| | | | | | | | | | | | The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be enough to cover the entire scanline for simple glyphs in most cases: each slightly slanted edge needs up to two spans, plus a filling span in-between. This is not new, we used to do it before cb4388783cecc. * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'. (gray_hline, gray_sweep): Implement the span buffering. (gray_raster_render): Use negative `num_spans' to avoid the direct mode.
* * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error.Alexei Podtelezhnikov2019-06-122-1/+8
| | | | | Fix a warning by adding a return value as in `TT_RunIns', which should not be a compatibility issue.
* Rendering considerations.Alexei Podtelezhnikov2019-06-121-0/+5
|
* * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'.Alexei Podtelezhnikov2019-06-112-1/+5
|
* [gzip] Add support for `gzip' encoded header (#9812).Moazin Khatti2019-06-112-1/+8
|
* [type1,type42] Use `const' for string literals.Alexei Podtelezhnikov2019-06-109-53/+52
| | | | | | | | | | | * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated. * include/freetype/internal/t1types.h (T1_EncodingRec): Updated. * src/psaux/psobjs.[ch] (ps_table_add): Updated. * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated. * src/type42/t42objs.c (T42_Open_Face): Updated. * src/type42/t42parse.c (t42_parse_encoding): Updated. * src/cff/cffobjs.c (cff_face_init): Minor.
* [bdf,pcf] Use `const' for string literals.Alexei Podtelezhnikov2019-06-105-135/+145
| | | | | | | | * src/bdf/bdf.h (bdf_property_t): Updated `name'. * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property, _bdf_add_property,_bdf_ato*): Updated. * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated. * src/pcf/pcfread.c (pcf_intrpret_style): Ditto.
* Update CHANGES file.Werner Lemberg2019-06-101-0/+20
|
* * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash.Philip Race2019-06-072-0/+9
| | | | Terminate loop at end of environment.
* Minor.Alexei Podtelezhnikov2019-06-041-1/+0
|
* Solidify VC2005 builds.Alexei Podtelezhnikov2019-05-313-3/+9
| | | | | | * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly declare `_BitScanReverse' intrinsic. * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
* [sfnt] Separate WOFF sources and headers.Nikhil Ramakrishnan2019-05-3011-473/+617
| | | | | | | | | | | | | | | | | | | | | | Move WOFF sources and headers to separate files. * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: New files. * include/freetype/internal/fttrace.h: Register `sfwoff.c'. * include/freetype/internal/internal.h: Define FT_INTERNAL_WOFF_TYPES_H. * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H. * include/freetype/internal/tttypes.h: Move out WOFF structures. * src/sfnt/rules.mk: Add `sfwoff.c'. * src/sfnt/sfnt.c: Include `sfwoff.c'. * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
* [base] Fix `make multi'.Werner Lemberg2019-05-302-1/+10
| | | | | | Reported by Nikhil. * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H.
* [truetype] Fix copy-and-paste error (#56409).Ben Wagner2019-05-292-4/+13
| | | | | * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices into `unrounded' array for phantom points.
* [truetype] Fix 32bit builds (#56404).Werner Lemberg2019-05-292-5/+14
| | | | | | | Patch suggested by Ben Wagner <bungeman@google.com>. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove harmful cast to unsigned type.
* Silence gcc 7's fall-through warnings in `switch' blocks.Werner Lemberg2019-05-296-9/+56
| | | | | | | | | | Instead of an intentionally missing `break' statement there must be a comment line containing `fall through' (and nothing else) right before the next `case' statement. See https://stackoverflow.com/questions/45129741/gcc-7-wimplicit-fallthrough-warnings-and-portable-way-to-clear-them
* * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.Ben Wagner2019-05-262-5/+6
|
* * src/sfnt/sfobjs.h: Minor.Nikhil Ramakrishnan2019-05-251-1/+1
|
* [truetype] Draw glyphs without deltas in variation font (#56374).Werner Lemberg2019-05-232-4/+15
| | | | | * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill `unrounded' array.
* src/truetype/ttinterp.c: Give order of operations for some instructions.Werner Lemberg2019-05-211-7/+26
|
* * src/truetype/ttinterp.c (opcode_name): Improve mnemonics.Werner Lemberg2019-05-212-163/+199
|
* ttinterp.c: Improve documentation of engine compensation.Werner Lemberg2019-05-211-5/+11
|
* Rendering considerations.Alexei Podtelezhnikov2019-05-202-3/+20
|
* [truetype] Actually scale varied CVT values.Werner Lemberg2019-05-163-0/+40
| | | | | | | | | Up to now, only the unscaled CVT values were varied; in other words, the `CVAR' data was never used for bytecode hinting. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary function. (tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
* [truetype] Use 26.6 format for storing unscaled CVT values.Werner Lemberg2019-05-165-14/+40
| | | | | | | | | | | | | | | | | If `CVAR' data is applied to variation fonts, fractional values are possible. * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of `cvt' from `FT_Short' to `FT_Int32'. * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro. (tt_face_vary_cvt): Use it to update code to 26.6 format. * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6 format. * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6 format.
* * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.Werner Lemberg2019-05-162-1/+8
| | | | | This fixes linear advance width values for spacing glyphs. Bug introduced 2019-05-09.
* [truetype] Avoid code duplication.Werner Lemberg2019-05-163-17/+21
| | | | | | | * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this function. (tt_size_ready_bytecode): Updated. * src/truetype/ttgload.c (tt_loader_init): Updated.