include


Log

Author Commit Date CI Message
Alexei Podtelezhnikov d71f2bc1 2018-10-26T22:52:25 Revert "Align FreeType with standard C memory management." This reverts commit 877aa1b2cc662978aae61ed4d5c6ea8ba56b2fe7.
Werner Lemberg 42885493 2018-10-10T12:21:10 Minor.
Alexei Podtelezhnikov 877aa1b2 2018-09-27T21:17:36 Align FreeType with standard C memory management. * include/freetype/ftsystem.h: Include FT_TYPES_H. (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments. * src/raster/ftmisc.h: Ditto. * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c, * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc): Use size_t for the size arguments. * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use FT_Offset, aka size_t, for the size arguments.
Werner Lemberg a9af6914 2018-09-25T09:10:09 Fix handing of `FT_Bool'. Before this commit we had code like (FT_Bool)( globals->glyph_styles[gindex] & 0x8000) Since `FT_Bool' is defined to be an `unsigned char', the code evaluated to something like (unsigned char)( 0x8532 & 0x8000) which in turn expanded to (unsigned char)( 0x8000) and finally yielded 0x00 – i.e., false – not as expected. Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>. * include/freetype/fttypes.h (FT_BOOL): Add a comparison against zero so that we always have a Boolean expression. */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where possible.
Werner Lemberg abd997aa 2018-09-21T12:50:32 Improve documentation of `FT_LOAD_NO_RECURSE'.
Werner Lemberg 8e950680 2018-09-20T06:26:34 [base] Remove unused function `FT_GlyphLoader_CopyPoints'. * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c (FT_GlyphLoader_CopyPoints): Do it.
Werner Lemberg b8dd404d 2018-09-16T07:22:23 freetype.h: Add warning w.r.t. B/W hinting and rendering (#54589).
Werner Lemberg 97c7944f 2018-09-05T11:45:05 Synchronize `ftconfig' files.
Werner Lemberg c485bece 2018-09-04T21:05:06 Typo (#54618).
Werner Lemberg 9789c75b 2018-09-04T10:37:44 More '...' vs. `...` fixes in API documentation.
Werner Lemberg 01a5d326 2018-09-04T08:00:58 Make `/****...' comments in public headers uniformly end on column 77.
Werner Lemberg 10617482 2018-09-03T10:37:57 include/freettype/config:*.*: Convert comments to Markdown syntax. Also some minor documentation fixes.
Werner Lemberg 76a52465 2018-09-03T09:08:47 */*: s/PSNames/psnames/. Only tracing messages are affected.
Werner Lemberg 9be656bb 2018-09-01T11:01:52 Remove `FT_Outline_{New,Done}_Internal'. These public API functions(!) were always undocumented and have escaped all clean-up efforts until now. * include/freetype/ftoutln.h (FT_Outline_New_Internal, FT_Outline_Done_Internal): Removed. * src/base/ftoutln.h (FT_Outline_New_Internal, FT_Outline_Done_Internal): Merge into... (FT_Outline_New, FT_Outline_Done): ... these functions. * docs/README: Updated.
Armin Hasitzka 4b49a807 2018-08-31T20:26:46 [errors] Refine the macro logic surrounding `FT_Error_String'. * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS, FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after checking it and introduce a new macro that takes proper care of multiple-inclusion protection.
Werner Lemberg 83525bdd 2018-08-31T07:37:15 Minor comments.
Werner Lemberg 423fce2e 2018-08-31T06:59:44 Add link to OpenType's composite glyph description.
Alexei Podtelezhnikov 1dacbd89 2018-08-30T23:28:30 Consolidate bitmap presetting and size assessment. * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap): Change return type. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap size assessment. * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the rendering of enourmous or far-fetched outlines. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
Armin Hasitzka 35efb103 2018-08-30T14:30:46 [errors] Introduce a macro to control `FT_Error_String'. * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS), include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS): New macro.
Armin Hasitzka d20dc392 2018-08-30T14:09:04 [errors] Introduce `FT_Error_String'. * include/freetype/fterrors.h (FT_Error_String), src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'. * src/base/ftbase.c, src/base/Jamfile (_source), src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic. * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
Werner Lemberg 19be8620 2018-08-29T18:15:03 Doc fix.
Werner Lemberg 14dff08f 2018-08-29T06:56:21 ftoption.h: s/precendence/precedence/ in documentation (#54586).
Werner Lemberg 2c8e6279 2018-08-28T08:02:13 Minor doc fix.
Werner Lemberg b287c80b 2018-08-26T06:39:43 Various minor clean-ups. * src/base/ftapi.c: Remove. Unused. * src/base/Jamfile (_sources): Updated. * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant code.
Nikhil Ramakrishnan ae5d1a4c 2018-08-24T22:22:30 * include/*.*: Convert comments to markdown. This commit was created by applying scripts `markify.py' and `markdown-format.bash' to all C header files, followed by minor clean-up. No change in functionality, of course. Scripts used: https://github.com/nikramakrishnan/freetype-docs.git: Commit dfce31e. http://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00013.html: With patches applied.
Werner Lemberg 77f0814a 2018-08-23T17:53:54 Add macros for handling over-/underflowing `FT_Int64' values. * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64, MUL_INT64, DIV_INT64) [FT_LONG64]: New macros. * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use `SUB_INT64' and `MUL_INT64'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
Werner Lemberg c90cc644 2018-08-23T13:13:20 ftbitmap.h: Improve documentation.
Werner Lemberg a3e842f9 2018-08-22T09:55:38 Minor formatting and documentation fixes.
Werner Lemberg 4873eb1d 2018-08-19T07:27:21 Update `CHANGES' file.
Werner Lemberg a0dd16fb 2018-08-15T18:13:17 Don't use `trace_' prefix for FT_COMPONENT arguments. * include/freetype/internal/ftdebug.h (FT_TRACE_COMP, FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix. (FT_TRACE): Use `FT_TRACE_COMP'. */* (FT_COMPONENT): Updated.
Armin Hasitzka 37c7b817 2018-08-12T01:42:00 Remove deprecated constant in documentation. * include/freetype/ftdriver.h: Suggest using `FT_HINTING_ADOBE' since `FT_CFF_HINTING_ADOBE' is deprecated.
Werner Lemberg 5b904409 2018-08-11T06:41:35 * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
Nikhil Ramakrishnan 1a21ca7b 2018-08-10T19:31:55 Minor formatting.
Werner Lemberg c9bbc241 2018-08-08T18:12:31 Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'. It sometimes makes sense to suppress tracing informations, for example, if it outputs identical messages again and again. * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a pointer. (FT_Trace_Disable, FT_Trace_Enable): New declarations. * src/base/ftdebug.c (ft_trace_levels): Rename to... (ft_trace_levels_enabled): ... this. (ft_trace_levels_disabled): New array. (ft_trace_levels): New pointer. (FT_Trace_Disable, FT_Trace_Enable): Implement. (ft_debug_init): Updated.
Werner Lemberg 7ec9598f 2018-08-06T17:35:14 More comment formattings. This helps in the forthcoming transition to markdown syntax.
Werner Lemberg b09e7735 2018-08-06T11:02:51 * devel/ftoption.h: Synchronize with main `ftoption.h'.
Werner Lemberg 86e73853 2018-08-06T10:24:08 Minor comment formatting.
Werner Lemberg 85e8bea4 2018-07-31T10:42:21 Minor documentation improvement.
Werner Lemberg 6e6acdcb 2018-07-26T07:22:18 Document FT_Module_Class's `module_interface' field.
Alexei Podtelezhnikov 4b97ab98 2018-07-24T23:01:34 [build] Fortify dllexport/dllimport attributes (#53969,#54330). We no longer use predefined _DLL, which can be defined for static builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead, following libtool convention. * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj: Define DLL_EXPORT manually. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h, builds/windows/vc2010/index.html, src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
Werner Lemberg 5434faad 2018-07-22T07:34:03 Fix links. Reported by Ankit and Nikhil.
Werner Lemberg 93955585 2018-07-21T23:46:19 Minor comment improvement.
Werner Lemberg a2370f21 2018-07-21T07:38:13 Improve stream extraction macro documentation.
Werner Lemberg 8f09eb5c 2018-07-17T21:45:24 Allow FT_ENCODING_NONE for `FT_Select_Charmap'. This is a valid encoding tag for BDF, PCF, and Windows FNT, and there is no reason to disallow it for these formats. * src/base/ftobjs.c (FT_Select_Charmap): Implement it.
Armin Hasitzka fda356b7 2018-07-16T18:45:23 * include/freetype/internal/ftcalc.h: Add macros for handling harmless over-/underflowing `FT_Int' values. * src/sfnt/sfdriver.c (fixed2float): Fix negation of `(int)(-2147483648)'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
Werner Lemberg 396051da 2018-07-02T15:52:36 s/xxx specific foo/xxx-specific foo/.
Werner Lemberg 7edc937f 2018-07-02T11:50:04 s/palette_types/palette_flags/. Suggested by Behdad.
Werner Lemberg 4e3b2473 2018-07-02T11:41:44 Make `FT_Get_Color_Glyph_Layer' return FT_Bool. * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func), src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer): Updated.
Werner Lemberg cc333390 2018-06-24T06:22:48 New base function `FT_Matrix_Check' (#54019). * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly reject degenerate font matrices. * include/freetype/internal/ftcalc.h: Updated. * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix), src/type42/t42parse.c (t42_parse_font_matrix): Use `FT_Matrix_Check'.
Werner Lemberg 9027233f 2018-06-21T00:21:09 s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/. * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h, src/sfnt/ttcolr.c: Do it.
Werner Lemberg a56e4bf7 2018-06-18T23:18:07 Oops!
Nikhil Ramakrishnan 779c8c40 2018-06-18T15:17:13 Some more minor doc fixes.
Werner Lemberg 95f7341d 2018-06-18T11:10:14 More minor doc fixes.
Werner Lemberg ce8517b4 2018-06-18T10:22:42 Minor documentation fixes.
Werner Lemberg 877d8094 2018-06-18T10:08:17 Introduce `@example:' subsections.
Werner Lemberg fc40469a 2018-06-18T09:23:18 Add example for `FT_Get_Color_Glyph_Layer'.
Alexei Podtelezhnikov b1a3c59f 2018-06-17T22:33:29 [base] Introduce `FT_New_Glyph'. This function facilitates access to full capabilities of FreeType rendering engine for custom glyphs. This can be quite useful for consistent rendering of mathematical and chemical formulas, e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=757078 * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New function.
Nikhil Ramakrishnan e13599a0 2018-06-18T00:38:36 Change documentation markup tags to lowercase. Implemented as per discussion in http://lists.nongnu.org/archive/html/freetype-devel/2018-06/msg00073.html No change in functionality, of course.
Werner Lemberg 19d8687f 2018-06-17T11:22:37 Fix documentation indentation; s/@const/@enum/; harmonize doc keywords.
Werner Lemberg da846919 2018-06-17T09:30:05 [base] Add tracing for `FT_Bitmap_Blend'. * include/freetype/internal/fttrace.h (trace_bitmap): New enumeration. * src/base/ftbitmap.c (FT_COMPONENT): Define. (FT_Bitmap_Blend): Add `FT_TRACE5' calls.
Werner Lemberg e361cc6a 2018-06-17T09:13:37 s/trace_bitmap/trace_checksum/. * include/freetype/internal/fttrace.h: s/bitmap/checksum/. * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/. Adjust code.
Nikhil Ramakrishnan a150b5ab 2018-06-16T15:53:15 Minor formatting.
Werner Lemberg 68bc56f8 2018-06-16T09:39:29 Add `FT_Bitmap_Blend' API. Still missing: Support for negative bitmap pitch and subpixel offset of source bitmap. * include/freetype/ftbitmap.h, src/base/ftbitmap.c (FT_Bitmap_Blend): New function.
Werner Lemberg 9b31c446 2018-06-14T21:30:43 Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'. This avoids any additional allocation of COLR related structures in a glyph slot. * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec, FT_Get_GlyphLayers): Removed. * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed. (FT_Slot_InternalRec): Remove `color_layers'. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Removed. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove `load_colr_layer'. * src/base/ftobjs.c (ft_glyph_slot_done): Updated. (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'. (FT_Get_GlyphLayers): Removed. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed. * src/sfnt/ttcolr.h: Updated. * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
Werner Lemberg f9d05eb3 2018-06-14T21:02:49 Provide iterative API to access `COLR' data. This solution doesn't store any data in an `FT_GlyphSlot' object. * include/freetype/freetype.h (FT_LayerIterator): New structure. (FT_Get_Color_Glyph_Layer): New function. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New function type. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it. * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function. * src/sfnt/ttcolr.h: Updated. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
Werner Lemberg 33ac83e3 2018-06-14T21:00:23 Add glyph index and glyph load flags to glyph slot. * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused `reserved' field to `glyph_index'. * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add `load_flags' field. * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
Werner Lemberg a44e2087 2018-06-14T11:32:47 [sfnt] Move `CPAL' stuff into separate files. * src/sfnt/sfdriver.c: Include `ttcpal.h'. * src/sfnt/sfnt.c: Include `ttcpal.c'. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ... * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Updated. * include/freetype/internal/fttrace.h: Add support for `colr' and `cpal'. Sort entries.
Werner Lemberg 54b332aa 2018-06-13T08:46:27 [sfnt] Separate `CPAL' and `COLR' table handling. Later on we want to support the `SVG' table also, which needs `CPAL' (but not `COLR'). * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal' and `free_cpal' fields. (FT_DEFINE_SFNT_INTERFACE): Updated. * include/freetype/internal/tttypes.h (TT_FaceRec): Replace `colr_and_cpal' fields with `cpal' and `colr'. * src/sfnt/sfdriver.c (sfnt_interface): Updated. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated. * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field. (ColrCpal): Removed. (tt_face_load_colr): Split off CPAL handling into... (tt_face_load_cpal): ... this new function. (tt_face_free_colr): Split off CPAL handling into... (tt_face_free_cpal): ... this new function. (tt_face_load_colr_layers, tt_face_palette_set): Updated. * src/sfnt/ttcolr.h: Updated. * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
Werner Lemberg 45145d34 2018-06-12T06:02:59 Finish CPAL/COLR support (3/4). * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H. (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement functions.
Werner Lemberg b85d4e8f 2018-06-12T05:53:58 Finish CPAL/COLR support (2/4). * src/sfnt/ttcolr.c (tt_face_palette_set): New function. (tt_face_load_colr): Allocate `face->palette' and call `tt_face_palette_set'. Adjust return error code in case of error. * src/sfnt/ttcolr.h: Updated. * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New function type. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it. * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c (sfnt_done_face): Updated.
Werner Lemberg 7542f030 2018-06-11T12:46:56 Finish CPAL/COLR support (1/4). * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'.
Alexei Podtelezhnikov 04338a5e 2018-06-12T21:59:15 Doc fixes and improvements.
Werner Lemberg b18f5e7c 2018-06-11T09:02:06 Minor doc fixes.
Werner Lemberg 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.
Werner Lemberg c412de52 2018-06-09T23:56:21 [sfnt] Read `CPAL' version 1 tables. * include/freetype/internal.tttypes.h: Include FT_COLOR_H. (TT_FaceRec): Add `palette' field. * src/sfnt/ttcolr.c: Include FT_COLOR_H. (Cpal): Remove all data covered by the new `palette' field in `TT_FaceRec'. (tt_face_load_colr): Updated. Read `CPAL' version 1 data. (tt_face_load_colr_layers, tt_face_find_color): Updated. * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
Alexei Podtelezhnikov 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.
Werner Lemberg 44580515 2018-06-07T06:49:44 Minor.
Werner Lemberg f87ced9d 2018-06-06T17:49:17 ftcolor.h: Redesign API. While going to implement it I noticed that I need access to most of the `CPAL' elements; I thus plan to add a `cpal' field to `TT_FaceRec', which makes most of the previously suggested API functions obsolete because the fields will be directly accessable.
Werner Lemberg 7c7004d6 2018-06-06T17:37:51 New `ftcolor.h' draft.
Nikhil Ramakrishnan 78d85b9c 2018-06-04T18:42:29 Restore missing comment lines and other minor fixes
Sender Ghost cc626772 2018-06-04T10:49:23 Restore accidentally removed, commented-out configuration options.
Werner Lemberg f999375a 2018-06-03T22:00:42 [GSoC] include/*.*, devel/*.*: Convert block comments to `light' style. This second and final 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.
Werner Lemberg dc170dea 2018-06-03T21:23:04 Typos.
Alexei Podtelezhnikov 250b0c62 2018-05-30T23:29:41 Shorten LCD filtering docs.
Werner Lemberg db7c4060 2018-05-30T21:21:19 ftcolor.h: Improve API design, fix typos (#54011, #54014). * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with... (FT_Palette_Get_Name_IDs): ... this function. (FT_Palette_Get_Entry_Names): Replace with... (FT_Palette_Get_Entry_Name_IDs): ... this function s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
Werner Lemberg 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.
Alexei Podtelezhnikov 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.
Werner Lemberg 3fcb4cfa 2018-05-22T09:12:21 Oops!
Werner Lemberg 3360ca58 2018-05-22T09:06:24 [truetype] Reject elements of composites with invalid glyph indices. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413 * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
Werner Lemberg 93363cd7 2018-05-20T22:50:00 * include/freetype/ftcolor.h: New file. This is an interface to the `CPAL' OpenType table. No implementation yet.
Alexei Podtelezhnikov 2f218a4c 2018-05-18T08:57:30 * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'. Actually `_BitScanReverse' is available since VS2005.
Werner Lemberg 840b8443 2018-05-18T10:57:51 * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value. Older VC versions don't provide `_BitScanReverse'. We test for VC 2013. Reported by John Emmas <john@creativepost.co.uk>.
Werner Lemberg 3331b84f 2018-05-18T07:19:57 Minor comment fixes.
Werner Lemberg 2cac1c35 2018-05-17T19:40:44 s/inline/__inline/ for MSVC. Reported by John Emmas <john@creativepost.co.uk>. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
Werner Lemberg 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.
Werner Lemberg 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.
Werner Lemberg 78db8a25 2018-05-13T11:53:01 Typo.
Shao Yu Zhang 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.
Arkady Shapkin 84eebf48 2018-05-12T06:16:46 Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636). * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement it.
suzuki toshiya 2b3e0ef6 2018-05-04T12:55:48 Support symbol visibility features of Sun / Oracle C compilers. Reported by Kiyoshi Kanazawa: https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html Thanks to the suggestions by Alexei and Alan Coopersmith. * builds/unix/configure.raw: Check if "-xldscope=hidden" is accepted, and if so, it is added to CFLAGS. This is the option making Sun / Oracle C compilers hide the symbols from global scope. * include/freetype/config/ftconfig.h: Use "__global" prefix for FT_EXPORT() macro, if SunPro C is newer than Sun ONE Studio 8 (2003). * builds/unix/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto.