Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Old-style numbers, from PostScript

54 views
Skip to first unread message

jdaw1

unread,
Oct 4, 2020, 4:14:12 PM10/4/20
to
Mac font Calibri has glyphs for old-style numbers. Mac Font Book claims that they are glyphs 954 to 963, it not being obvious what those numbers mean. Best efforts with glyph names resembling /oneoldstyle, …, /threeoldstyle, …, produce the notdef block. :-(

Please, how can these non-Unicode glyphs be accessed from PostScript?

Eli the Bearded

unread,
Oct 5, 2020, 2:26:26 AM10/5/20
to
I'm not enough of a Postscript expert to help here, but such glyphs have
a bunch of names:

https://en.wikipedia.org/wiki/Text_figures

Text figures (also known as non-lining, lowercase, old style,[1]
ranging, hanging, medieval, billing,[2] or antique[3] figures or
numerals) are numerals designed with varying heights in a fashion
that resembles a typical line of running text, hence the name. They
are contrasted with lining figures (also called titling or modern
figures), which are the same height as upper-case letters.[4][5]
Georgia is an example of a popular typeface that employs text
figures by default.

I generally think of them as "lower case" numbers, and would hunt using
names like that.

Elijah
------
found that wikipedia page using "lower case numbers" as the search

jdaw1

unread,
Oct 5, 2020, 3:33:40 AM10/5/20
to
Agree with everything you have said. But PLRM3, Appendix E.9 (“Expert Character Set”), pp788–789, lists: centoldstyle, dollaroldstyle, eightoldstyle, fiveoldstyle, fouroldstyle, nineoldstyle, oneoldstyle, sevenoldstyle, sixoldstyle, threeoldstyle, twooldstyle, zerooldstyle. So those ought to be valid glyph names.

Unicode — wrongly — decided not to have separate characters for old-style numbers. Could that be the problem? Could it be that, somehow, macOS 10.13.6 doesn’t allow PostScript to access non-Unicode characters?

luser droog

unread,
Oct 5, 2020, 11:00:43 AM10/5/20
to
On Monday, October 5, 2020 at 2:33:40 AM UTC-5, jdaw1 wrote:
> Agree with everything you have said. But PLRM3, Appendix E.9 (“Expert Character Set”), pp788–789, lists: centoldstyle, dollaroldstyle, eightoldstyle, fiveoldstyle, fouroldstyle, nineoldstyle, oneoldstyle, sevenoldstyle, sixoldstyle, threeoldstyle, twooldstyle, zerooldstyle. So those ought to be valid glyph names.
>
> Unicode — wrongly — decided not to have separate characters for old-style numbers. Could that be the problem? Could it be that, somehow, macOS 10.13.6 doesn’t allow PostScript to access non-Unicode characters?

Can you get the available names from the CharStrings dictionary?
Sthg like

/Calibri findfont /CharStrings get { pop ==only ( )print } forall

If so then you can patch the encoding vector

/Calibri fontfont dup dup /Encoding get dup length array copy
(0) 0 get
[ /zero /one /two ... ] putinterval
put

luser droog

unread,
Oct 5, 2020, 11:02:21 AM10/5/20
to
/Encoding exch
> put

Jeffrey H. Coffield

unread,
Oct 5, 2020, 11:05:15 AM10/5/20
to


On 10/04/2020 01:14 PM, jdaw1 wrote:
> Mac font Calibri has glyphs for old-style numbers. Mac Font Book claims that they are glyphs 954 to 963, it not being obvious what those numbers mean. Best efforts with glyph names resembling /oneoldstyle, …, /threeoldstyle, …, produce the notdef block. :-(
>
> Please, how can these non-Unicode glyphs be accessed from PostScript?
>

What software are you using?

Calibri is a Microsoft proprietary font from Microsoft Office and
apparently a lot of people replace it with Carlito from Google which is
freely licensed.

PostScript uses a font encoding vector to map glyphs to a byte value
with a range of 0 to 255 decimal (or 0 to 377 octal) so I don't
understand what 954 to 963 means.

Jeff Coffield
www.digitalsynergyinc.com

luser droog

unread,
Oct 5, 2020, 11:13:53 AM10/5/20
to
Right. A Type 1 font is a dictionary with the /Encoding member holding
a 256 element array of glyph names. These names should be keys in the
/CharStrings member which is a dictionary mapping glyph names to
encoded/encrypted drawing commands.

If it's a True Type font, the ghostscript does some magic to wrap it
in a Type 42 font and I don't know the details of how or to what
extent it populates the /CharStrings dictionary.

jdaw1

unread,
Oct 7, 2020, 2:16:17 PM10/7/20
to
Code simplified to
/Calibri findfont /CharStrings get {pop ==} forall
Which, embarrassingly, has no threeoldstyle. But! But PLRM3, Appendix E.9! Sigh.

Nor does Carlito (good suggestion anyway — thank you).

Re encodings, if one is willing to access through glyphshow, generally there's no need to mess with encodings. But it does matter if one wants a charpath effect for a glyph, as I asked in May 2006:
http://groups.google.com/g/comp.lang.postscript/c/rvAGfbsbLVw

jdaw1

unread,
Oct 7, 2020, 4:51:44 PM10/7/20
to
With further rummaging, I still cannot find a glyph name. Sigh.

ken

unread,
Oct 9, 2020, 3:48:58 AM10/9/20
to
In article <980c54c3-8027-4050...@googlegroups.com>,
jdawi...@gmail.com says...
>
> With further rummaging, I still cannot find a glyph name. Sigh.

PostScript doesn't support TrueType fonts (directly), you can use Type42
fonts, which are TrueType outlines wrapped up with additional
information.

You could start with this Stack Overflow question:

https://stackoverflow.com/questions/63743952/showing-glyphs-with-
unicodes-higher-than-decimal-256


Ken

Ross Presser

unread,
Oct 9, 2020, 12:27:04 PM10/9/20
to
On Wednesday, October 7, 2020 at 4:51:44 PM UTC-4, jdaw1 wrote:
> With further rummaging, I still cannot find a glyph name. Sigh.

I downloaded Carlito-Regular.ttf from here
https://fontlibrary.org/en/font/carlito

and opened it in Fontforge and found:

65645 0x1006d U+???? "three.oldstyle"

and

65635 0x10063 U+???? "three.pnum.oldstyle"

But I guess these are not Postscript glyphnames but somehow stored in
the TTF, because this

(Carlito-Regular.ttf) findfont /CharStrings get { pop ==only ( )print } forall

did not emit those names.

There's apparently an enormous amount I don't know about fonts.

jdaw1

unread,
Oct 9, 2020, 5:02:05 PM10/9/20
to
Of the twenty-three hundred fonts on my computer, fourteen have the glyph /fouroldstyle:
Palatino-Bold
Palatino-BoldItalic
Palatino-Italic
Palatino-Roman
Superclarendon-Black
Superclarendon-BlackItalic
Superclarendon-Bold
Superclarendon-BoldItalic
Superclarendon-Italic
Superclarendon-Light
Superclarendon-LightItalic
Superclarendon-Regular
Zapfino

> 65645 0x1006d U+???? "three.oldstyle"
And thirty-five have four.oldstyle:
BigCaslon-Medium
BodoniSvtyTwoITCTT-Bold
BodoniSvtyTwoITCTT-Book
BodoniSvtyTwoITCTT-BookIta
Didot
ElectrumADFExp-Bold
ElectrumADFExp-BoldOblique
ElectrumADFExp-Light
ElectrumADFExp-LightOblique
ElectrumADFExp-Oblique
ElectrumADFExp-Regular
ElectrumADFExp-SemiBold
ElectrumADFExp-SemiBoldOblique
HoeflerText-Black
HoeflerText-BlackItalic
HoeflerText-Italic
IowanOldStyle-Black
IowanOldStyle-BlackItalic
IowanOldStyle-Bold
IowanOldStyle-BoldItalic
IowanOldStyle-Italic
IowanOldStyle-Roman
MinionPro-Bold
MinionPro-BoldIt
MinionPro-It
MinionPro-Regular
MyriadPro-Bold
MyriadPro-BoldIt
MyriadPro-It
MyriadPro-Regular
Skia-Regular
TeXGyreBonum-Bold
TeXGyreBonum-BoldItalic
TeXGyreBonum-Italic
TeXGyreBonum-Regular

> There's apparently an enormous amount I don't know about fonts.
Not just you: I know very little.

jdaw1

unread,
Oct 9, 2020, 5:53:27 PM10/9/20
to
And MyriadPro-Regular works for me, so my problem is solved, even though the general problem remains difficult.
0 new messages