O/T : linux: can I list which small caps are in a ttf/otf font ?

Ken Moffat zarniwhoop at ntlworld.com
Thu Oct 26 21:26:20 CEST 2023


On Thu, Oct 26, 2023 at 08:22:48PM +0200, Bruno Voisin via tex-live wrote:
> > Ken Moffat wrote:
> > 
> > On linux, and building from source, does anybody know of packages, or
> > else of guides, so that when I know a font includes Small Caps I can
> > work out which code points are available ?
> 
> Not sure that answers your question, but for Unicode fonts if you use Frank Mittelbach's unicodefonttable package in LuaLaTeX with range-end=FFFFF and the default node renderer, you'll see all the glyphs that are normally accessed via OpenType features (like +smcp for small caps) in the Supplemental Private Use Area-A.
> 
> Frank warns against this though. From the unicodefonttable doc:
> 
> "Thus, by default we restrict the display to slots below 10000, because text fonts seldom contain glyphs in the higher planes. But if you want to see everything of the font (as far as supported by this package) and are prepared to wait for the higher planes to be scanned, you can go up to a value of FFFFF.
> However, please note that the LuaTEX fontloader uses the “Supplementary Private Use Area-A”, which starts at F0000, as its own playground and places remapping into it, so by default you see random data instead of font data there."
> 
> So I'm not sure the displayed code points mean anything.
> 
> Attached is an example of output for STIX Two Text. I think the small caps start at U+F0018. FontForge gives another position 65812 (see screenshot), and ttx from the Python FontTools gives glyph ids starting at 929 for the small caps.
> 

A very nicely formatted PDF, but I take a much more raw approach,
using plain text and then libreoffice writer. And sometimes that
seems to produce odd layout around some combining diacriticals.  I
can live with that.

I started this in March 2013 on my old ntlworld free webspace, I'm
not sure if I had used any TeX at that time.  If I was starting
over, I would do things very differently - only came back to it this
year to look at one or two new fonts (sarcastic laugh) - many have
moved their download locations, several have newer versions, and now
designers are offering more weights.

Attaching one of my exaple PDFs, the codepoints are just listed in
plain text files, one per line.

> To obtain this, I hacked Frank's package slightly, to get output
> halfway between Don Knuth's testfont, and fntsample from
> <https://fntsample.sourceforge.net/> and
> <https://github.com/eugmes/fntsample>.
> 
> Bruno Voisin
> 

Thanks, I'm not desperate to display the small caps in this specific
exercise, only to list the unicode values for what is there.  If I
can do that, I can see how the coverage compares to the normal font.
This is part of "if I want to show use text from language xxx, will
a specific font support it, and (now) can I use small caps ?"

The whole exercise started out by just looking for fonts which might
be aesthetically pleasing to the reader, and would let the reader
read all likely web pages and (monospace) mailing lists.  My ideas
of aesthetically pleasing probably differ from other people, so I
tried to get good coverage of available libre fonts.  It seems to
have snowballed in the last two months.

I've already hacked on my tex file which shows alphabets and example
text, and got output sufficient for me to say which languages are
supported in small caps, which have issues such as poor placement of
combining diacriticals (mostly on the real caps), and which are not
supported.  Done that for not many fonts so far, and confusing myself
about where to show normal text or normal italics, and where to show
small caps and small italics.

e.g. Charis SIL seems to support latin and cyrillic alphabets in
both small caps and small italics, Libertinus Serif only has small
caps and small italics for latin languages).

ĸen
-- 
  'The universe is so big, sir, that it obeys all possible laws,'
  said Ponder, 'For a given value of "teapot".
           -- The Science of Discworld II, 'The Globe'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CharisSIL-contents.pdf
Type: application/pdf
Size: 459778 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20231026/16b6548a/attachment-0001.pdf>


More information about the tex-live mailing list.