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

Bug#696385: RFS: astromenace/1.3.1+ds-1 [ITP] -- hardcore 3D space shooter with spaceship upgrade possibilities



On Thu, Apr 4, 2013 at 7:15 PM, Boris Pek wrote:

> I saw a lot of your messages related to fonts in Debian, also there was one
> or few posts in your blog (I do not remember precisely). So it looks that
> your well versed in this matter.
>
> Could you comment our discussion about astromenace-data package? Quotation:

I would simply echo what I wrote on the freedesktop wiki (slightly reworded):

Render text at runtime (enables i18n) or maybe build time. Use the
system fonts. If you choose a specific font then use fontconfig to
find it rather than bundling it with your project. If you create your
own special font, please distribute it in source form (for example
FontForge text format) and ensure that it can be built using free
tools. When you enable i18n your chosen font probably won't have all
the required characters so your text rendering system should be
prepared to fall back on other fonts on the system.

http://www.freedesktop.org/wiki/Games/Upstream

If you are involved with upstream or can get a patch included, the
best way to follow my advice is to use one of the Qt, pango or
QuesoGLC libraries (or toolkits/wrappers that use them) to render text
at runtime. Any other option is suboptimal. In addition, this being
Debian, we have dependencies and should use them to pull in fonts.
Here is an example of how to do that:

http://sourceforge.net/p/chromium-bsu/code/ci/master/tree/src/TextGLC.cpp
http://anonscm.debian.org/viewvc/pkg-games/packages/trunk/chromium-bsu/debian/control?view=markup

If you are looking for a simple workaround for upstream not rendering
text this way, Built-Using seems like a reasonable compromise. I'm not
sure if it works with non-free packages, check with the ftpmasters.

http://wiki.debian.org/Teams/FTPMaster

Honestly though, if upstream is bundling font files in a binary blob
then probably using fontconfig to find the right font files
automatically from the system fonts catalog is going to be very easy
and fit reasonably well to the current code. Based on the astromenace
control file it looks like upstream is using freetype, I'm guessing
they use FT_New_Memory_Face to load the fonts. To implement this, you
would need to switch to FT_New_Face and use fontconfig to feed the
font filename to FT_New_Face. To find out the font filename from the
font name using fontconfig check out the chromium-bsu code again:

http://www.freetype.org/freetype2/docs/tutorial/step1.html
http://sourceforge.net/p/chromium-bsu/code/ci/master/tree/src/TextFTGL.cpp#l91

I'm subscribed to the list, no need to CC.

-- 
bye,
pabs

http://wiki.debian.org/PaulWise


Reply to: