Commit Graph

33 Commits

Author SHA1 Message Date
Parth Wazurkar 1a9a851672 [gf] Some more fixes. 2018-09-08 21:27:32 +05:30
Parth Wazurkar 38f652dbd6 [gf] Formatting fixes. 2018-09-08 21:15:45 +05:30
Parth Wazurkar 08a8e43fb4 [gf] Resolve failing of `GF_CMap'.
* src/gf/gfdrivr.c(gf_cmap_char_{index, next}): Use `linear search'
instead of `binary search' in the encoding table as it will always
be unsorted.
2018-08-15 02:01:12 +05:30
Parth Wazurkar df8cb68d11 [gf] Fixes in `GF_Glyph_Load' function.
* src/gf/gfdrivr.c(GF_Glyph_Load):
  - Use pointer to extract metric values from `bm_table'.
  - Remove unnecessary test for `glyph_index'.
2018-08-12 23:30:04 +05:30
Parth Wazurkar 2097c52603 [gf] Fix invalid free operation.
* src/gf/gfdrivr.c(GF_Face_Done): Fix the free operation
which caused seg fault after `gf driver' returned `not a gf file'.
2018-08-12 22:46:38 +05:30
Parth Wazurkar 9c3ffded1b [gf] Important Fixes.
* As suggested here:

    http://lists.gnu.org/archive/html/freetype-devel/2018-08/msg00030.html
2018-08-12 15:58:49 +05:30
Parth Wazurkar 743b415ca9 [gf] Change `cmap' encoding scheme.
* src/gf/gfdrivr.c(GF_Face_Init):
  - Change `gf_cmap_class' functions to use new encoding
    scheme.
  - Set charmap to `0: synthetic, platform 0, encoding  0
    language 0' values.

* src/gf/gflib.c(gf_set_encodings, gf_load_font): Modify
  to set encoding so as to load glyphs in the order they appear
  in the font file.
2018-08-12 11:36:33 +05:30
Parth Wazurkar eba29d801e [gf] Fixes. 2018-08-11 02:15:59 +05:30
Parth Wazurkar 540b1aca44 [gf] Fix typo. 2018-08-10 18:18:07 +05:30
Parth Wazurkar fd2b16f01f [tfm] Resolve memory leak errors.
* src/tfm/tfmobjs.c(tfm_close): Remove double freeing
of `stream' object.

* src/gf/gfdrivr.c(TFM_Read_Metrics): Fix oversight
errors.
2018-08-10 18:11:10 +05:30
Parth Wazurkar b76b34ef5d [gf, pk] Modify `attach_file' function.
* src/gf/gfdrivr.c(TFM_Read_Metrics): Modify to accomodate changes
in the `tfm' module.

* src/pk/pkdrivr.c(TFM_Read_Metrics): Ditto.
2018-08-08 10:34:38 +05:30
Parth Wazurkar 2f59a4c8a9 [gf, pk] Resolve *glyph jumping* error.
* src/gf/gfdrivr.c(GF_Load_Glyph): Modify glyph metric values
to resolve the *glyph jumping* error and make the glyphs to
properly sit on baseline.

* src/pk/pkdrivr.c(PK_Glyph_Load): Ditto.
2018-08-08 09:22:04 +05:30
Parth Wazurkar 73338b9c10 [gf] Initialise `TFM Service' and add tracing.
* src/gf/gfdrivr.c (GF_Face_Init): Call `FT_Get_Module_Interface'
to initialise `tfm' module.

* src/gf/gfdrivr.c (TFM_Read_Metrics): Add tracing messages.
2018-07-30 23:47:51 +05:30
Parth Wazurkar b36649fd86 [gf] Define `attach_file' function in `gf_driver_class'.
* src/gf/gfdrivr.c: Define `attach_file' function, `TFM_Read_Metrics'
in `gf_driver_class' to extract font metric information from `tfm'
file using a new `TFM' auxiliary module.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 5b32e1a9d9 [gf] Cleanup commit.
* Rename `gf' files' header.
* Remove all the unnecessary typedefs and
switch to FT specific ones.
* Remove unnecessary comments.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 9da5d09e26 [gf] Create gf services.
* src/gf/gfdrivr.c: Define gf services descriptor
table and `gf_driver_requestor' function.
2018-07-30 23:47:51 +05:30
Parth Wazurkar d9d157e556 [gf] Fixes. 2018-07-30 23:47:51 +05:30
Parth Wazurkar d9cdc15d80 [gf] Minor Fixes. 2018-07-30 23:47:51 +05:30
Parth Wazurkar 256c625c6e [gf] Modify Glyph slot metric values. 2018-07-30 23:47:51 +05:30
Parth Wazurkar 10775a138e [gf] Fix memory leak errors.
* src/gf/gfdrivr.c: Improve GF_Face_Done and
GF_Face_Init functions to fix memory leak errors.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 2c3b6390a5 [gf] Fix gf_free_font function errors.
* src/gf/gflib.c (gf_free_font): Fix errors in gf_free_font
function.

* src/gf/gfdrir.c (GF_Glyph_Load): Improve slot metric
values.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 9efa36c8b0 [gf] Use Unicode charmap and modify slot metric values.
* src/gf/gfdrivr.c(GF_Face_Init): Use Unicode charmap and
modify FT_Bitmap_Size values.

* src/gf/gfdrivr.c(GF_Glyph_Load): Modify FT_GlyphSlot and
FT_Bitmap values.
2018-07-30 23:47:51 +05:30
Parth Wazurkar d0c08730c7 [gf] Add tracing and error handling.
* src/gf/gfdrivr.c, src/gf/gflib.c: Add FT_TRACEX and
FT_ERROR messages for debugging.

* src/gf/module.mk: Fixes to make output of first `make'
call prettier.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 34d588002c [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-30 23:47:51 +05:30
Parth Wazurkar 2439cfb7e9 [gf] Minor fixes. 2018-07-30 23:47:51 +05:30
Parth Wazurkar c80039d715 [gf] Define FT driver variables with gftype values.
* src/gf/gfdrivr.c : Define the FT driver variables
in all the functions with gftype values from the font file.
2018-07-30 23:47:51 +05:30
Parth Wazurkar ea69f5127c [gf] Convert block comments to `light' style in gf files. 2018-07-30 23:47:50 +05:30
Parth Wazurkar a11d8d05d5 [gf] * src/gf/gfdrivr.c: Added GF_Face_Init, GF_Face_Done and GF_Glyph_Load functions. 2018-07-30 23:47:50 +05:30
Parth Wazurkar 8ce66d72c8 [gf] Added GF_Size_Request and GF_Size_Select functions. 2018-07-30 23:47:50 +05:30
Parth Wazurkar 161035d66b [gf] Removed indentation errors. 2018-07-30 23:47:50 +05:30
Parth Wazurkar 3e006d31fd [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-30 23:47:50 +05:30
Parth Wazurkar b1aef3269f [gf] Added gf.c 2018-07-30 23:47:50 +05:30
Parth Wazurkar edfccbd6e3 [gf] Initialised gf driver files
gf driver files are initialised. Macros required for gf font files are determined in gf.h file.
2018-07-30 23:47:50 +05:30