summaryrefslogtreecommitdiff
path: root/pcl
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2009-06-26 19:33:20 +0000
committerHenry Stiles <henry.stiles@artifex.com>2009-06-26 19:33:20 +0000
commit06bbf0f90c7a81a17a75186b408b2a4cbf660448 (patch)
tree6174afffae6ac9a712a33943f0f99264ac416d33 /pcl
parent88f85c6bcc3e329449fdbba16f54be5c9066cbda (diff)
The lineprinter font should not be detected by typeface number alone,
other downloaded fonts objects can have the same number. No expected differences. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@9822 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'pcl')
-rw-r--r--pcl/pcfsel.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pcl/pcfsel.c b/pcl/pcfsel.c
index 8fc0644db..f275adf3d 100644
--- a/pcl/pcfsel.c
+++ b/pcl/pcfsel.c
@@ -161,13 +161,17 @@ check_support(const pcl_state_t *pcs, uint symbol_set, const pl_font_t *fp,
return 1;
}
+/* Identify the internal lineprinter font */
+#define INTERNAL_LPFONT \
+ (fp->params.typeface_family == 0 && fp->storage == pcds_internal)
+
/* a font may be scalable but we want to treat it a bitmap for the
- purpose of selection. Right now lineprinter is the only example of
- this */
+ purpose of selection. The internal lineprinter is the only example
+ of this. */
static bool
font_is_scalable_selection_wise(const pl_font_t *fp)
{
- if (fp->params.typeface_family == 0)
+ if (INTERNAL_LPFONT)
return false;
else
return pl_font_is_scalable(fp);
@@ -320,7 +324,7 @@ score_match(const pcl_state_t *pcs, const pcl_font_selection_t *pfs,
* Lineprinter has a special case, making it harder to accidently select.
*/
- if (fp->params.typeface_family == 0)
+ if (INTERNAL_LPFONT)
score[score_fontnumber] = 0x100000 - fp->params.typeface_family;
else
score[score_fontnumber] = 0x200000 - fp->params.typeface_family;