[Pkg-fonts-devel] location of woff files
Nicolas Spalinger
nicolas_spalinger at sil.org
Wed May 31 10:46:01 UTC 2017
On 05/31/2017 12:17 PM, Fabian Greffrath wrote:
> Nicolas Spalinger wrote:
>> BTW I do appreciate all the work you have done in this team :-)
>
> Thank you very much! :)
:-D
>> I would simply like to point out what the official W3C WOFF spec says in
>> https://www.w3.org/TR/WOFF/
>
> Thank you for sharing this! I wasn't even aware of the fact that WOFF
> fonts are not meant to get exposed to general applications *by
> specification*. This changes things a lot...
>
>> Do we really expect every font to come with its own fontconfig snippet?
>
> No. In the light of this new information, I changed my mind and believe we
> should patch fontconfig (i.e. by adding a config snippet) to ignore fonts
> in WOFF/WOFF2 format altogether. I'd rather prefer to do this based on the
> actual fontformat property, but fontconfig seems to recognize WOFF files
> as "TrueType" (at least on the system that I currently have access to).
> Thus, we would have to filter out these fonts based on their file system
> path (or does <glob>*.woff</glob> work?), which is a bit ugly, but should
> be trivial to implement.
>
> Until this is done, I'd prefer if we could refrain from packaging WOFF
> fonts at all.
Great. It seems a glob works:
On a sid test instance I just installed a few of the packages which currently ship woff files in /usr/share/fonts/woff
root at sid:/usr/share/fonts/woff# tree
.
|-- andika
| `-- Andika-R.woff
|-- andikanewbasic
| |-- AndikaNewBasic-B.woff
| |-- AndikaNewBasic-BI.woff
| |-- AndikaNewBasic-I.woff
| `-- AndikaNewBasic-R.woff
|-- annapurna
| |-- AnnapurnaSIL-B.woff
| `-- AnnapurnaSIL-R.woff
|-- charis
| |-- CharisSIL-B.woff
| |-- CharisSIL-BI.woff
| |-- CharisSIL-I.woff
| `-- CharisSIL-R.woff
|-- fantasque-sans
| |-- FantasqueSans.woff
| |-- FantasqueSansMono-Bold.woff
| |-- FantasqueSansMono-BoldItalic.woff
| |-- FantasqueSansMono-Italic.woff
| `-- FantasqueSansMono-Regular.woff
`-- roboto-fontface
|-- Roboto-Black.woff
|-- Roboto-Black.woff2
|-- Roboto-BlackItalic.woff
|-- Roboto-BlackItalic.woff2
|-- Roboto-Bold.woff
|-- Roboto-Bold.woff2
|-- Roboto-BoldItalic.woff
|-- Roboto-BoldItalic.woff2
|-- Roboto-Light.woff
|-- Roboto-Light.woff2
|-- Roboto-LightItalic.woff
|-- Roboto-LightItalic.woff2
|-- Roboto-Medium.woff
|-- Roboto-Medium.woff2
|-- Roboto-MediumItalic.woff
|-- Roboto-MediumItalic.woff2
|-- Roboto-Regular.woff
|-- Roboto-Regular.woff2
|-- Roboto-RegularItalic.woff
|-- Roboto-RegularItalic.woff2
|-- Roboto-Thin.woff
|-- Roboto-Thin.woff2
|-- Roboto-ThinItalic.woff
`-- Roboto-ThinItalic.woff2
6 directories, 40 files
Then I put the following snippet in /etc/fonts/conf.d/70-no-woffs.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Reject WOFF fonts
We don't register WOFF(2) fonts with fontconfig because of the W3C spec -->
<selectfont>
<rejectfont>
<glob>/usr/share/fonts/woff/*</glob>
</rejectfont>
</selectfont>
</fontconfig>
And doing a fontconfig query I get:
root at sid:/usr/share/fonts/woff# fc-list
/usr/share/fonts/truetype/fantasque-sans/FantasqueSansMono-BoldItalic.ttf: Fantasque Sans Mono:style=Bold Italic
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/opentype/andika/Andika-R.ttf: Andika:style=Regular
/usr/share/fonts/opentype/charis/CharisSIL-BI.ttf: Charis SIL:style=Bold Italic
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/truetype/fantasque-sans/FantasqueSansMono-Italic.ttf: Fantasque Sans Mono:style=Italic
/usr/share/fonts/opentype/andikanewbasic/AndikaNewBasic-R.ttf: Andika New Basic:style=Regular
/usr/share/fonts/truetype/roboto-fontface/Roboto-Regular.ttf: RobotoRegular:style=Regular
/usr/share/fonts/truetype/roboto-fontface/Roboto-Light.ttf: Roboto,RobotoLight:style=Light,Regular
/usr/share/fonts/truetype/roboto-fontface/Roboto-Medium.ttf: Roboto,RobotoMedium:style=Medium,Regular
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/truetype/roboto-fontface/Roboto-Black.ttf: Roboto,RobotoBlack:style=Black,Regular
/usr/share/fonts/opentype/charis/CharisSIL-B.ttf: Charis SIL:style=Bold
/usr/share/fonts/opentype/andikanewbasic/AndikaNewBasic-I.ttf: Andika New Basic:style=Italic
/usr/share/fonts/truetype/roboto-fontface/Roboto-BlackItalic.ttf: Roboto,RobotoBlackItalic:style=Black Italic,Italic
/usr/share/fonts/truetype/fantasque-sans/FantasqueSans.ttf: FantasqueSans:style=Medium
/usr/share/fonts/truetype/roboto-fontface/Roboto-Thin.ttf: Roboto,RobotoThin:style=Thin,Regular
/usr/share/fonts/truetype/roboto-fontface/Roboto-Bold.ttf: RobotoBold:style=Bold
/usr/share/fonts/truetype/roboto-fontface/Roboto-RegularItalic.ttf: RobotoItalic:style=Italic
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/share/fonts/truetype/roboto-fontface/Roboto-BoldItalic.ttf: RobotoBoldItalic:style=Bold Italic
/usr/share/fonts/opentype/andikanewbasic/AndikaNewBasic-BI.ttf: Andika New Basic:style=Bold Italic
/usr/share/fonts/opentype/charis/CharisSIL-I.ttf: Charis SIL:style=Italic
/usr/share/fonts/opentype/annapurna/AnnapurnaSIL-R.ttf: Annapurna SIL:style=Regular
/usr/share/fonts/opentype/annapurna/AnnapurnaSIL-B.ttf: Annapurna SIL:style=Bold
/usr/share/fonts/truetype/roboto-fontface/Roboto-LightItalic.ttf: Roboto,RobotoLightItalic:style=Light Italic,Italic
/usr/share/fonts/truetype/roboto-fontface/Roboto-ThinItalic.ttf: Roboto,RobotoThinItalic:style=Thin Italic,Italic
/usr/share/fonts/opentype/charis/CharisSIL-R.ttf: Charis SIL:style=Regular
/usr/share/fonts/truetype/roboto-fontface/Roboto-MediumItalic.ttf: Roboto,RobotoMediumItalic:style=Medium Italic,Italic
/usr/share/fonts/truetype/fantasque-sans/FantasqueSansMono-Bold.ttf: Fantasque Sans Mono:style=Bold
/usr/share/fonts/truetype/fantasque-sans/FantasqueSansMono-Regular.ttf: Fantasque Sans Mono:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book
/usr/share/fonts/opentype/andikanewbasic/AndikaNewBasic-B.ttf: Andika New Basic:style=Bold
So I think you solution works well. Thanks.
> The actual change should be a simple patch against the fontconfig package.
> I am not sure, though, if this will qualify as a last-minute freeze
> breaking change? NB: the fontconfig package seeme to be maintained by NMUs
> most recently, maybe we should kindly ask to adopt it for the pkg-fonts
> team?
>
> Cheers,
>
> - Fabian
Thanks,
Nicolas
More information about the Pkg-fonts-devel
mailing list