[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Bug #62923 - problem using aliased glyphs
From: |
Deri James |
Subject: |
[groff] 01/01: Bug #62923 - problem using aliased glyphs |
Date: |
Fri, 19 Aug 2022 20:31:07 -0400 (EDT) |
deri pushed a commit to branch master
in repository groff.
commit 26523d0bb2d2c0cca6b3b0759888069d6846fb1f
Author: Deri James <deri@chuzzlewit.myzen.co.uk>
AuthorDate: Sat Aug 20 01:29:12 2022 +0100
Bug #62923 - problem using aliased glyphs
With a large font if 2 characters above the 255 code
point limit are aliased, the aliased glyph has incorrect meta
data.
* src/devices/gropdf/gropdf.pl: Instead of duplicating a pointer
to the font metadata, duplicate the data itself. Then, if the
glyph is remapped to a code point under 256, the metadata is
preserved.
Fixes <https://savannah.gnu.org/bugs/?62923>.
---
ChangeLog | 15 +++++++++++++++
src/devices/gropdf/gropdf.pl | 22 +++++++++++-----------
2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 89ff8ce87..643abd9b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2022-08-20 Deri James <deri@chuzzlewit.myzen.co.uk>
+
+ Bug #62923 - problem using aliased glyphs
+
+ With a large font if 2 characters above the 255 code
+ point limit are aliased, the aliased glyph has incorrect meta
+ data.
+
+ * src/devices/gropdf/gropdf.pl: Instead of duplicating a pointer
+ to the font metadata, duplicate the data itself. Then, if the
+ glyph is remapped to a code point under 256, the metadata is
+ preserved.
+
+ Fixes <https://savannah.gnu.org/bugs/?62923>.
+
2022-08-18 Deri James <deri@chuzzlewit.myzen.co.uk>
[gropdf]: Improve parsing of troff font files.
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index e936b734b..b5fe98d87 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -2411,20 +2411,20 @@ sub LoadFont
my (@r)=split;
my (@p)=split(',',$r[1]);
- if ($r[1] eq '"')
- {
- $fnt{NAM}->{$r[0]}=$fnt{NAM}->{$lastnm};
+ if ($r[1] eq '"')
+ {
+ $fnt{NAM}->{$r[0]}=[@{$fnt{NAM}->{$lastnm}}];
next;
}
- $r[3]=oct($r[3]) if substr($r[3],0,1) eq '0';
- $r[0]='u0020' if $r[3] == 32;
- $r[0]="u00".hex($r[3]) if $r[0] eq '---';
-# next if $r[3] >255;
- $r[4]=$r[0] if !defined($r[4]);
- $fnt{NAM}->{$r[0]}=[$p[0],$r[3],'/'.$r[4],$r[3],0];
- $fnt{NO}->[$r[3]]=[$r[0],$r[0]];
- $lastnm=$r[0];
+ $r[3]=oct($r[3]) if substr($r[3],0,1) eq '0';
+ $r[0]='u0020' if $r[3] == 32;
+ $r[0]="u00".hex($r[3]) if $r[0] eq '---';
+# next if $r[3] >255;
+ $r[4]=$r[0] if !defined($r[4]);
+ $fnt{NAM}->{$r[0]}=[$p[0],$r[3],'/'.$r[4],$r[3],0];
+ $fnt{NO}->[$r[3]]=[$r[0],$r[0]];
+ $lastnm=$r[0];
$lastchr=$r[3] if $r[3] > $lastchr;
$fixwid=$p[0] if $fixwid == -1;
$fixwid=-2 if $fixwid > 0 and $p[0] != $fixwid;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Bug #62923 - problem using aliased glyphs,
Deri James <=