summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2002-12-09 16:44:40 +0000
committerPhilipp Lohmann <pl@openoffice.org>2002-12-09 16:44:40 +0000
commit02355c5a78edc13c7134f04773e71e74210a972d (patch)
tree3f1da80fa478954351a84e905ae4bff9562e5d11 /psprint
parent905cdfde99fe7ad1ca3b69122bbe111049818752 (diff)
#104264# workaround broken fonts
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/fontmanager/fontmanager.cxx8
-rw-r--r--psprint/source/fontsubset/sft.c7
-rw-r--r--psprint/source/fontsubset/sft.h7
3 files changed, 14 insertions, 8 deletions
diff --git a/psprint/source/fontmanager/fontmanager.cxx b/psprint/source/fontmanager/fontmanager.cxx
index 2954b3b3f3d9..8658b31fd7a9 100644
--- a/psprint/source/fontmanager/fontmanager.cxx
+++ b/psprint/source/fontmanager/fontmanager.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fontmanager.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: rt $ $Date: 2002-12-02 16:36:06 $
+ * last change: $Author: pl $ $Date: 2002-12-09 17:44:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1427,6 +1427,10 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const
pFont->m_ePitch = aInfo.pitch ? pitch::Fixed : pitch::Variable;
pFont->m_eItalic = aInfo.italicAngle == 0 ? italic::Upright : ( aInfo.italicAngle < 0 ? italic::Italic : italic::Oblique );
+ // #104264# there are fonts that set italic angle 0 although they are
+ // italic; use macstyle bit here
+ if( aInfo.italicAngle == 0 && (aInfo.macStyle & 2) )
+ pFont->m_eItalic = italic::Italic;
pFont->m_aEncoding = aInfo.symbolEncoded ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UCS2;
diff --git a/psprint/source/fontsubset/sft.c b/psprint/source/fontsubset/sft.c
index 27e6352617f9..ef1e87bd5c1f 100644
--- a/psprint/source/fontsubset/sft.c
+++ b/psprint/source/fontsubset/sft.c
@@ -2,9 +2,9 @@
*
* $RCSfile: sft.c,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: pl $ $Date: 2002-11-13 15:32:52 $
+ * last change: $Author: pl $ $Date: 2002-12-09 17:44:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,7 +59,7 @@
*
************************************************************************/
-/* $Id: sft.c,v 1.17 2002-11-13 15:32:52 pl Exp $
+/* $Id: sft.c,v 1.18 2002-12-09 17:44:39 pl Exp $
* Sun Font Tools
*
* Author: Alexander Gelfenbain
@@ -2509,6 +2509,7 @@ void GetTTGlobalFontInfo(TrueTypeFont *ttf, TTGlobalFontInfo *info)
info->yMin = XUnits(UPEm, GetInt16(table, 38, 1));
info->xMax = XUnits(UPEm, GetInt16(table, 40, 1));
info->yMax = XUnits(UPEm, GetInt16(table, 42, 1));
+ info->macStyle = GetInt16(table, 44, 1);
table = getTable(ttf, O_hhea);
if (table) {
diff --git a/psprint/source/fontsubset/sft.h b/psprint/source/fontsubset/sft.h
index c3b8ecd57f8a..6682343eee09 100644
--- a/psprint/source/fontsubset/sft.h
+++ b/psprint/source/fontsubset/sft.h
@@ -2,9 +2,9 @@
*
* $RCSfile: sft.h,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hdu $ $Date: 2002-08-08 14:36:47 $
+ * last change: $Author: pl $ $Date: 2002-12-09 17:44:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,7 +59,7 @@
*
************************************************************************/
-/* $Id: sft.h,v 1.9 2002-08-08 14:36:47 hdu Exp $ */
+/* $Id: sft.h,v 1.10 2002-12-09 17:44:40 pl Exp $ */
/**
@@ -255,6 +255,7 @@ extern "C" {
sal_uInt16 *ufamily; /**< family name UCS2 */
char *subfamily; /**< subfamily name */
char *psname; /**< PostScript name */
+ sal_uInt16 macStyle; /**< macstyle bits from 'HEAD' table */
int weight; /**< value of WeightClass or 0 if can't be determined */
int width; /**< value of WidthClass or 0 if can't be determined */
int pitch; /**< 0: proportianal font, otherwise: monospaced */