Comments (10)
Ah, this will be better. I've got so much time in figuring out this fontconfig in the first place, I didn't think about the conf.d
. Reference from 50-user.conf
:
<!--
Load per-user customization files where stored on XDG Base Directory
specification compliant places. it should be usually:
$HOME/.config/fontconfig/conf.d
$HOME/.config/fontconfig/fonts.conf
-->
<include ignore_missing="yes" prefix="xdg">fontconfig/conf.d</include>
<include ignore_missing="yes" prefix="xdg">fontconfig/fonts.conf</include>
Looking at /etc/fonts/conf.d/README
:
Files begining with: Contain:
00 through 09 Font directories
10 through 19 system rendering defaults (AA, etc)
20 through 29 font rendering options
30 through 39 family substitution
40 through 49 generic identification, map family->generic
50 through 59 alternate config file loading
60 through 69 generic aliases, map generic->family
70 through 79 select font (adjust which fonts are available)
80 through 89 match target="scan" (modify scanned patterns)
90 through 99 font synthesis
Starting the filename with 10 isn't correct. The Arch packages use a fontconfig starting with 35. I'd like to make the provided fontconfig file usable for both user-only and system-wide installs.
This blocks #9
from emojione-color-font.
DejaVu uses 57 and 58:
57-dejavu-sans.conf
57-dejavu-sans-mono.conf
57-dejavu-serif.conf
58-dejavu-lgc-sans.conf
58-dejavu-lgc-sans-mono.conf
58-dejavu-lgc-serif.conf
Perhaps it should be 56? 59? 71? Since I created an "emoji" generic family, perhaps it makes sense to separate it into two files at 35 and 59?
@edgemaster: Any thoughts? Why did you select 35 for the fontconfig filename? I'm doing some tests now and 35 works with fc-match -s
for "sans" and "emoji", but not correctly for "Bitstream Vera Sans". Well, I've figured a place to implement unit tests and/or travis.ci! Hmm... The current file works correctly at 56.
from emojione-color-font.
I picked 35 as a bit of a guess, and roughly following the hints given in the fontconfig system readme.
Arch ships the default font config files with the patches at https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/fontconfig
I'm not sure if other fonts diverge from other standard configs.
It is the priority of the config file I was referring to previously when I said that I needed to test the arch system install further. I didn't have the time you track down/run through test cases for each of the relevant configuration bugs though.
I seem to remember that there's some oddity with other font priorities relative to the user configuration priority also.
Need to compare with Debian/Ubuntu to see how the distributions differ.
from emojione-color-font.
Ah ha! I will figure out a good way to do automated testing to make it easier to confirm.
from emojione-color-font.
This looks good enough for confirming correct installation:
$ fc-match -s sans | head -n2
Vera.ttf: "Bitstream Vera Sans" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
$ fc-match -s serif | head -n2
VeraSe.ttf: "Bitstream Vera Serif" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
$ fc-match -s "Emoji One Color" | head -n2
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Vera.ttf: "Bitstream Vera Sans" "Roman"
$ fc-match -s "Bitstream Vera Sans" | head -n2
Vera.ttf: "Bitstream Vera Sans" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
$ fc-match -s mono | head -n2
VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
$ fc-match -s monospace | head -n2
VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
I'm going to automate it into a tests.sh
from emojione-color-font.
@edgemaster I've made a tests.sh
to do some "unit tests". It compares a diff of current fc-match -s "$FONT" | head -n2
results to expected results. The output on my machine:
diff current-results.test expected-results.test
Font: sans Font: sans
Vera.ttf: "Bitstream Vera Sans" "Roman" Vera.ttf: "Bitstream Vera Sans" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: sans-serif Font: sans-serif
Vera.ttf: "Bitstream Vera Sans" "Roman" Vera.ttf: "Bitstream Vera Sans" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: serif Font: serif
VeraSe.ttf: "Bitstream Vera Serif" "Roman" VeraSe.ttf: "Bitstream Vera Serif" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: mono Font: mono
VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: monospace Font: monospace
VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: Bitstream Vera Sans Font: Bitstream Vera Sans
Vera.ttf: "Bitstream Vera Sans" "Roman" Vera.ttf: "Bitstream Vera Sans" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: Bitstream Vera Serif Font: Bitstream Vera Serif
VeraSe.ttf: "Bitstream Vera Serif" "Roman" VeraSe.ttf: "Bitstream Vera Serif" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: Bitstream Vera Sans Mono Font: Bitstream Vera Sans Mono
VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman" VeraMono.ttf: "Bitstream Vera Sans Mono" "Roman"
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Font: Emoji One Color Font: Emoji One Color
EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular" EmojiOneColor-SVGinOT.ttf: "Emoji One Color" "Regular"
Vera.ttf: "Bitstream Vera Sans" "Roman" Vera.ttf: "Bitstream Vera Sans" "Roman"
Fontconfig tests: PASS
from emojione-color-font.
Awesome. I'll give it a whirl and see how tweaking the priority of the configuration file impacts things.
from emojione-color-font.
I've changed the file to 56-emojione-color.conf
since it passes all of the tests in test.sh
correctly.
The user installer has been updated to put the file in $HOME/.config/fontconfig/conf.d/
. This also works for system-wide install.
@frederik-elwert I still need to backup the user's existing font.conf
for backwards compatibility. Let me know if you can think of any better way to handle the upgrade process. Maybe I could get crazy and hash the file? Seems overkill.
from emojione-color-font.
Installing at 56 causes many fonts in Firefox to become Bitstream, even when specified to be otherwise.
For example, the UI flow of the GitHub webpages is broken with Bitstream.
Trying to work out how CSS font selectors interact with the system fallbacks...
from emojione-color-font.
Apologies for the noise, I'm describing #31.
from emojione-color-font.
Related Issues (20)
- Is it supported on the terminal ? HOT 3
- Color emojis in PhantomJS? HOT 2
- Broken Arch link in the installation guide. HOT 1
- Outlook.com HOT 3
- Link to EmojiOneColor-SVGinOT-1.3-Win.zip is 404.
- Missing fonts after installing EmojiOne HOT 2
- Add Unicode 10.0 support HOT 2
- Update to EmojiOne 3.1.1 HOT 1
- [Firefox 55] gfx.font_rendering.fontconfig.fontlist.enabled workaround no longer works HOT 10
- [Windows] Font-Cache When Replacing Segoe UI Emoji HOT 2
- On Linux ask for a different font HOT 6
- Ubuntu: Don't replace Ubuntu Font with Bitstream Vera [feature request] HOT 8
- Release EmojiTwo as an SVGinOT font HOT 1
- Whats the deal with Chrome? HOT 2
- Emoji not scaled properly in Windows 10 On-screen keyboard HOT 1
- Could you please explain how to add new symbols? HOT 4
- Scroll emoji is broken HOT 2
- Alien and moneybag emoji are broken on Ubuntu 16.04 HOT 4
- EmojiOne for Ubuntu Artful Aardvark HOT 2
- not able to install in centos HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emojione-color-font.