Commit Graph

6352 Commits

Author SHA1 Message Date
Parth Wazurkar 7635ca9624 [tfm] Fixes. 2018-07-17 21:01:53 +05:30
Parth Wazurkar a5e988fe32 [gf] Add support for parsing `xxx' and `yyy' commands.
* Now gf driver supports all the font files.
* Currently `xxx'and `yyy' commands if found after the
postamble are skipped over.
* Mechanism for extracting information from these commands
is to be added.
2018-07-12 20:13:22 +05:30
Parth Wazurkar 6cfd41681f [gf] Fixes.
* Make even with `parthw-cleaned' branch.
2018-07-12 17:00:18 +05:30
Parth Wazurkar f2120af34b [tfm] Add tfm_driver_class functions.
Note: Does not compile.
* src/tfm/tfmdrivr.c: Add TFM_Face_Done, TFM_Face_Init,
TFM_Glyph_Load, TFM_Size_Request and TFM_Size_Select
functions.
2018-07-12 16:50:07 +05:30
Parth Wazurkar 5b74836c7a [tfm] Fixes. 2018-07-10 16:36:30 +05:30
Parth Wazurkar 11f4cadddd [gf] Preliminary tracing and error handling support and minor fixes. 2018-07-04 15:33:57 +05:30
Parth Wazurkar 20c2358230 minor. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 472155eac2 [gf] Fixes. 2018-07-03 01:57:10 +05:30
Parth Wazurkar a57dda6564 [gf] Resolve compiler flag errors.
* src/gf/gflib.c: Remove all the unused variables,
add error checking for all the stream functions which
were raising compiler flag warnings.

* src/gf/gfdrivr.c: Remove unused variables.
2018-07-03 01:57:10 +05:30
Parth Wazurkar 7870984ea1 [tfm] Minor. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 3c555bf991 [tfm] Define TFM_FaceRec and other format specific structures.
* src/tfm/tfmdrivr.h: Define TFM_FaceRec also define
TFM_GlyphRec structure to properly distinguish format
specific values.
2018-07-03 01:57:10 +05:30
Parth Wazurkar a16b3b2199 [tfm] FT stream support for tfm driver.
* src/tfm/tfmlib.c : Convert all the file functions to
FT stream functions.
2018-07-03 01:57:10 +05:30
Parth Wazurkar 4c1f8627bf [tfm] Remove VFlib specific code and refactor to FT. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 67d3c53dcd [tfm] Archive code for other font metric formats.
* src/tfm/tfmlib.c: Archive code for Omega Font metric(OFM),
Japanese Font Metric(JFM), font formats.
2018-07-03 01:57:10 +05:30
Parth Wazurkar 39375424d9 [tfm] Define tfm_cmap_class functions.
* Define structure TFM_CMapRec for TeX tfm font format.
* src/tfm/tfmdrivr.c: Define tfm_cmap_init, tfm_cmap_done,
tfm_cmap_char_index, tfm_cmap_char_next.
2018-07-03 01:57:10 +05:30
Parth Wazurkar 90624af017 [gf] Add printf flags for debugging. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 86cc6cbd40 [gf] Changes. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 5585c5f365 [gf] Minor changes. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 0532670c02 [gf] Complete stream support and some minor changes for testing. 2018-07-03 01:57:10 +05:30
Parth Wazurkar 2bea8dbd49 Minor changes for testing. 2018-07-03 01:57:10 +05:30
Parth Wazurkar e69e7e492a [tfm] Add preliminary functions and structures.
* Added tfm specific functions and structures for the driver
(To be modified).
2018-07-03 01:57:10 +05:30
Parth Wazurkar e7c95039f5 [gf] COnverted file functions to FT stream functions.
* src/gf/gflib.c : Converted all the file functions like getc,
fseek,etc. to FT specific stream functions.
2018-07-03 01:57:09 +05:30
Parth Wazurkar 1338d517c4 [tfm] Initialised TFM driver files.
* src/tfm : Added all the driver source files and makefiles.
2018-07-03 01:57:09 +05:30
Parth Wazurkar 5147064e1b [gf] Temporary changes for compiling gf driver. 2018-07-03 01:57:09 +05:30
Parth Wazurkar 3ff144c5d9 [gf] Convert block comments to `light' style in gf files. 2018-07-03 01:57:09 +05:30
Parth Wazurkar 781a67cb82 [gf] Changes. 2018-07-03 01:57:09 +05:30
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