diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2023-01-10 11:54:41 +0000 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2023-01-10 12:04:54 +0000 |
commit | dc4bf27b1f6f6db5508f385e30f934bd689c94f0 (patch) | |
tree | 8d4aff66eab6eb83e632d38e6c6bc4963cd9cdd8 /pdf | |
parent | c364af7a228c128f76df10bd4fb9e3ab70e071c1 (diff) | |
download | ghostpdl-dc4bf27b1f6f6db5508f385e30f934bd689c94f0.tar.gz |
GhostPDF - set some default values for type 1 fonts
Bug #705872 see comment #4
Although Firefox is wrong to state that an ExpansionFactor of 0 is 'bad'
it still isn't what it should be in fact. If the font doesn't have an
ExpansionFactor then we should write the default.
The same applies to BlueShift and BlueFuzz. Ideally we should also write
default values for UnderlinePosition and UnderlineThickness, but I can't
see an obvious way to do that, they are not in the same structure.
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/pdf_font1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pdf/pdf_font1.c b/pdf/pdf_font1.c index 74b7963a8..9ef8b18e0 100644 --- a/pdf/pdf_font1.c +++ b/pdf/pdf_font1.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2019-2022 Artifex Software, Inc. +/* Copyright (C) 2019-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -540,6 +540,9 @@ pdfi_read_type1_font(pdf_context *ctx, pdf_dict *font_dict, pdf_dict *stream_dic if (code >= 0) { fpriv.gsu.gst1.data.lenIV = 4; + fpriv.gsu.gst1.data.ExpansionFactor = 0.06; + fpriv.gsu.gst1.data.BlueShift = 7; + fpriv.gsu.gst1.data.BlueFuzz = 1; code = pdfi_read_ps_font(ctx, font_dict, fbuf, fbuflen, &fpriv); gs_free_object(ctx->memory, fbuf, "pdfi_read_type1_font"); |