summaryrefslogtreecommitdiff
path: root/fonttosfnt.h
diff options
context:
space:
mode:
authorChristopher Zimmermann <madroach@gmerlin.de>2020-07-07 21:02:56 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2020-09-22 22:00:38 +0000
commit9fb05de7d6c57d045b4a88516f3c28cf3cf98722 (patch)
tree291c178c9b2bb390fcb82ee618d5a67a60b4e9a2 /fonttosfnt.h
parent58cbf737557f34744b950668e3354ec2f2dae766 (diff)
use more properties according to XLFD
Diffstat (limited to 'fonttosfnt.h')
-rw-r--r--fonttosfnt.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/fonttosfnt.h b/fonttosfnt.h
index 202ab5a..a05e036 100644
--- a/fonttosfnt.h
+++ b/fonttosfnt.h
@@ -86,6 +86,22 @@ typedef struct _FontNameEntry {
char *value;
} FontNameEntryRec, *FontNameEntryPtr;
+typedef struct _Metrics {
+ int height;
+ int maxX;
+ int minX;
+ int maxY;
+ int minY;
+ int xHeight;
+ int capHeight;
+ int maxAwidth;
+ int awidth;
+ int ascent;
+ int descent;
+ int underlinePosition;
+ int underlineThickness;
+} MetricsRec, *MetricsPtr;
+
typedef struct _Font {
int numNames;
struct _FontNameEntry *names;
@@ -93,8 +109,8 @@ typedef struct _Font {
int weight; /* as in the OS/2 table */
int width; /* as in the OS/2 table */
int italicAngle; /* degrees c-clockwise from the vertical */
- int underlinePosition;
- int underlineThickness;
+ MetricsRec pxMetrics;
+ MetricsRec metrics;
unsigned foundry;
struct _Strike *strikes;
} FontRec, *FontPtr;
@@ -153,7 +169,7 @@ int findCode(CmapPtr, int);
BitmapPtr strikeBitmapIndex(StrikePtr, CmapPtr, int);
void strikeMetrics(StrikePtr, int*, int*, int*, int*, int*);
int glyphMetrics(FontPtr, int, int*, int*, int*, int*, int*);
-void fontMetrics(FontPtr, int*, int*, int*, int*, int*);
+void fontMetrics(FontPtr, MetricsPtr);
int maxIndex(CmapPtr);
int readFile(char *filename, FontPtr);
@@ -173,6 +189,7 @@ int macTime(int *, unsigned *);
unsigned faceFoundry(FT_Face);
char *faceEncoding(FT_Face);
int faceFlags(FT_Face);
+int faceIntProp(FT_Face, const char *);
int faceWeight(FT_Face);
int faceWidth(FT_Face);
int faceItalicAngle(FT_Face);