Parth Wazurkar
59f6af025d
[gf] Changed to FT data types in structures.
...
* src/gf/gfdrivr.h: Changed data types in GF_FaceRec, Gf_GlyphRec and GF_BitmapRec to FT data types.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
56b81c93f0
[gf] * src/gf/gfdrivr.c: Added GF_Face_Init, GF_Face_Done and GF_Glyph_Load functions.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
f920b5f345
[gf] Removed VFlib specific code and refactored to FT.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
265cc448fd
[gf] Added GF_Size_Request and GF_Size_Select functions.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
577efd8f17
[gf] Minor changes to Makefiles to accomodate GF Driver.
...
* modules.cfg: Added gf font driver module.
* src/gf/module.mk: Minor changes.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
48e21b7681
[gf] * src/gf/gf.c: Added source files for single build
2018-07-03 01:57:09 +05:30
Parth Wazurkar
846f20ac9d
[gf] Removed indentation errors.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
ba5757b415
[gf] Added Makefiles.
...
-Initialised module.mk and rules.mk.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
126c1e58e9
[gf] Initialised internal utility functions specific to GF format.
...
* src/gf/gf.h Added some required definitions.
* src/gf/gflib.c Added gf_font_load, gf_read_glyph, gf_font_done functions.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
9de5de08ab
[gf] *src/gf/gfdrivr.h Defined GF_FaceRec and other format specific structures.
...
- Defined GF_FaceRec.
- Defined GF_BitmapRec and GF_Glyph structures to properly distinguish format specific values.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
d40152c275
[gf] *src/gf/gfdrivr.c defined gf_cmap_class functions
...
- Defined structure GF_CMapRec for gf font format.
- Implemented gf_cmap_init, gf_cmap_done, gf_cmap_char_index, gf_cmap_char_next.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
af1a80cdd3
[gf] Added gf.c
2018-07-03 01:57:09 +05:30
Parth Wazurkar
43b840d6c2
[gf] Initialised gf driver files
...
gf driver files are initialised. Macros required for gf font files are determined in gf.h file.
2018-07-03 01:57:09 +05:30
Parth Wazurkar
dfe1bdc246
*src added gf driver repository
...
This repository contains the driver for gf font format.
2018-07-03 01:57:09 +05:30
Werner Lemberg
396051daee
s/xxx specific foo/xxx-specific foo/.
2018-07-02 15:52:36 +02:00
Werner Lemberg
7edc937fe6
s/palette_types/palette_flags/.
...
Suggested by Behdad.
2018-07-02 11:50:04 +02:00
Werner Lemberg
4e3b2473d8
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.
2018-07-02 11:41:44 +02:00
Werner Lemberg
f6ccb524af
* src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
...
Reported by Behdad.
2018-07-01 12:31:57 +02:00
Alexei Podtelezhnikov
1fc776b5f1
* src/base/fttrigon.c (FT_Tan): Improve accuracy.
...
(FT_Vector_Rotate): Simplify.
2018-06-28 21:42:26 -04:00
Alexei Podtelezhnikov
4f11209f5c
* src/base/ftobjs.c (FT_Set_Charmap): Robustify.
2018-06-28 21:31:35 -04:00
Werner Lemberg
207ca38fb5
[truetype] Fix memory leak.
...
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
Fix typo in `goto' destination.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
2018-06-25 18:50:00 +02:00
Werner Lemberg
589d1f0899
* src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
2018-06-25 18:38:04 +02:00
Werner Lemberg
a632fb547e
[truetype] Increase precision while applying VF deltas.
...
It turned out that we incorrectly round CVT and glyph point deltas
before accumulation, leading to severe positioning errors if there
are many delta values to sum up.
Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
by Behdad.
* src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
16.16 format.
(tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
format array, and add the accumulated values to the CVT at the end
of the function.
(TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
`points_out' in 16.16 format.
Collect deltas in `point_deltas_x' and `point_deltas_y', which are
16.16 format arrays, and add the accumulated values to the glyph
coordinates at the end of the function.
2018-06-24 15:22:10 +02:00
Werner Lemberg
cc3333902b
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'.
2018-06-24 06:26:09 +02:00
Werner Lemberg
d7393e22ee
Fix typo.
...
Reported by Behdad.
* src/base/ftcolor.c (FT_Palette_Data_Get)
[!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
2018-06-23 17:25:58 +02:00
Werner Lemberg
9027233f75
s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
...
* include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
src/sfnt/ttcolr.c: Do it.
2018-06-21 00:21:09 +02:00
Werner Lemberg
a6b77ba2b3
[sfnt] Fix CPAL heap buffer overflow.
...
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
* src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
offsets.
2018-06-19 20:09:31 +02:00
Werner Lemberg
7915fd51f1
Doh. Don't use CPAL or COLR data if tables are missing.
...
Reported by Alexei.
* src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
`colr' is NULL.
* src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
`cpal' is NULL.
2018-06-19 07:15:21 +02:00
Werner Lemberg
a56e4bf7a2
Oops!
2018-06-18 23:18:07 +02:00
Nikhil Ramakrishnan
779c8c4050
Some more minor doc fixes.
2018-06-18 15:17:13 +05:30
Werner Lemberg
95f7341d81
More minor doc fixes.
2018-06-18 11:10:14 +02:00
Werner Lemberg
ce8517b474
Minor documentation fixes.
2018-06-18 10:22:42 +02:00
Werner Lemberg
877d80944b
Introduce `@example:' subsections.
2018-06-18 10:08:17 +02:00
Werner Lemberg
fc40469a6f
Add example for `FT_Get_Color_Glyph_Layer'.
2018-06-18 09:23:18 +02:00
Alexei Podtelezhnikov
b1a3c59f8d
[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.
2018-06-17 22:33:29 -04:00
Nikhil Ramakrishnan
e13599a036
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.
2018-06-18 03:40:29 +05:30
Werner Lemberg
d573a46f77
Typo.
2018-06-17 23:23:36 +02:00
Armin Hasitzka
0f6be06444
[bdf] Fix underflow of an unsigned value.
...
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.
2018-06-17 20:27:42 +02:00
Werner Lemberg
19d8687f0b
Fix documentation indentation; s/@const/@enum/; harmonize doc keywords.
2018-06-17 11:22:37 +02:00
Werner Lemberg
da84691914
[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.
2018-06-17 09:30:05 +02:00
Werner Lemberg
e361cc6a75
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.
2018-06-17 09:13:37 +02:00
Werner Lemberg
9960e7beab
[sfnt] Fix color glyph layer loading.
...
* 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.
2018-06-16 22:16:03 +02:00
Werner Lemberg
1079063701
[sfnt] Fix color palette loading.
...
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.
2018-06-16 21:45:13 +02:00
Werner Lemberg
8f403ab8a8
Minor formatting.
2018-06-16 21:30:24 +02:00
Nikhil Ramakrishnan
a150b5ab53
Minor formatting.
2018-06-16 15:53:15 +05:30
Werner Lemberg
9d8e6c2980
* src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
2018-06-16 10:11:58 +02:00
Werner Lemberg
68bc56f864
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.
2018-06-16 09:39:29 +02:00
Werner Lemberg
9b31c44620
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.
2018-06-14 21:30:43 +02:00
Werner Lemberg
f9d05eb326
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.
2018-06-14 21:17:17 +02:00
Werner Lemberg
33ac83e376
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.
2018-06-14 21:00:23 +02:00