diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2008-05-21 13:19:17 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2008-05-21 13:19:17 +0000 |
commit | ebdcfba2fc6c9bf4db2008a00058f3422a9d1da8 (patch) | |
tree | 52772b6cbe81d9ca8b67d3990ea033a27d432916 /Build/source/texk/xdvipdfmx/src/tt_aux.c | |
parent | 246e3a9180a28cb419402687d2005bdfb5313774 (diff) |
update to xdvipdfmx 0.7, from xetex svn r.688
git-svn-id: svn://tug.org/texlive/trunk@8272 c570f23f-e606-0410-a88d-b1316a301751
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) */ |