[PATCH weston] Add font entry to shell section for title fonts
Jasper St. Pierre
jstpierre at mecheye.net
Mon Sep 1 21:32:13 PDT 2014
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.
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
On Sep 1, 2014 9:13 PM, "Ryo Munakata" <ryomnktml at gmail.com> wrote:
> On Mon, 1 Sep 2014 14:05:42 +0300
> Pekka Paalanen <ppaalanen at gmail.com> wrote:
> > On Thu, 28 Aug 2014 20:31:37 +0900
> > Hi,
> > considering that the toytoolkit (well, shared/cairo-util.h here) uses
> > cairo_show_text(), which is documented as:
> > "The cairo_show_text() function call is part of what the cairo
> > designers call the "toy" text API. It is convenient for short demos and
> > simple programs, but it is not expected to be adequate for serious
> > text-using applications. See cairo_show_glyphs() for the "real" text
> > display API in cairo."
> > - http://cairographics.org/manual/cairo-text.html#cairo-show-text
> > I'm not sure being able to choose the font is appropriate. If we wanted
> > text to work right, we cannot trust any single font to contain all the
> > needed glyphs, which is what cairo_show_text() assumes. We'd need a
> > list of fonts to fall back when a glyph is not found.
> > If this was just about the toytoolkit alone, I would probably not
> > bother with it, but since we use the same code to draw Xwayland
> > decorations, maybe doing text rendering properly would be worth it?
> > Would be much better to rely on pangocairo, as it seems we already use
> > pangocairo when it's available. When pangocairo is disabled in the
> > build, we should fall back to the current cairo_show_text().
> > Does that make sense?
> > Thanks,
> > pq
> Hi, Pekka.
> I agree with you. It makes sense.
> I'm working on it.
> Here's a few questions:
> * Is pangocairo optional, not a requirement?
> Should I write the code like:
> #ifdef HAVE_PANGOCAIRO
> /* use pangocairo */
> /* use cairo */
> or can I assume we can use pangocairo for sure?
> * I will add 'fonts' entry to shell section. Is that okay?
> 'fonts' entry is a list of fonts: fonts=font1,font2,font3
> Is 'shell' section the right place to add fonts entry?
> I think we need a way to choose the fonts.
> For example, if you search for something on Google Japan using firefox,
> the title of firefox will be garbled because of sans which is a default
> (I mean mojibake: http://en.wikipedia.org/wiki/Mojibake)
> I know Weston is just a reference implementation, not to use for real.
> What do you think about it considering the policy of Weston?
> Should I continue to work on it?
> Ryo Munakata <ryomnktml at gmail.com>
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wayland-devel