From Fedora Project Wiki

(Redirected from Classroom/FontsClass)

A page of the Fonts Special Interest Group

Making text exquisite, worldwide: packaging Fonts in Fedora


A Fedora classroom
This IRC session occured on 2008-12-07 as part of the Fedora Classroom program.


---nirik has changed the topic to: Fedora IRC Classroom - Making text exquisite, worldwide — packaging fonts in Fedora with your teacher Nicolas Mailhot (nim-nim) - See https://fedoraproject.org/wiki/Communicate/IRC/Classroom for schedule of classes today. Dec 07 05:15
-->iondrip (n=nibbler@77.221.0.247) has joined #fedora-classroom Dec 07 05:15
nirik take it away nim-nim... Dec 07 05:15
nim-nim nirik: ok thanks Dec 07 05:15
nim-nim welcome everyone Dec 07 05:15
nim-nim the next hour will be dedicated to fonts packaging in Fedora Dec 07 05:16
nim-nim there are many aspects to fonts packaging Dec 07 05:16
nim-nim like why package fonts, how to package them, what are the usual problems Dec 07 05:16
-->openpercept (n=openperc@unaffiliated/openpercept) has joined #fedora-classroom Dec 07 05:17
nim-nim and I'll orient the session depending on the audience questions Dec 07 05:17
nim-nim so before I start, are there any special questions you want treated today? Dec 07 05:17
*nirik notes that packaging fonts is a great way to get into packaging in fedora... Dec 07 05:18
nim-nim nirik: thank you Dec 07 05:18
nim-nim anyone else? Dec 07 05:18
dgrift yes Dec 07 05:19
dgrift is there an example for a spec file? Dec 07 05:19
pierremarc I’ve some, "Fedora packages and rest of the world" Dec 07 05:19
<--hanthana has quit (Read error: 113 (No route to host)) Dec 07 05:19
pierremarc dgrift: http://fedoraproject.org/wiki/Packaging/FontsSpecTemplate Dec 07 05:19
dgrift thanks Dec 07 05:19
nim-nim dgrift, pierremarc: thanks, I'll try to treat this Dec 07 05:20
nim-nim if anyone else has a specific question do not hesitate to interupt me Dec 07 05:20
nim-nim anyway, let's start Dec 07 05:20
nim-nim why package fonts: Dec 07 05:20
nim-nim our computer interaction is ovewhelmingly text-based Dec 07 05:21
nim-nim without fonts you can not display text Dec 07 05:21
nim-nim fonts are difficult for users to find and install Dec 07 05:21
nim-nim legaly Dec 07 05:21
nim-nim (this is Fedora) Dec 07 05:21
nim-nim For example the Vista font pack can only be bought with Vista or by paying something like ~ 300$ to Ascender Dec 07 05:22
nim-nim And thus Fedora needs to provide a good font complement by default for our users Dec 07 05:23
nim-nim because we do not want them to waste time looking for fonts Dec 07 05:23
nim-nim or getting sued because they used a random font on the Internet which happened to be protected Dec 07 05:23
nim-nim this is especially true for "free" font sites like dafont, but also for historic Linux font sources Dec 07 05:24
nim-nim When Xorg was audited for Fedora 9 we had to drop the historic Red Hat default font, Luxi, for licensing reasons Dec 07 05:25
-->LonelySpooky (n=lonely@201.29.91.28) has joined #fedora-classroom Dec 07 05:25
-->neverho0d (n=psv@62.68.142.85) has joined #fedora-classroom Dec 07 05:25
nim-nim the other historic font source for Linux is TEX, and the current legal audit looks grim Dec 07 05:25
nim-nim so there is a big need to package new clean fonts Dec 07 05:25
nim-nim especially since some of them are needed by populations which had no computer access before unicode standardised their script Dec 07 05:26
nim-nim and now it *is* standardised, we need to find fonts that support the new official encoding Dec 07 05:26
nim-nim so people can read their own language Dec 07 05:27
nim-nim (the next i18n steps being addition of an input method and general distribution localisation) Dec 07 05:27
nim-nim but it all starts from fonts Dec 07 05:27
-->tom_ (n=tom@p5B20FC7E.dip.t-dialin.net) has joined #fedora-classroom Dec 07 05:27
nim-nim also, sometimes specialised communities need a special font Dec 07 05:27
nim-nim we need to provide them too Dec 07 05:28
nim-nim for example Dec 07 05:28
-->relayer370 (n=relayer@ip68-110-19-72.om.om.cox.net) has joined #fedora-classroom Dec 07 05:28
nim-nim http://www.jem-thematic.net/fi/node/538 Dec 07 05:28
nirik question: should we want to package any legally available font, or are some better than others? is there any way to tell? Or is better all subjective? Dec 07 05:28
abattis i think any legally available font Dec 07 05:28
abattis at the first order Dec 07 05:28
nim-nim nirik: the vast majority of fonts is not legally available Dec 07 05:29
nim-nim that reduces the scope a lot Dec 07 05:29
*nirik nods. Dec 07 05:29
abattis but, if there is say gentium and a fork of gentium, it would be good to try and get the forked version merged upstream if it is not radically different Dec 07 05:29
nim-nim and then of course you can always ask on the fonts SIG mailing list where to start from Dec 07 05:29
abattis this must all happen from discussion with devlopers Dec 07 05:29
nim-nim but we tend to let people package the fonts they want to package Dec 07 05:29
nim-nim not tell them "forget about your font, package this one instead" Dec 07 05:30
<--stmg has quit (Read error: 113 (No route to host)) Dec 07 05:30
nim-nim art people will want to package decorative fonts, i18n people to increase the unicode coverage of the distribution Dec 07 05:31
nim-nim I'm personnaly more on the i18n part Dec 07 05:31
nim-nim For people who haven't seen it, here is the current Fedora font wishlist Dec 07 05:31
nim-nim http://fedoraproject.org/wiki/Category:Font_wishlist Dec 07 05:31
nim-nim pierremarc: does that answer your question? Dec 07 05:32
pierremarc not yet :) Dec 07 05:32
nim-nim pierremarc: can you expand on it a bit then? Dec 07 05:32
pierremarc Mainly on the question of Fedora packages and rest of the world. Dec 07 05:32
pierremarc example: at http://fedoraproject.org/wiki/Packaging/FontsSpecTemplate I see that packagers are invited and guided to file the %description field of the spec file. As TTFs have such an entry in NAME table, how would it be possible to have both fields synced, and even better, description made available upstream (as it’s rarely filed by font "maker"). Dec 07 05:32
pierremarc Panose: Riku found an LGPL piece of code that implements Panose algo. to compute distance between 2 Panose numbers. We quickly experimented it in fontmatrix and it rocks, modulo non {O,T}TFs fonts and those which have inconsistant Panose number. Could it be a requirement (AFAIK it used to be for windows fonts) or any other means which would provide an equivalent service? Dec 07 05:32
pierremarc I know, since you’ve wrote it a couple of time, that you’re not fond of embedded meta-data in font files. But you did always have a strong requirement only for separate Licence text file, wouldn’t not be possible to have complete meta-data human readble text file and a set of utilities to merge it in a font file? Dec 07 05:32
pierremarc i’ve prepared them Dec 07 05:32
nim-nim pierremarc: well, this is more an "how" question than a "why" question Dec 07 05:33
nim-nim pierremarc: I start on "how" then Dec 07 05:34
-->sertac (n=sertac@88.254.214.230) has joined #fedora-classroom Dec 07 05:34
nim-nim as most of you know, Fedora uses the rpm package format Dec 07 05:34
nim-nim creating an rpm is more or less writing a "spec" file, that references an external archive Dec 07 05:35
nim-nim adds some information about what is in the archive Dec 07 05:35
nim-nim and tells rpm how to build files and deploy them on the system Dec 07 05:35
nim-nim as nirik noted, fonts tend to have very simple deployment requirements Dec 07 05:36
nim-nim so packaging a few fonts is a great way to learn Fedora packaging Dec 07 05:36
nim-nim and get involved in Fedora Dec 07 05:36
nim-nim you usually don't have the build complexity found in most packages Dec 07 05:37
nim-nim the current Fedora font spec template is here http://fedoraproject.org/wiki/Packaging/FontsSpecTemplate Dec 07 05:37
nim-nim in the Fedora fonts sig Packaging section Dec 07 05:38
nim-nim http://fedoraproject.org/wiki/Category:Fonts_packaging Dec 07 05:38
nim-nim you can find real-world instanciations of this template in the Fedora cvs Dec 07 05:38
nim-nim for example http://cvs.fedoraproject.org/viewvc/devel/gfs-neohellenic-fonts/gfs-neohellenic-fonts.spec?revision=1.5&view=markup Dec 07 05:39
nim-nim we've spent a lot of time making it as simple as possible Dec 07 05:40
nim-nim for fedora 11 we plan to make it even simpler by moving some script complexity out of the template Dec 07 05:40
nim-nim the current project is here http://nim.fedorapeople.org/fontpackages/fontpackages-1.10.tar.bz2 Dec 07 05:41
nim-nim pierremarc: we would welcome tools to add to this project Dec 07 05:41
nim-nim pierremarc: that helped populate a template from font metadata information Dec 07 05:41
pierremarc Ah, could be done easily, will do it tonight. Dec 07 05:42
nim-nim pierremarc: or conversely transform information in a spec file in something that can be injected in the font files Dec 07 05:42
pierremarc that’s harder :) Dec 07 05:42
pierremarc but can be done too Dec 07 05:42
nim-nim the spec files are usually in English only Dec 07 05:43
nim-nim but once published, they are translated by the fine Fedora localization teams Dec 07 05:43
nim-nim dgrift: I think we're getting to your kind of question here Dec 07 05:43
nim-nim dgrift: do you have any specific question about our font template(s) ? Dec 07 05:44
nim-nim anyone else? Dec 07 05:44
-->linuxguru (n=linuxgur@123.236.34.68) has joined #fedora-classroom Dec 07 05:45
nim-nim ok, I'll do a very short description then Dec 07 05:45
nim-nim if you open the http://nim.fedorapeople.org/fontpackages/fontpackages-1.10.tar.bz2 archive Dec 07 05:46
nim-nim and look at the "simple" spec template in the spec-templates/ directory Dec 07 05:46
nim-nim you see a spec template is basically Dec 07 05:47
nim-nim 1. metadata declaration Dec 07 05:47
nim-nim 2. build information Dec 07 05:47
nim-nim 3. changelog Dec 07 05:47
nim-nim the first easy part is the metadata Dec 07 05:48
nim-nim how the package will be named, what its version is, etc Dec 07 05:48
dgrift nim-nim no its all clear, a good spec speaks a thousand words Dec 07 05:48
dgrift was a bit pre-occupied sorry Dec 07 05:49
nim-nim dgrift: no problem Dec 07 05:49
nim-nim dgrift: I'll still do it quickly for others Dec 07 05:49
dgrift thanks Dec 07 05:49
nim-nim to make life easier for our users we have some conventions Dec 07 05:49
nirik nim-nim: do you have a direct url link to the simple template you are talking about? (to help folks follow along) Dec 07 05:49
nim-nim nirik: not really, if you can do one while I write that would be neat Dec 07 05:50
nirik sure. no prob. Dec 07 05:50
nim-nim a font package is named something-fonts Dec 07 05:50
nim-nim with something being foundryname-fontname Dec 07 05:51
nim-nim what foundryname is is sometimes open to discussions Dec 07 05:51
nim-nim ask on the list http://fedoraproject.org/wiki/Category:Fonts_SIG Dec 07 05:51
nim-nim also, when fontname includes font or fonts we really do not want to repeat it Dec 07 05:52
nim-nim so please do not propose foofont-fonts packages but only foo-fonts packages Dec 07 05:52
nim-nim the next tricky bit is the version Dec 07 05:52
nirik http://www.scrye.com/~kevin/fedora/fontpackages-1.10/spec-templates/spectemplate-fonts-simple.spec Dec 07 05:53
nim-nim nirik: thanks Dec 07 05:53
nirik (of course get the latest version from the tar.bz2 on nim-nim's page) Dec 07 05:53
nim-nim many font projects publish all their font changes with the same version Dec 07 05:53
<--BlinkyToon has quit (Read error: 110 (Connection timed out)) Dec 07 05:53
nim-nim usually 1.0 Dec 07 05:53
nim-nim when you're not sure a font version is not a perpetual 1.0 Dec 07 05:53
nim-nim save yourself grief and use the timestamp of the most recent font file as version Dec 07 05:54
-->BlinkyToon (n=MichaelW@200.87.191.64) has joined #Fedora-classroom Dec 07 05:54
nim-nim for example 20081207 Dec 07 05:54
nim-nim this is what the gfs spec does Dec 07 05:54
nim-nim http://cvs.fedoraproject.org/viewvc/devel/gfs-neohellenic-fonts/gfs-neohellenic-fonts.spec?revision=1.5&view=markup Dec 07 05:55
<--tom_ has quit ("Ex-Chat") Dec 07 05:55
nim-nim the next interesting bit is the license Dec 07 05:55
nim-nim we require in Fedora fonts that can be re-distributed Dec 07 05:55
nim-nim without commercial clauses or not Dec 07 05:55
nim-nim and fonts that can be modified Dec 07 05:55
nim-nim including existing glyphs Dec 07 05:56
nim-nim this is because otherwise the packages can not be used by Fedora derivatives like OLPC or RHEL Dec 07 05:56
nim-nim and if users report problems with a font, we want to be able to fix it Dec 07 05:56
nim-nim even if the font original author is not cooperating Dec 07 05:57
nim-nim this is why the vast majority of fonts is not packageable in Fedora Dec 07 05:57
nim-nim Sometimes a font author will publish a font on his web site Dec 07 05:57
nim-nim and just mark "free font" Dec 07 05:58
nim-nim this is not good enough for us Dec 07 05:58
nim-nim the author needs to be politely contacted to add an actual licensing declaration next to his fonts Dec 07 05:58
nim-nim in detached txt format Dec 07 05:58
nim-nim acceptable licenses and other legal considerations are here http://fedoraproject.org/wiki/Legal_considerations_for_fonts Dec 07 05:59
nim-nim lastly, for the description and summary of the font Dec 07 06:00
nim-nim 1. the summary must be short, and help users to decide if they need a font or not Dec 07 06:00
nim-nim (typically font style and coverage) Dec 07 06:00
nim-nim 2. the description must expand Dec 07 06:01
nim-nim It's considered good form to detail the history of a font in the description Dec 07 06:01
nim-nim and tell who the original designer was Dec 07 06:01
nim-nim (that costs little and make designers happy with us; also researching font history is a good way to check it didn't copy material under a forbidden license) Dec 07 06:02
nim-nim that's all for the metadata part Dec 07 06:02
nim-nim for the build part Dec 07 06:02
nim-nim we like free fonts in sfd (fontforge) format Dec 07 06:03
nim-nim and we like to rebuild them in the package to make sure there is no missing magic in the sfd->ttf or otf transformation Dec 07 06:03
nim-nim (for the day we'll need to bugfix a font) Dec 07 06:04
nim-nim unfortunately there are no conventions on font building Dec 07 06:04
nim-nim let's just say the ideal case is a font project in sfd form that provides a makefile Dec 07 06:04
dgrift is there an example of this? Dec 07 06:05
nim-nim so just doing "make" creates the fonts from sfd sources Dec 07 06:05
nim-nim dgrift: the dejavu and liberation fonts used makefiles Dec 07 06:05
dgrift ill get the source rpm thanks Dec 07 06:05
dgrift and inspect it Dec 07 06:05
nim-nim dgrift: the incosolata, thibault, etc fonts do not have any makefile and have in-spec build instructions Dec 07 06:06
dgrift thanks Dec 07 06:06
nim-nim dgrift: writing a good makefile for upstream and getting them to include it is very much appreciated Dec 07 06:06
nim-nim our Debian friends have started working on a font project template Dec 07 06:06
dgrift why not use the one for liberation fonts? Dec 07 06:07
dgrift is it even possible to make a generic makefile? Dec 07 06:07
nim-nim helping them finish it and evangeise it would be appreciated too Dec 07 06:07
nim-nim dgrift: you certainly should not need to start from scratch for every project like today Dec 07 06:07
dgrift true, i will have a closer look, thanks Dec 07 06:08
dgrift thats true for all projects imo Dec 07 06:08
nim-nim http://fedoraproject.org/wiki/Archive_template_for_fonts Dec 07 06:08
nim-nim anyway, after the build part we get to the install part Dec 07 06:09
nim-nim this is what is very distro-specific Dec 07 06:09
nim-nim and what will change in Fedora 11 Dec 07 06:09
nim-nim previously we let much leeway to font packagers Dec 07 06:09
nim-nim and they happily used it to shot themselves in the feet Dec 07 06:09
nim-nim now we'll try to make everyone use the same simple rules Dec 07 06:10
nim-nim 1. install the (built) font files in a standard directory Dec 07 06:10
nim-nim 2. install the fontconfig files in a standard directory Dec 07 06:10
nim-nim 3. and link them to the contconfig config dir Dec 07 06:11
dgrift does this: http://cvs.fedoraproject.org/viewvc/ template take these rules into account already? Dec 07 06:11
nim-nim if you look at the simple template there is really little that need to be changed for different projects Dec 07 06:12
nim-nim dgrift: unfortunately with the F10 release the Fedora entity in charge of approving packaging changes has not convened in the past weeks Dec 07 06:12
nim-nim dgrift: it should state next tuesday if it's ok with the proposed changes Dec 07 06:13
dgrift alright thanks Dec 07 06:13
nim-nim dgrift: IMHO it will at most propose a few tweaks Dec 07 06:13
<--BlinkyToon has quit (Read error: 110 (Connection timed out)) Dec 07 06:13
nim-nim anyway, looking at the template, you need to change at most the location of the built fonts Dec 07 06:14
-->BlinkyToon (n=MichaelW@200.87.191.64) has joined #Fedora-classroom Dec 07 06:14
nim-nim *.ttf -> *.otf or build/*.ttf Dec 07 06:14
nim-nim and the rest should just work for most projects Dec 07 06:14
nim-nim FYI when I review new font packages I do a visual diff in meld with the Fedora templates Dec 07 06:15
nim-nim and I don't like changes without justification Dec 07 06:15
nirik nim-nim: since we are almost out of time... where can people find more info and get involved? the fedora-fonts list? Dec 07 06:15
nim-nim nirik: I still have 15min, no? Dec 07 06:16
nirik nim-nim: yeah, although we had time as a break between sessions... so folks could go get a cup of coffee, etc... ;) Dec 07 06:16
nim-nim nirik: it's a no-coffee session :p Dec 07 06:17
nirik No worries. :) Dec 07 06:17
nim-nim anyway, as nirik stated the way to get more info is always to ask on the Fedora fonts list Dec 07 06:17
nim-nim it's low traffic Dec 07 06:17
nirik that list is available at: http://www.redhat.com/mailman/listinfo/fedora-fonts-list Dec 07 06:18
nim-nim but not because we bang on posters Dec 07 06:18
nim-nim more because we have lots of documentation in the wiki Dec 07 06:18
nim-nim but do ask! Dec 07 06:18
nim-nim another less reliable channel is the ##fonts irc channel Dec 07 06:18
zcat nim-nim, would it be possible to get an explanation of how fontconfig works, with all the conf.avail conf's, etc, or is that too unrelated to the packaging topic? :) Dec 07 06:19
nim-nim (with two #) Dec 07 06:19
nim-nim zcat: ok, I'll try if niriks lets me Dec 07 06:19
nim-nim the last bit of the new template is the %_font_pkg macro Dec 07 06:19
nim-nim it does gorry stuff like calling fc-cache at the right time Dec 07 06:20
nim-nim and takes a fontconfig file as (optional) argument Dec 07 06:20
nim-nim fontconfig is the current *nix font selection system Dec 07 06:20
nim-nim it's a set of xml rules, so applications can ask fontconfig "the user wants font A, what font file should I use"? Dec 07 06:21
nim-nim font A can be a font not installed on the system Dec 07 06:21
nim-nim or a fake font such as "sans" Dec 07 06:21
nim-nim to help fontconfig make the right decisions with your fonts we strongly suggest adding a fontconfig file to your package Dec 07 06:22
nim-nim and pushing it upstream so it gets included in the next font release Dec 07 06:22
nim-nim fontconfig syntaw can be obscure Dec 07 06:22
nim-nim so we've added a few templates to the fontpackages archive Dec 07 06:23
zcat nim-nim, (thanks. that's about the extent of what i know about fontconfig. you can ask it, for example "fc-match Sans" and it'll spit that it's using DejaVu) Dec 07 06:23
nim-nim http://nim.fedorapeople.org/fontpackages/fontpackages-1.10.tar.bz2 Dec 07 06:23
nim-nim they're in the fontconfig-templates directory Dec 07 06:23
nim-nim they're all organised as Dec 07 06:24
nim-nim 1. an xml .conf template Dec 07 06:24
nim-nim 2. a .txt explanation Dec 07 06:24
nim-nim if you look at the basic-font-template template Dec 07 06:24
-->mizmo (n=duffy@c-66-31-44-241.hsd1.ma.comcast.net) has joined #fedora-classroom Dec 07 06:24
nim-nim you see we typically declare two rules for a font Dec 07 06:25
nim-nim the first one makes your font available in one of the generic lists (sans, serif, etc) Dec 07 06:26
<--nuonguy has quit ("This computer has gone to sleep") Dec 07 06:26
nim-nim the second one tells fontconfig it should complete the font with glyphs taken from one of those lists Dec 07 06:26
nim-nim there are several more complex templates in the archive Dec 07 06:26
nim-nim take a look at them Dec 07 06:26
nim-nim and ask questions in the list as needed Dec 07 06:27
nim-nim the only remaining important thing to know about fontconfig Dec 07 06:27
*nirik notes 3min to next class... shall we stop here and provide a little break? Dec 07 06:27
nim-nim is it merges configuration rules by configuration file name Dec 07 06:27
nim-nim thus a rule in file 01-* and a rule in file 02-* will be processed like rule in file 1 followed by rule in file 2 Dec 07 06:28
dgrift nim-nim in your opinion which font package is the best current example? liberation fonts? Dec 07 06:28
nim-nim dgrift: dejavu is pretty good for a complex package Dec 07 06:28
dgrift thanks Dec 07 06:29
nim-nim the gfs fonts are good for simple packages Dec 07 06:29
nim-nim in http://nim.fedorapeople.org/fontpackages/ you have examples of packages converted to the new templates Dec 07 06:29
nim-nim and I think I'll stop here before nirik cuts us Dec 07 06:29
---nirik has changed the topic to: Fedora IRC Classroom - Short Break between classes - See https://fedoraproject.org/wiki/Communicate/IRC/Classroom for schedule of classes today. Dec 07 06:29
SSlater Thanks nim-nim. Dec 07 06:29
nim-nim do anyone has a remaining questin? Dec 07 06:29
dgrift is there a font package wish list? Dec 07 06:29
nirik thanks nim-nim ! Dec 07 06:30
nim-nim dgrift: there is here http://fedoraproject.org/wiki/Category:Font_wishlist Dec 07 06:30
dgrift thanks Dec 07 06:30
nirik we will take a short break before the next class... How to wow your friends with awesome Gimp tricks with Máirín Duffy Dec 07 06:30
mizmo back in 15 minutes? Dec 07 06:30
ivazquez 15 sounds good. Dec 07 06:31
mizmo k Dec 07 06:31
nirik sounds fine. 15min it is. Dec 07 06:31
nim-nim you have 15min to sneak in more font questions :p Dec 07 06:32
dgrift any more important urls you can share on the record nim-nim? Dec 07 06:34
nim-nim dgrift: everything should be reachable from the SIG start page Dec 07 06:35
dgrift ok thanks Dec 07 06:35
nim-nim just type "Fonts SIG" in google Dec 07 06:35
nim-nim you just need to drill a bit Dec 07 06:36
dgrift yes Dec 07 06:36
nim-nim we've written quite a lot of documentation in the past years Dec 07 06:36
nim-nim when in doubt, ask the list Dec 07 06:36
nim-nim dgrift: the most important page for a new packager is probably Dec 07 06:38
nim-nim http://fedoraproject.org/wiki/Font_package_lifecycle Dec 07 06:38
dgrift bookmarking , thanks Dec 07 06:39

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!


Fonts in Fedora
The Fonts SIG takes loving care of Fedora fonts. Please join this special interest group if you are interested in creating, improving, packaging, or just suggesting a font. Any help will be appreciated.