[OpenFontLibrary] Font previewer requirements
Nicolas Mailhot
nicolas.mailhot at laposte.net
Tue Feb 17 01:09:13 PST 2009
Le Jeu 12 février 2009 22:22, Ed Trager a écrit :
>
> Hi, all,
Hi,
Sorry for slacking on the answer,
> OK, I'll try to clarify ...
>
> On Wed, Feb 11, 2009 at 10:47 PM, <Fontfreedom at aol.com> wrote:
>>>> A good static previewer:
>>>
>>>Ed Trager's upcoming "Fontaine" ought to be helpful here :-)
>>
>> Does that have a webpage?
>>
>
> There are a number of different programs being developed for the the
> OFLB web site:
>
> FONTAINE:
> -------------
>
> This is a new program I'm writing initially for the OFLB project. The
> software is getting close to a releasable stage, but I haven't
> released it yet. The primary license will be GPL v. 2.0 or any later
> version. I am thinking of creating a SourceForge project for SVN
> hosting of fontaine, but I haven't got that far yet.
>
> Fontaine is a command-line utility that displays key meta information
> about font files, including but not limited to font name, style,
> weight, glyph count, character count, copyright, license information
> and orthographic coverage.
This part seems do do the same thing that the fc-query command Behdad
added to fontconfig recently. Since fc-query gives you the fontconfig
script coverage view, that a lot of apps will use (including on
non-windows platforms), I feel it would be better to enhance fc-query
output if it's lacking for whatever reason.
A new fontconfig release has been announced soonish, so now is the
good time to send Behdad patches.
> To facilitate different usage scenarios, fontaine produces reports in
> JSON (default), XML, XHTML, and TEXT formats. In the code, there is a
> base "MLR" ("markup language report") class from which specific
> reporting classes like JSON and XML are derived. This architecture
> should make it easy to create additional report formats if needed.
Apart from the TEXT format that fc-query also does this does not look
terribly useful in a non-dynamic-web context
> Fontaine's orthography database includes "sample sentences" and
> "sample characters" for each orthography. For many orthographies, the
> "sample sentence" (or sometimes more than one sentence) is actually a
> pangram. However, since many orthographies, such as Chinese and
> Japanese, don't support "pangrams" per se, I just use the more general
> term "sample sentence" which works across all orthographies. I
> provide instances of pangrams for those orthographies where I have
> been able to locate them. Future community contributions will
> certainly be valuable in expanding and vetting the orthography data
> that I have compiled so far.
The sample database looks nice and would definitely be something
needed for a static previewer too.
> The plan is that report output from Fontaine can be used as input to
> generate a font preview image. The font preview image can be
> generated from one or more of the sample sentences (pangrams) or
> sample character strings provided by fontaine. A separate program
> --such as PCFP (below)-- is used to create the preview graphic.
>
> I am still thinking about how this last step should best be handled.
> At issue is the fact that most of the good modern Open Source fonts
> provide coverage for a number of different orthographic categories.
> For example, a font like SIL's Gentium covers many different Latin
> orthographies (incl. but not limited to Western Latin, Central
> European, Turkish, and Vietnamese), plus both monotonic and polytonic
> Greek, plus Cyrillic, and more. So how do you choose one
> representative pangram or sample character string for use as the
> default static font preview ?
This IMHO is the most difficult but also the most useful thing a
static previewer needs: good heuristics to choose the correct samples
to display automatically
> PCFP
> ------
>
> "pcfp" stands for "Pango-Cairo Font Playground". Pcfp is a simple
> command-line utility I wrote to take a font specification and a text
> string on the command line and render the text in the specified font
> to a PNG (portable networks graphics) canvas. The dynamic font
> previewer currently on http://openfontlibrary.fontly.org/ uses pcfp on
> the server. One significant advantage of pcfp is that complex scripts
> like Arabic and Devanagari are rendered correctly -- because of Pango
> of course. Pcfp is released under GPL v.2.0 or any later version.
PNG is nice but is pixel-density dependent and the hardware is moving
the other way, especially in the embedded space. svgz shapes would be
much better in a non-web scenario (I agree that a web scenario
probably needs to take IE into account).
> "Font Playground" and "Key Curry"
> -------------------------------------------
>
> A browser-based dynamic font previewer requires an AJAX-based
> Javascript program on the client side.
This part is clearly dynamic web only so it's useless in my context.
So, to sum up:
1. the property detection part of fontaine should IMHO better be
integrated to fc-query
2. the samples database is nice, but it seems fontaine-dependant, when
we want to stay as close to fontconfig as possible. Also it's missing
the critical sample choosing heuristics needed in a fully automated
workflow
3. pcfp looks something we could use, it it had a svgz output
Thank you very much for posting on your advancement. It's not really
what we need Fedora-side now, but some bits look close, and I hope
someone will contribute the needed changes so they can be used in
non-OFLB context too.
Regards,
--
Nicolas Mailhot
More information about the OpenFontLibrary
mailing list