Skip to content

Commit 726113e

Browse files
committed
feat: map small-caps, tabular-oldstyle and misc non-standard glyph names
xpdf resolves glyph names through the nameToUnicode tables plus a fallback for 'Axx'/'xx' hex-style names; it does not implement the AGL rule of stripping the suffix after a period. Names like "a.sc" or "three.taboldstyle" therefore resolve to nothing and the glyph is dropped from the output entirely -- not substituted, simply lost. Ported from the stale branch fix-non-standard-font-names, with two changes: - sc.nameToUnicode was shipped there but never referenced from xpdfrc, so it would have been dead weight; both it and others.nameToUnicode are now registered. - sc.nameToUnicode was missing k.sc (it ran a-j then l-z); added. taboldstyle.nameToUnicode previously held only eight.taboldstyle; it now covers 0-9. Verified with minimal PDFs that reference these names via an /Encoding /Differences array: a.sc b.sc k.sc z.sc before: (no output) after: a b k z three/seven/zero.taboldstyle before: (no output) after: 3 7 0 lscript partialdiff arrowhookleft before: d after: l d <hook> Note that partialdiff is already in xpdf's built-in table, so that entry is redundant; it is kept for explicitness.
1 parent 6d12559 commit 726113e

4 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2113 lscript
2+
2202 partialdiff
3+
21A9 arrowhookleft
4+
21A9 arrowrighttophalf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
0061 a.sc
2+
0062 b.sc
3+
0063 c.sc
4+
0064 d.sc
5+
0065 e.sc
6+
0066 f.sc
7+
0067 g.sc
8+
0068 h.sc
9+
0069 i.sc
10+
006a j.sc
11+
006b k.sc
12+
006c l.sc
13+
006d m.sc
14+
006e n.sc
15+
006f o.sc
16+
0070 p.sc
17+
0071 q.sc
18+
0072 r.sc
19+
0073 s.sc
20+
0074 t.sc
21+
0075 u.sc
22+
0076 v.sc
23+
0077 w.sc
24+
0078 x.sc
25+
0079 y.sc
26+
007a z.sc
27+
002d hyphen.sc
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
0038 eight.taboldstyle
1+
0030 zero.taboldstyle
2+
0031 one.taboldstyle
3+
0032 two.taboldstyle
4+
0033 three.taboldstyle
5+
0034 four.taboldstyle
6+
0035 five.taboldstyle
7+
0036 six.taboldstyle
8+
0037 seven.taboldstyle
9+
0038 eight.taboldstyle
10+
0039 nine.taboldstyle

xpdfrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,7 @@ nameToUnicode languages/xpdf-others/oldstyle.nameToUnicode
6464
nameToUnicode languages/xpdf-others/taboldstyle.nameToUnicode
6565
nameToUnicode languages/xpdf-others/ligatures.nameToUnicode
6666
nameToUnicode languages/xpdf-others/fitted.nameToUnicode
67+
nameToUnicode languages/xpdf-others/sc.nameToUnicode
68+
nameToUnicode languages/xpdf-others/others.nameToUnicode
6769
unicodeRemapping languages/xpdf-others/symbols.unicodeRemapping
6870
#----- end oldstyle support package

0 commit comments

Comments
 (0)