Mailing List Archive

Font face naming differences on different platforms (was Re: What fonts are guaranteed to be on a Linux box?)
On 08/22/2013 03:11 PM, Yeechang Lee wrote:
> That said, I am not sure if the cause is necessarily OSD/theme-related
> per se, or even with MythTV at all. I use two 0.26 frontends, one
> Linux and one OS X. With the stock/fallback osd_subtitle.xml, both the
> FreeMono and Droid Sans Mono fonts behave badly on the OS X frontend
> (whether Jean-Yves' standalone or the MacPorts one). With FreeMono,
> some punctuation marks are either partially obscured (question mark)
> or don't appear at all (apostrophe, period). With Droid Sans Mono,
> they appear but parts are cut off, as are other letters, notably the
> capital W and capital O.
>
> Similar behavior occurs with other free mono fonts I've tested,
> Liberation, DejaVu, and Ubuntu. Only the proprietary Bitstream Vera
> Sans Mono--that Liberation and DejaVu are clones of--seems to appear
> correctly on OS X, but of course we can't distribute it. Since, as I
> mentioned, this only seems to occur on OS X, it's quite possibly an
> Apple-specific font-rendering issue.

Oops. This reminds me that k-man on irc noticed that (sometimes? for
some fonts? always?) the font face name is exposed differently on his
Mac OS X system than on his GNU/Linux systems:

http://irc.mythtv.org/ircLog/channel/3/2011-08-15

Try putting the .otf, .ttf, or .ttc file(s) for the fonts into your
theme directory (at least temporarily) and running the frontend on both
platforms with -v gui,file --loglevel debug and you should see
information like:

In file '<filename>', found font(s) <face name>'
or
Unable to register font(s) in file '<filename>'

Do you get different face names or errors or anything? The log messages
will show exactly what Qt gets from the underlying platform font
managers. If they're different, we'd have to fix this with code (and it
wouldn't be that much code--like I have no excuse for not having
finished it in 2 years :( ). I still think the approach he asked for
(and I described) in the IRC conversation is the best
approach--basically a fallback face name approach, similar to that used
by CSS.

I'd also like Stuart Morgan's opinion on the approach before we put it in.

Mike

_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming
Re: Font face naming differences on different platforms (was Re: What fonts are guaranteed to be on a Linux box?) [ In reply to ]
On Thu, Aug 22, 2013 at 12:41 PM, Michael T. Dean
<mtdean@thirdcontact.com>wrote:

> On 08/22/2013 03:11 PM, Yeechang Lee wrote:
>
>> That said, I am not sure if the cause is necessarily OSD/theme-related
>> per se, or even with MythTV at all. I use two 0.26 frontends, one
>> Linux and one OS X. With the stock/fallback osd_subtitle.xml, both the
>> FreeMono and Droid Sans Mono fonts behave badly on the OS X frontend
>> (whether Jean-Yves' standalone or the MacPorts one). With FreeMono,
>> some punctuation marks are either partially obscured (question mark)
>> or don't appear at all (apostrophe, period). With Droid Sans Mono,
>> they appear but parts are cut off, as are other letters, notably the
>> capital W and capital O.
>>
>> Similar behavior occurs with other free mono fonts I've tested,
>> Liberation, DejaVu, and Ubuntu. Only the proprietary Bitstream Vera
>> Sans Mono--that Liberation and DejaVu are clones of--seems to appear
>> correctly on OS X, but of course we can't distribute it. Since, as I
>> mentioned, this only seems to occur on OS X, it's quite possibly an
>> Apple-specific font-rendering issue.
>>
>
> Oops. This reminds me that k-man on irc noticed that (sometimes? for some
> fonts? always?) the font face name is exposed differently on his Mac OS X
> system than on his GNU/Linux systems:
>
> http://irc.mythtv.org/ircLog/**channel/3/2011-08-15<http://irc.mythtv.org/ircLog/channel/3/2011-08-15>
>
> Try putting the .otf, .ttf, or .ttc file(s) for the fonts into your theme
> directory (at least temporarily) and running the frontend on both platforms
> with -v gui,file --loglevel debug and you should see information like:
>
> In file '<filename>', found font(s) <face name>'
> or
> Unable to register font(s) in file '<filename>'
>
> Do you get different face names or errors or anything? The log messages
> will show exactly what Qt gets from the underlying platform font managers.
> If they're different, we'd have to fix this with code (and it wouldn't be
> that much code--like I have no excuse for not having finished it in 2 years
> :( ). I still think the approach he asked for (and I described) in the IRC
> conversation is the best approach--basically a fallback face name approach,
> similar to that used by CSS.
>
> I'd also like Stuart Morgan's opinion on the approach before we put it in.
>
> It definitely sounds like a font substitution problem. Monospaced font
characters should obviously have the same width, and when they don't, it
can be a problem with the font definition (the font designer wasn't careful
about keeping monospacing), or there are missing characters that get
substituted from a similar font, or the entire font is substituted. I
expect it is the latter, because I am cursed with the ability to notice
miniscule deviations in alignment/spacing and it's been a long time since
I've seen any issues with FreeMono or Droid Sans Mono captions. Hopefully
Mike's suggestions can root out the root cause.

Jim
Re: Font face naming differences on different platforms (was Re: What fonts are guaranteed to be on a Linux box?) [ In reply to ]
not sure if this is relevant, but on my mac i have hundreds of those
line in the console output:

CoreText performance note: Client called CTFontCreateWithName() using
name "Arial" and got font with PostScript name "ArialMT". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.943 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.950 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "League Gothic"
and got font with PostScript name "LeagueGothic". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.954 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.955 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.957 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.958 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.959 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "League Gothic"
and got font with PostScript name "LeagueGothic". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.959 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "League Gothic"
and got font with PostScript name "LeagueGothic". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.960 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.962 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.962 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "League Gothic"
and got font with PostScript name "LeagueGothic". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.965 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "CartoGothic
Std" and got font with PostScript name "CartoGothicStd-Book". For best
performance, only use PostScript names when calling this API.

2013-08-23 01:45:38.977 mythfrontend[1566:303] CoreText performance
note: Client called CTFontCreateWithName() using name "Arial" and got
font with PostScript name "ArialMT". For best performance, only use
PostScript names when calling this API.

not sure if it's a Qt bug or what not. what's for sure with a theme
like MythAeon, fonts are rendered very differently and theres not
enough space to display the menu entries' so you see them scrolling
continuously...
_______________________________________________
mythtv-theming mailing list
mythtv-theming@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-theming