From 3c555bf99125b426dc9e29a1984a1cb6134ea495 Mon Sep 17 00:00:00 2001 From: Parth Wazurkar Date: Fri, 29 Jun 2018 18:25:44 +0530 Subject: [PATCH] [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. --- src/tfm/tfmdrivr.h | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/src/tfm/tfmdrivr.h b/src/tfm/tfmdrivr.h index 459a5980b..1d3c60cab 100644 --- a/src/tfm/tfmdrivr.h +++ b/src/tfm/tfmdrivr.h @@ -27,30 +27,38 @@ FT_BEGIN_HEADER -typedef struct s_tfm *TFM; -struct s_tfm { - /* Font Info */ - int type; /* METRIC_TYPE_xxx */ - int type_aux; /* METRIC_TYPE_AUX_xxx */ - UINT4 cs; - /* Metrics */ - UINT4 ds; - double design_size; - double slant; - unsigned int begin_char, end_char; - INT4 *width, *height, *depth; - unsigned int *ct_kcode, *ct_ctype; /* JFM only */ - int nt; /* JFM only */ - /* Font bounding box */ - double font_bbx_w, font_bbx_h; - double font_bbx_xoff, font_bbx_yoff; -}; + typedef struct TFM_BitmapRec_ + { + FT_UInt bbx_width, bbx_height; + FT_UInt off_x, off_y; + FT_UInt mv_x, mv_y; + FT_Byte *bitmap; + FT_UInt raster; + } TFM_BitmapRec, *TFM_Bitmap; + + typedef struct TFM_GlyphRec_ + { + /* Font Info */ + int type; /* METRIC_TYPE_xxx */ + int type_aux; /* METRIC_TYPE_AUX_xxx */ + UINT4 cs; + /* Metrics */ + UINT4 ds; + double design_size; + double slant; + unsigned int begin_char, end_char; + INT4 *width, *height, *depth; + /* Font bounding box */ + double font_bbx_w, font_bbx_h; + double font_bbx_xoff, font_bbx_yoff; + + } TFM_GlyphRec, *TFM_Glyph; typedef struct TFM_FaceRec_ { FT_FaceRec root; - /* TO-DO */ + TFM_Glyph tfm_glyph; } TFM_FaceRec, *TFM_Face;