Commit Graph

6424 Commits

Author SHA1 Message Date
Parth Wazurkar 9e1d408e7e [tfm] Fix typo. 2018-08-15 11:40:56 +05:30
Parth Wazurkar aa60927a65 [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:04:03 +05:30
Parth Wazurkar de38489910 [pk] Resolve failing of `PK_CMap'.
* src/pk/pkdrivr.c(pk_cmap_char_{index, next}): Use `linear search'
instead of `binary search' in the encoding table as it will always
be unsorted.

* src/pk/pklib.c: Resolve issues occurred in the previous commit
which caused errors in glyph loading on `ft2-demos'.
2018-08-15 02:03:52 +05:30
Parth Wazurkar e3bdbb3268 [pk] Fixes.
* src/pk/pkdrivr.c(PK_Glyph_Load):
  - Remove unnecessary test for code_{min, max} values.
  - Use pointer to get metric values.

* src/pk/pklib.c(pk_load_font):
  - Improve tracing.
  - Remove unnecessary variables and parameters.
2018-08-13 10:17:40 +05:30
Parth Wazurkar ae5ef67e70 [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:36:23 +05:30
Parth Wazurkar 9f4eef0a67 [pk] Change `cmap' encoding scheme.
* src/pk/pkdrivr.c(PK_Face_Init):
  - Change `pk_cmap_class' functions to use new encoding
    scheme.
  - Set charmap to `0: synthetic, platform 0, encoding  0
    language 0' values.
2018-08-12 23:19:27 +05:30
Parth Wazurkar 13442d8954 [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 23:19:15 +05:30
Parth Wazurkar efe6142469 [gf] Important Fixes.
* As suggested here:

    http://lists.gnu.org/archive/html/freetype-devel/2018-08/msg00030.html
2018-08-12 15:56:30 +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 32028ffb55 [pk] Fix oversight.
* src/pk/pkdrivr.c(TFM_Read_Metrics): Fix oversight, to
resolve the memory leakage errors which occured while
attaching a `tfm' file.
2018-08-10 18:58:41 +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 b583b42c85 [tfm] Modify module functions as per `tftopl'.
* src/tfm/tfmobjs.c(tfm_parse_metrics):
  - Modify the metric extraction functions.
  - Add checking for `tfm' file so that an error will be
    returned if the font file is found *malformed*.
2018-08-08 10:17:06 +05:30
Parth Wazurkar 903a066214 [tfm] Modify `tfm_interface' definition.
* src/tfm/tfmmod.c: Add `TFM_Parser_FuncsRec' implementation
in `tfm_interface'.
2018-08-08 09:54:58 +05:30
Parth Wazurkar 8d32347f78 [tfm] Modify `TFM_ServiceRec' and `TFM_FontInfoRec' definitions.
* include/freetype/internal/tfm.h(TFM_FontInfoRec): Change data types
to accomodate changes.

* include/freetype/internal/tfm.h(TFM_ServiceRec): Create `TFM_Parse_FuncsRec'
to hold the `tfm' module functions.
2018-08-08 09:41:52 +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 a6bb748265 [gf, pk] Change some data types to `signed' type.
* src/gf/gfdrivr.h(GF_GlyphRec): Do it.
* src/pk/pkdrivr.h(PK_GlyphRec): Ditto.
2018-08-08 09:21:38 +05:30
Parth Wazurkar 859d6c6dc3 [pk] Modify `pk' files' header. 2018-08-04 16:22:47 +05:30
Parth Wazurkar fbaaeb812b [pk] Cleanup commit.
* Remove all the unnecessary typedefs and comments.
* Rename `pk' files' headers.
2018-08-04 13:48:59 +05:30
Parth Wazurkar 5e0acc45bf [pk] Fix metric extraction functions.
* src/pk/pklib.c(pk_load_font): Change `READ_UINT4' function
to `READ_INT4' to *correctly* extract information in font
file's header.

* Now pk driver displays glyphs in ftview.
2018-08-02 01:04:26 +05:30
Parth Wazurkar 383752cd98 [tfm] Fixes. 2018-08-02 00:55:08 +05:30
Parth Wazurkar 3d5f300f0c [pk] Improve error handling.
* src/pk/pklib.c(pk_load_font): Do it.
2018-08-01 00:28:10 +05:30
Parth Wazurkar 1931328a34 [pk] Define `attach_file' function in `pk_driver_class'.
* src/pk/pkdrivr.c: Define `attach_file' function, `TFM_Read_Metrics'
in `pk_driver_class' to extract font metric information from `tfm'
file.

* src/pk/pkdrivr.c(PK_Face_Init): Initialise `TFM_Service' by calling
`FT_Get_Module_Interface'.
2018-08-01 00:25:34 +05:30
Parth Wazurkar 883e6af448 [pk] Add `tfm' element in `PK_FaceRec'.
* src/pk/pkdrivr.h: Add `tfm' element in the `PK_FaceRec'
structure to accomodate the tfm metric values.
2018-08-01 00:04:25 +05:30
Parth Wazurkar 3511c3c3c3 [gf, pk] Minor Fixes for some compilation errors. 2018-07-31 01:28:02 +05:30
Parth Wazurkar aa77f5af45 [pk] Remove indentation errors. 2018-07-31 00:03:10 +05:30
Parth Wazurkar f909b86c84 [pk] Add pk services. 2018-07-31 00:00:28 +05:30
Parth Wazurkar e4ec41fc02 [pk] Improve error checking in font file.
* src/pk/pklib.c (pk_load_font): Add check for
`PK_ID' and `PK_PRE' command in the font file.
2018-07-30 23:57:57 +05:30
Parth Wazurkar ab75cfedd0 [pk] Fixes. 2018-07-30 23:57:00 +05:30
Parth Wazurkar 460fe90b59 [pk] Define `pk_driver_class' functions.
* src/pk/pkdrivr.c: Define all the `pk_driver_class'
functions.
2018-07-30 23:53:37 +05:30
Parth Wazurkar 20230216aa [pk] Define `pk_cmap_class' functions. 2018-07-30 23:53:23 +05:30
Parth Wazurkar 0d109109df [pk] Define `pk' font loader functions.
* src/pk/pk.h: Add `pk' format specific opcodes.

* src/pk/pklib.c: Define `pk_font_load', `pk_free_font'
and other format specific utility functions.
2018-07-30 23:53:07 +05:30
Parth Wazurkar 24f39cba3d [pk] Define PK_FaceRec and other format specific structures.
* src/pk/pkdrivr.h: Define PK_Bitmap and PK_Glyph
structures to hold `pk' format specific values and
define PK_FaceRec to accomodate them.
2018-07-30 23:52:53 +05:30
Parth Wazurkar 1316b813fd [pk] Initialise pk driver files and Makefiles. 2018-07-30 23:52:39 +05:30
Parth Wazurkar 3959431aab [pk,vf] Initialise pk and vf driver repositories. 2018-07-30 23:52:23 +05:30
Parth Wazurkar d3a78786b5 [tfm] Fixes. 2018-07-30 23:47:51 +05:30
Parth Wazurkar 8302c96c83 [gf] Improve data types of some variables. 2018-07-30 23:47:51 +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 7939499452 [tfm] Define the `tfm_interface' functions.
* src/tfm/tfmobjs.c: Do it.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 4b9c1b2b1b [tfm] Initialise makefiles. 2018-07-30 23:47:51 +05:30
Parth Wazurkar 2d693b5a2c [tfm] Define `tfm_module_class' and `tfm_interface'.
* src/tfm/tfmmod.c: Do it.
2018-07-30 23:47:51 +05:30
Parth Wazurkar 146b7febbd [tfm] Add new `tfm' auxiliary module.
* include/freetype/internal/tfm.h:
  - Add TFM_FontInfoRec to accomodate TFM metric data.
  - Define TFM_ParserRec to parse the metric data from
    input `tfm' file.
  - Define TFM_ServiceRec to provide functions to do it.
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 0f41489a09 [gf] Add `tfm' element in `GF_FaceRec'.
* src/gf/gfdrivr.h: Add `tfm' element in the `GF_FaceRec'
structure to accomodate the tfm metric values.
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 fcef64dde7 [gf] Register gf services. 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