Re: Fonts used in systray applet



On Sat, 2012-06-16 at 12:13 +0200, Marco wrote:
> On 2012-06-15 Dan Williams <dcbw redhat com> wrote:
> 
> > > My question: Which fonts are used for the tool tip that appears
> > > while hovering over the systray icon and in the “Available” list?
> > 
> > The fonts used depend on Pango and freetype.  The applet simply attempts
> > to convert the SSID (which *isn't* a string, but a random 32-byte array)
> > into something readable and then sends it to Gtk, which draws it using
> > Pango and freetype.  So the issue might be either the applet's
> > conversion of the random 32-byte array of the SSID into something
> > possibly readable, or it could be your font.
> > 
> > What language is this SSID supposed to be in, and what is your LANG
> > environment variable set to?
> 
> Thanks for the explanation.
> 
> The SSID I connect to is Cyrillic, the other SSIDs contain probably
> chinese or japanese (I don't care about those, and I assume that's a
> font issue). Other European SSIDs (Swedish and Polish special
> characters) display fine.
> 
> LANG=en_GB.UTF-8
> 
> > The applet checks LANG on the hope that the SSID might be encoded
> > in that language.
> 
> My system language is not at all related to the one used in the
> wireless networks. But I agree, in general it would have been a good
> guess.
> 
> > One thing to check; if you run:
> > 
> >  nmcli dev wifi list iface wlan0
> > 
> > do the SSIDs print out OK there?
> 
> nmcli dev wifi list displays the Cyrillic SSIDs perfectly.
> 
> I didn't know that command. That's a simple way to verify that I'm
> connected to the correct network. I will use that as a work around,
> it's better then to count the number of squares.

This indicates that the SSID is actually valid UTF8.  nmcli will print
out the SSID if it's UTF-8, otherwise it'll show it in hex form.  It
doesn't try to do any conversion.  The applet will also check if the
SSID is UTF8.  Since nmcli prints the SSID, that means it's UTF8, which
also means the applet should be handling the SSID as UTF8.  Which means
that whatever font GTK is picking to draw the SSID in cannot handle
Cyrillic characters, I guess.  The terminal may be using fixed-width
fonts, while GTK is using variable-width fonts, which might explain the
difference.  It all depends on the freetype substituting rules which
font gets used for a certain character if the normal font doesn't have
that glyph.

Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]