Open dhardy opened 3 years ago
In comparison, fontdb detects 220 fonts (all still under /usr/share/fonts
): one .ttc
file contains two faces with only one detected by this lib, otherwise I'm not quite sure where the count difference comes from.
In terms of properties, fontdb also doesn't detect any "oblique" fonts but does a better job of detecting weight and "condensed".
@RazrFalcon comparison table from fontdb for DejaVu fonts below.
name | family | style | weight | stretch | monospace | path | index |
---|---|---|---|---|---|---|---|
DejaVuSans-Bold | DejaVu Sans | Normal | Weight(700) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf | 0 |
DejaVuSans-BoldOblique | DejaVu Sans | Italic | Weight(700) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf | 0 |
DejaVuSans-ExtraLight | DejaVu Sans Light | Normal | Weight(200) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSans-ExtraLight.ttf | 0 |
DejaVuSans-Oblique | DejaVu Sans | Italic | Weight(400) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf | 0 |
DejaVuSans | DejaVu Sans | Normal | Weight(400) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSans.ttf | 0 |
DejaVuSansCondensed-Bold | DejaVu Sans Condensed | Normal | Weight(700) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf | 0 |
DejaVuSansCondensed-BoldOblique | DejaVu Sans Condensed | Italic | Weight(700) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSansCondensed-BoldOblique.ttf | 0 |
DejaVuSansCondensed-Oblique | DejaVu Sans Condensed | Italic | Weight(400) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf | 0 |
DejaVuSansCondensed | DejaVu Sans Condensed | Normal | Weight(400) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSansCondensed.ttf | 0 |
DejaVuSansMono-Bold | DejaVu Sans Mono | Normal | Weight(700) | Normal | TRUE | /usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf | 0 |
DejaVuSansMono-BoldOblique | DejaVu Sans Mono | Italic | Weight(700) | Normal | TRUE | /usr/share/fonts/dejavu/DejaVuSansMono-BoldOblique.ttf | 0 |
DejaVuSansMono-Oblique | DejaVu Sans Mono | Italic | Weight(400) | Normal | TRUE | /usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf | 0 |
DejaVuSansMono | DejaVu Sans Mono | Normal | Weight(400) | Normal | TRUE | /usr/share/fonts/dejavu/DejaVuSansMono.ttf | 0 |
DejaVuSerif-Bold | DejaVu Serif | Normal | Weight(700) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSerif-Bold.ttf | 0 |
DejaVuSerif-BoldItalic | DejaVu Serif | Italic | Weight(700) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSerif-BoldItalic.ttf | 0 |
DejaVuSerif-Italic | DejaVu Serif | Italic | Weight(400) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSerif-Italic.ttf | 0 |
DejaVuSerif | DejaVu Serif | Normal | Weight(400) | Normal | FALSE | /usr/share/fonts/dejavu/DejaVuSerif.ttf | 0 |
DejaVuSerifCondensed-Bold | DejaVu Serif Condensed | Normal | Weight(700) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSerifCondensed-Bold.ttf | 0 |
DejaVuSerifCondensed-BoldItalic | DejaVu Serif Condensed | Italic | Weight(700) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSerifCondensed-BoldItalic.ttf | 0 |
DejaVuSerifCondensed-Italic | DejaVu Serif Condensed | Italic | Weight(400) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSerifCondensed-Italic.ttf | 0 |
DejaVuSerifCondensed | DejaVu Serif Condensed | Normal | Weight(400) | SemiCondensed | FALSE | /usr/share/fonts/dejavu/DejaVuSerifCondensed.ttf | 0 |
In terms of properties, fontdb also doesn't detect any "oblique" fonts
Are you sure? Can you provide a test file, preferably on the fontdb
bug tracker.
Are you sure?
Assuming you have a Linux system, DejaVu fonts should already be installed? Several variants (see the table above) are named "oblique" and in appearance are "oblique" (just a slanted variant of the regular face), but are listed in the table above as "Italic". Also:
$ fc-list
..
/usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique
Edit: posted https://github.com/RazrFalcon/fontdb/issues/10, I think you can find the font file?
On my system this lib detects 194 fonts. Of these:
DontCare
(to be honest I'm not sure what behaviour is expected here)DontCare
I was considering how to select fonts using CSS-like properties (as in font-kit, implemented here and here). It appears that currently not enough properties are detected to do this. Are you planning on adding selection/matching logic?
Example: the DejaVu family: