<p dir="ltr">Weston is not just a reference anymore: it's designed to be used in real environments. toytoolkit less so, but that's no reason to back down.</p>
<p dir="ltr">Pango will do proper font selection ("shaping") for you without any work on your part. It's designed to be a full text layout engine that's simple to use.</p>
<div class="gmail_quote">On Sep 1, 2014 9:13 PM, "Ryo Munakata" <<a href="mailto:ryomnktml@gmail.com">ryomnktml@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, 1 Sep 2014 14:05:42 +0300<br>
Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
<br>
> On Thu, 28 Aug 2014 20:31:37 +0900<br>
><br>
> Hi,<br>
><br>
> considering that the toytoolkit (well, shared/cairo-util.h here) uses<br>
> cairo_show_text(), which is documented as:<br>
><br>
> "The cairo_show_text() function call is part of what the cairo<br>
> designers call the "toy" text API. It is convenient for short demos and<br>
> simple programs, but it is not expected to be adequate for serious<br>
> text-using applications. See cairo_show_glyphs() for the "real" text<br>
> display API in cairo."<br>
> - <a href="http://cairographics.org/manual/cairo-text.html#cairo-show-text" target="_blank">http://cairographics.org/manual/cairo-text.html#cairo-show-text</a><br>
><br>
> I'm not sure being able to choose the font is appropriate. If we wanted<br>
> text to work right, we cannot trust any single font to contain all the<br>
> needed glyphs, which is what cairo_show_text() assumes. We'd need a<br>
> list of fonts to fall back when a glyph is not found.<br>
><br>
> If this was just about the toytoolkit alone, I would probably not<br>
> bother with it, but since we use the same code to draw Xwayland<br>
> decorations, maybe doing text rendering properly would be worth it?<br>
><br>
> Would be much better to rely on pangocairo, as it seems we already use<br>
> pangocairo when it's available. When pangocairo is disabled in the<br>
> build, we should fall back to the current cairo_show_text().<br>
><br>
> Does that make sense?<br>
><br>
><br>
> Thanks,<br>
> pq<br>
<br>
Hi, Pekka.<br>
<br>
I agree with you. It makes sense.<br>
I'm working on it.<br>
<br>
Here's a few questions:<br>
* Is pangocairo optional, not a requirement?<br>
Should I write the code like:<br>
#ifdef HAVE_PANGOCAIRO<br>
/* use pangocairo */<br>
#else<br>
/* use cairo */<br>
#endif<br>
or can I assume we can use pangocairo for sure?<br>
<br>
* I will add 'fonts' entry to shell section. Is that okay?<br>
'fonts' entry is a list of fonts: fonts=font1,font2,font3<br>
Is 'shell' section the right place to add fonts entry?<br>
<br>
I think we need a way to choose the fonts.<br>
For example, if you search for something on Google Japan using firefox,<br>
the title of firefox will be garbled because of sans which is a default font.<br>
(I mean mojibake: <a href="http://en.wikipedia.org/wiki/Mojibake" target="_blank">http://en.wikipedia.org/wiki/Mojibake</a>)<br>
<br>
I know Weston is just a reference implementation, not to use for real.<br>
What do you think about it considering the policy of Weston?<br>
Should I continue to work on it?<br>
<br>
Thanks.<br>
--<br>
Ryo Munakata <<a href="mailto:ryomnktml@gmail.com">ryomnktml@gmail.com</a>><br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</blockquote></div>