freetype-devel
[Top][All Lists]

## Re: [ft-devel] [GSoC] CID font support, and others

 From: Werner LEMBERG Subject: Re: [ft-devel] [GSoC] CID font support, and others Date: Tue, 08 Aug 2017 12:28:36 +0200 (CEST)

> Our complication is that we must be placing outline points alongside

OK, makes sense.  So it seems boiling down to the question how to
optimally hint Type1, right?

>> . Test with Acroread whether Type1 fonts and its CFF conversions
>>   yield identical rendering results.
>
> exporting PDF from LibreOffice, but when I opened that in Acroread I
> get LCD rendering (see attached).

Well, yes.

> They're certainly the two different formats (looking at the line
> gap), and the problematic glyph "u" looks hinted correctly.

OK.

> However, to reproduce the results from ftgrid, I'll need it to
> render in monochrome.

Monochrome?  Please explain.  I think there no longer exists an
environment where Acroread would return monochrome images...

> What do you do to test fonts with Acroread?

Nothing special.  In most cases, people report a problem with a font

> If only there is a utility that could take in a font file, and
> generate a pdf with all glyphs?

Attached are two solutions for xelatex; you just have to set the right
font (using font names returned by fontconfig's fc-list') in the
\setmainfont' macro, then call

xelatex charlist

for the compact version or

xelatex charlistx

for a version that shows character codes also (using the same font).

[This should work on Windows and Macs also, BTW – I assume that you
have TeXLive installed :-)]

> [...]
>
> What I draw from this is that a bad Type1 font (actually not the
> font, but the way we do hinting doesn't allow mid-charstring hints)
> can be made compliant to the spec, i.e. all hints declared at the
> start by, and only by, making an extra preprocessing/conversion
> pass.

OK.  So it seems we have to go this route.  Given that Type 1 fonts
are no longer important today (combined with faster and faster
computers), we certainly can live with a second pass.

Werner


\documentclass{article}

\input{binhex}
\usepackage[margin=1cm]{geometry}
\usepackage{fontspec}

\setmainfont{Linux Libertine O}

\usepackage{multicol}
\usepackage{multido}

\setlength{\parindent}{0pt}

\begin{document}

\multido{\i=0+1}{"110000}{% from U+0000 to U+10FFFF
\iffontchar\font\i
\symbol{\i}\,
\fi
}

\end{document}

\documentclass[landscape]{article}

\input{binhex}
\usepackage[margin=1cm]{geometry}
\usepackage{fontspec}

\setmainfont{Linux Libertine O}

\usepackage{multicol}
\usepackage{multido}

\setlength{\parindent}{0pt}

\begin{document}

\begin{multicols}{9}
\multido{\i=0+1}{"110000}{% from U+0000 to U+10FFFF
\iffontchar\font\i
\makebox[5em][l]{0x\nhex{4}{\i}}%
\symbol{\i}\endgraf
\fi
}
\end{multicols}

\end{document}