<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> Date: Mon, 11 May 2015 21:35:49 +0200<br>> From: khaledhosny@eglug.org<br>> To: lsemprini@hotmail.com<br>> CC: harfbuzz@lists.freedesktop.org<br>> Subject: Re: [HarfBuzz] how to detect missing glyphs e.g. for font substitition<br>> <br>> On Mon, May 11, 2015 at 07:56:19AM +0000, Louis Semprini wrote:<br>> > Or, must Harfbuzz callers first do a complete, separate pass where<br>> > they run all code points of the input through some kind of mapping<br>> > routine that uses the fonts' 'cmap' and other tables?  The latter<br>> > would be a shame because it would require the Harfbuzz caller to<br>> > duplicate a vast amount of the complexity that is nicely hidden in<br>> > Harfbuzz in their own code.  It's also a shame because in most cases,<br>> > no font substitution would be needed and so it would be inefficient in<br>> > the average case.<br>> <br>> Some HarfBuzz users do that i.e. check the font’s cmap table to see what<br>> characters it supports and selects fallback fonts for what it doesn’t<br>> before even calling HarfBuzz. Others rely on HarfBuzz, for example in<br>> LibreOffice the run is first shaped with the user selected font, then<br>> any contiguous runs of missing glyphs are reshaped with fallback fonts,<br>> this have also the advantage of letting HarfBuzz do its normalisation<br>> which can result in the font supporting more characters than it declares<br>> in its cmap table.<br><br>That's good to know, but for the second group of users, how do they detect the missing glyphs?  By looking for glyph index 0?<br><br>Thanks.<br><br></div>                                        </div></body>
</html>