diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/tt_aux.c')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/tt_aux.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/tt_aux.c b/Build/source/texk/xdvipdfmx/src/tt_aux.c index e9da131885f..96ff84764ed 100644 --- a/Build/source/texk/xdvipdfmx/src/tt_aux.c +++ b/Build/source/texk/xdvipdfmx/src/tt_aux.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/tt_aux.c,v 1.7 2004/09/11 14:50:29 hirata Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/tt_aux.c,v 1.9 2008/05/17 04:18:47 chofchof Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -144,11 +144,11 @@ ULONG ttc_read_offset (sfnt *sfont, int ttc_idx) #define ALLCAP (1 << 16) /* All-cap font */ #define SMALLCAP (1 << 17) /* Small-cap font */ #define FORCEBOLD (1 << 18) /* Force bold at small text sizes */ -pdf_obj *tt_get_fontdesc (sfnt *sfont, int *embed, int type, const char* fontname) +pdf_obj *tt_get_fontdesc (sfnt *sfont, int *embed, int stemv, int type, const char* fontname) { pdf_obj *descriptor = NULL; pdf_obj *bbox = NULL; - int stemv = 0, flag = SYMBOLIC; + int flag = SYMBOLIC; /* TrueType tables */ struct tt_head_table *head; struct tt_os2__table *os2; @@ -213,7 +213,8 @@ pdf_obj *tt_get_fontdesc (sfnt *sfont, int *embed, int type, const char* fontnam pdf_add_dict (descriptor, pdf_new_name ("Descent"), pdf_new_number (PDFUNIT(os2->sTypoDescender))); - stemv = (os2->usWeightClass/65)*(os2->usWeightClass/65)+50; /* arbitrary */ + if (stemv < 0) /* if not given by the option '-v' */ + stemv = (os2->usWeightClass/65.)*(os2->usWeightClass/65.)+50; pdf_add_dict (descriptor, pdf_new_name ("StemV"), pdf_new_number (stemv)); @@ -234,9 +235,11 @@ pdf_obj *tt_get_fontdesc (sfnt *sfont, int *embed, int type, const char* fontnam ); } /* optional */ - pdf_add_dict (descriptor, - pdf_new_name ("AvgWidth"), - pdf_new_number (PDFUNIT(os2->xAvgCharWidth))); + if (os2->xAvgCharWidth != 0) { + pdf_add_dict (descriptor, + pdf_new_name ("AvgWidth"), + pdf_new_number (PDFUNIT(os2->xAvgCharWidth))); + } } /* BoundingBox (array) */ |