summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor documentation fixes.Werner Lemberg2018-06-181-16/+16
|
* Introduce `@example:' subsections.Werner Lemberg2018-06-185-91/+104
|
* Add example for `FT_Get_Color_Glyph_Layer'.Werner Lemberg2018-06-181-0/+37
|
* [base] Introduce `FT_New_Glyph'.Alexei Podtelezhnikov2018-06-173-23/+74
| | | | | | | | | | | 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.
* Change documentation markup tags to lowercase.Nikhil Ramakrishnan2018-06-1853-1651/+1651
| | | | | | | | Implemented as per discussion in http://lists.nongnu.org/archive/html/freetype-devel/2018-06/msg00073.html No change in functionality, of course.
* Typo.Werner Lemberg2018-06-171-1/+1
|
* [bdf] Fix underflow of an unsigned value.Armin Hasitzka2018-06-172-9/+14
| | | | | | | | | bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That caused an underflow of the unsigned value which results in undefined behaviour. * src/bdf/bdflib.c (src/bdf/bdflib.c): Bail out earlier than before if the `ENCODING' keyword cannot be found.
* Fix documentation indentation; s/@const/@enum/; harmonize doc keywords.Werner Lemberg2018-06-1722-978/+986
|
* [base] Add tracing for `FT_Bitmap_Blend'.Werner Lemberg2018-06-173-1/+71
| | | | | | | | * include/freetype/internal/fttrace.h (trace_bitmap): New enumeration. * src/base/ftbitmap.c (FT_COMPONENT): Define. (FT_Bitmap_Blend): Add `FT_TRACE5' calls.
* s/trace_bitmap/trace_checksum/.Werner Lemberg2018-06-173-10/+19
| | | | | | | * include/freetype/internal/fttrace.h: s/bitmap/checksum/. * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/. Adjust code.
* [sfnt] Fix color glyph layer loading.Werner Lemberg2018-06-162-4/+20
| | | | | | * src/sfnt/ttcolr.c (Colr): Add `table_size' field. (tt_face_load_colr): Set it. (tt_face_get_colr_layer): Check pointer limit for layer entries.
* [sfnt] Fix color palette loading.Werner Lemberg2018-06-162-4/+25
| | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933 * src/sfnt/ttcpal.c (Cpal): Add `table_size' field. (tt_face_load_cpal): Set it. (tt_face_palette_set): Check pointer limit for color entries.
* Minor formatting.Werner Lemberg2018-06-161-2/+2
|
* Minor formatting.Nikhil Ramakrishnan2018-06-162-2/+2
|
* * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.Werner Lemberg2018-06-162-2/+9
|
* Add `FT_Bitmap_Blend' API.Werner Lemberg2018-06-163-1/+364
| | | | | | | | 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.
* Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.Werner Lemberg2018-06-149-327/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Provide iterative API to access `COLR' data.Werner Lemberg2018-06-147-1/+246
| | | | | | | | | | | | | | | | | | 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.
* Add glyph index and glyph load flags to glyph slot.Werner Lemberg2018-06-144-1/+26
| | | | | | | | | | * 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.
* [sfnt] Move `CPAL' stuff into separate files.Werner Lemberg2018-06-1410-277/+399
| | | | | | | | | | | | | | | * 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.
* [sfnt] Separate `CPAL' and `COLR' table handling.Werner Lemberg2018-06-138-127/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [sfnt] Fix `sizeof' thinko.Werner Lemberg2018-06-132-5/+11
| | | | | * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't use `sizeof' for computing array limit.
* Finish CPAL/COLR support (4/4).Werner Lemberg2018-06-132-42/+44
| | | | | | | * src/sfnt/ttcolr.c (tt_face_find_color): Removed. (tt_face_colr_blend_layer): Use `face->palette' instead of calling `tt_face_find_color'. Use and set text foreground color.
* Finish CPAL/COLR support (3/4).Werner Lemberg2018-06-133-3/+102
| | | | | | * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H. (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement functions.
* Finish CPAL/COLR support (2/4).Werner Lemberg2018-06-136-2/+100
| | | | | | | | | | | | | | | | * 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.
* Finish CPAL/COLR support (1/4).Werner Lemberg2018-06-132-0/+28
| | | | | | * include/freetype/internal/tttypes.h (TT_FaceRec): New fields `palette_index', `palette', `have_foreground_color' and `foreground_color'.
* [sfnt] Minor.Werner Lemberg2018-06-132-6/+14
| | | | | | * src/sfnt/ttcolr.c (tt_face_load_colr_layers): s/palette_index/palette_entry_index/ for consistency. Adjust return error code in case of error.
* Doc fixes and improvements.Alexei Podtelezhnikov2018-06-123-16/+15
|
* [raster] Clean up.Alexei Podtelezhnikov2018-06-112-15/+16
| | | | | | * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision): Clean up after 5-level gray removal (8dc8635874). (Vertical_Sweep_Span): Be brief.
* Minor doc fixes.Werner Lemberg2018-06-111-6/+6
|
* [sfnt] Fix compiler warnings.Werner Lemberg2018-06-102-3/+10
| | | | | * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers, tt_face_colr_blend_layer): Add `NULL' initializers.
* s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.Werner Lemberg2018-06-106-43/+55
| | | | | * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h, src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
* CMakeLists: also accept IOS_PLATFORM=SIMULATOR64Nikolaus Waxweiler2018-06-102-2/+17
| | | | | | | | This might be needed to build FreeType for the iOS simulator. See https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed by Steve Robinson. * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
* Implement `FT_Palette_Get'.Werner Lemberg2018-06-105-0/+78
| | | | | | | * src/base/ftcolor.c: New file. * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC), src/base/ftbase.c: Add `ftcolor.c'.
* * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.Werner Lemberg2018-06-102-24/+23
|
* [raster] Deal with pitch sign earlier.Alexei Podtelezhnikov2018-06-092-26/+22
| | | | | | | | * src/raster/ftraster.c (black_TWorker): Remove unused `traceG', s/bTarget/bOrigin/. (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner. (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}): Updated accordingly.
* [sfnt] Read `CPAL' version 1 tables.Werner Lemberg2018-06-094-33/+131
| | | | | | | | | | | | | | * 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.
* [base] API for Harmony LCD rendering.Alexei Podtelezhnikov2018-06-075-35/+151
| | | | | | | | | | 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.
* Minor.Werner Lemberg2018-06-071-1/+5
|
* ftcolor.h: Redesign API.Werner Lemberg2018-06-062-1/+43
| | | | | | | 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.
* New `ftcolor.h' draft.Werner Lemberg2018-06-061-147/+53
|
* Minor.Werner Lemberg2018-06-061-3/+5
|
* [bdf, pcf] Removed deprecated FT_FACE_FLAG_FAST_GLYPHS flag.Parth Wazurkar2018-06-063-4/+10
| | | | | | * src/bdf/bdfdrivr.c (BDF_Face_Init): Removed deprecated FT_FACE_FLAG_FAST_GLYPHS flag. * src/pcf/pcfread.c (pcf_load_font): Removed deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
* [smooth, raster] Limit bitmap size (#54019).Werner Lemberg2018-06-063-10/+122
| | | | | | | | | | | * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add function. [!STANDALONE]: Include FT_OUTLINE_H. (ft_black_render): Compute CBox and reject glyphs larger than 0xFFFF x 0xFFFF. * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger than 0xFFFF x 0xFFFF.
* Restore missing comment lines and other minor fixesNikhil Ramakrishnan2018-06-049-19/+19
|
* Restore accidentally removed, commented-out configuration options.Sender Ghost2018-06-043-2/+23
|
* [GSoC] include/*.*, devel/*.*: Convert block comments to `light' style.Werner Lemberg2018-06-0394-14753/+15805
| | | | | | | | | | | 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.
* Typos.Werner Lemberg2018-06-031-2/+2
|
* * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.Armin Hasitzka2018-06-032-2/+4
|
* Minor formatting.Werner Lemberg2018-06-031-9/+9
|