[haiku-commits] Re: haiku: hrev50094 - in src: tests/kits/interface/layout/widget_layout_test servers/app/font apps/charactermap tests/kits/interface/picture preferences/locale
- From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Mon, 15 Feb 2016 09:14:58 +0000
15 février 2016 09:45 "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> a écrit:
Am 14.02.2016 um 21:13 schrieb pulkomandy@xxxxxxxxxxxxx:
15325401ceef: app_server: do not return a glyph when nothing is found in the
- Fixes BFont::GetHasGlyphs, the "empty square" which was returned led
it to think the font had glyphs for everything
- This means the "no character" empty square will not be drawn anymore,
if we want it back, we will need to rework the implementation a bit
more (either request it explicitly when there is a missing glyph, or
return it as it was before but including an info that it is the
I'd say we should continue to have the empty square, and fix
BFont::GetHasGlyphs() to work as
Well, in that case we could have the font rendering code manage missing glyphs
and act as appropriate (possibly drawing the square itself, or explicitly
getting the glyph from the font).
It may be useful to add negative caching to the font cache as well so we don't
lookup the missing glyph again next time.
- Maybe GetHasGlyphs should also bypass the font fallback system, and
return what's actually in the requested font only.
I would only do so with an extra flag, not by default; it's an info you're
rarely interested in.
I'm not sure about it being rarely used, the idea of this API is that you can
find a font or a set of font that can render everyhing you need. If the
fallback font is used, you get a mix of two different fonts which may not
render very well.
More annoyingly, if you are authoring a PDF or webpage and deciding which font
to embed, you could end up picking one that doesn't actually has the glyphs you
However, the only use case so far is the Locale preferences, which doesn't have
this problem. So, an extra flag sounds like a good idea. Not sure what the
default value should be, however.
Other related posts: