Open sampotts opened 9 years ago
It’s in /System/Library/Fonts
. I don’t have a 100% grasp of which parts of the font file this tool modifies, so I wouldn’t know how to change the system font manually, especially since San Francisco is a set of 33 OTFs while Helvetica Neue is just one TTC. It also doesn’t help that Font Book crashes on launch, and I can’t seem to get San Francisco to show up in the font selection drop-down by manually dragging it into ~/Library/Fonts. However, I agree that San Francisco isn’t fantastic. It definitely shines as a screen font for body text, but it looks quite plain in titles. Hopefully we can pin down its internal names!
I noticed these guys have it working, but using Fira as a typeface: https://github.com/jenskutilek/FiraSystemFontReplacement
I would happily pay for this :+1:
Sorry, I haven’t upgraded to El Capitan yet. I’ll find ways to patch the system font after I upgrade.
Thanks for notifying me about FiraSystemFontReplacement. It’s certainly very helpful!
No it's totally cool. I tried to pay around with the source for the Fira replacement. It looks like it requires the Glyph app and the python scripting support. I did take a look in my lunch break yesterday but I think it's a bit beyond me. I'm more than up for helping where I can though, if you need it. I've just been mucking around in a VM with it for now.
I modified the patch script to work with El Capitan font files, but you have to patch them manually.
I added an example script to convert Avenir Next here: https://github.com/dtinth/YosemiteAndElCapitanSystemFontPatcher#el-capitan
The convenient script still only works with Yosemite. Pull requests are welcome.
Awesome cheers! I'll give it a go tonight.
How would I manually update these Ubuntu fonts? https://medium.com/@namesWatson/i-love-the-ubuntu-fonts-20a76225776e
Hi. I've actually managed to updated my font files directly via FontForge, some time ago, but I've occured a small 'issue' with this process (and it wasn't solved by your patcher as well, at least in my case). The point is - on my login screen I do not see my user name, but only question marks instead. It's like El Capitan do not load user fonts before login BUT I've tried to switch fonts directly in the /System/Library/Fonts folder and it didn't help either.
(^ all this wasn't a problem on Yosemite)
Do you, maybe, have some clue about what's going on here?
EDIT. After nearly a month of thinking & trying I've actually managed to solve this problem... But I'm not quite sure why and how. I - randomly - had a thought that, maybe, if I would create a second user account, somehow all those part of font caches, which I wasn't able to delete/restart in a 'normal' way, would be forced to refresh & my problem would be gone. And the most funny part is that it has really happened, just now. But I have no idea why it helped and how. Any ideas, guys?
Fimmti: I can only replicate that bug if I switch the patched system files out from /Library/Fonts for a different set of patched fonts and then log out. Simply doing a system restart fixed that issue for me though. This program worked fantastically for me, though! I have just converted all of my favorite System 9 fonts for use as El-Capitan system fonts. I also have another question: does this only work with truetype or opentype fonts? I converted all of the System 0.85- System 7 system fonts (including some of the rarer ones such as System 0.85 Chicago and SwanSong) to usable bitmap datafork fonts. Should I just figure out how to convert those to truetype fonts, as they don't seem to work during the patch process? Thanks.
@JohnDDuncanIII From what I read, FontForge works with outline fonts only.
But maybe you can use some autotracing tools to convert them to vector fonts. Please note, that for some bitmap fonts, someone might have converted them into a vector font.
For instance, I just changed part of my system font from San Francisco to San Francisco.
But I did not use the real San Francisco font. Instead, I used St Francis which is a TrueType version of San Francisco.
Basically, i just wanted to change the default system font on my Mac.
I came across many solutions on Google, but most of them are restrained to OS version no greater than Yosemite, while i just upgraded to EL Captain and found OS degradation too cost to me for font-only purpose.
Thankfully, i found your repo and got my problem solved. I don't quite understand what's behind the screen of this app, as i just simply followed your instructions from the README file without digging into the source(and i also don't think i am skilled enough to understand it 🤗)
BUT one thing that got me a bit confused of this part of README file. Looks like there're some name mismatches of the command line arguments($1, $2) for the following command:
patch-system-font 'SFNSDisplay-Light.otf' 'Avenir Next.ttc(Avenir Next Regular)'
patch-system-font 'SFNSDisplay-Medium.otf' 'Avenir Next.ttc(Avenir Next Medium)'
patch-system-font 'SFNSDisplay-Regular.otf' 'Avenir Next.ttc(Avenir Next Medium)'
Just to list a few.
And i just changed the script as follows:
patch-system-font() {
TEMPLATES=(/System/Library/Fonts/SFNS*)
REPLACEMENT="$1"
for TEMPLATE in $TEMPLATES
do
./bin/patch $TEMPLATE $REPLACEMENT
done
}
then in shell run:
$ patch-system-font /path/to/replacement
In my case, i copied the replacement file to the root of this repo, and thus run :
$ patch-system-font "Segoe_Print.ttf"
and it works. Maybe this part can be updated to clarify this a little bit.
Anyway, it's really an awesome tool and i definitely appreciate it! 👍
Thanks for the encouragement! The code example below was just an example. The weight of the source font and replacement font doesn’t need to match.
For example, I prefer to have a slightly bolder version of Avenir Next. That’s why I use Avenir Next Regular for Light, Medium for Regular, so on and so forth. :)
Forgive my ignorance, i have difficulties in understanding the steps. I am on el capitan also. This is what I have done:
patch-system-font() { TEMPLATES=(/System/Library/Fonts/SFNS*) REPLACEMENT="$1" for TEMPLATE in $TEMPLATES do ./bin/patch $TEMPLATE $REPLACEMENT done }
bash patch-system-font "Avenir\ Next.ttc"
no error appears, but i also see no font being made. i think i am doing something wrong. Any help would be appreciated.
Hey @guidoevers , for sake of brevity, Change step3 and 6 as follows and try again.
TEMPLATES=/System/Library/Fonts/SFNS*
# Just remove the parenthesis, it's zsh syntax not bash./patch-system-font "Avenir\ Next.ttc"
# Remove "bash" , it will be used as command argument $0 making REPLACEMENT="$1"
wrong, add ./
to patch-system-font
to specify the path for this script as it's not included in your env's PATH Hope that can work!
Thank you for getting back to me! I feel like an ass clogging up this thread due to my lack of knowledge. I have altered the steps as you proposed for 3 and 6. Still, I havent succeeded.
Like I have stated, I simply made the script in sublime text as simple text, and then saved that file without any an extension, is this sufficient? Does the cloned directory need to be at a specific location on the hard drive? Where does the new font get generated , in the root of the cloned directory or straight into the system/fonts directory? Do I need to be in a special mode in terminal, i tried first doing bash?
I hope I covered all the basic questions so that other noobs (like me) can get this right as well. cheers
@guidoevers, took a closer look at your step3 above, you copied the function patch-system-font() into a script without invoking it within the script like patch-system-font $1
, just move the body of the function to the script scope (remove the function wrapper). (save your script under the root of the repository and ensure you run this script from there, thus using ./patch-system-font "Avenir\ Next.ttc"
)
Besides this, everything else looks fine from your description. If succeed, generated fonts will be under the root of this cloned repository and you still have to manually move it to /Library/Fonts/
in order to take precedence over the default one.
I have progressed a bit, but the end result is a bit off. Every style is bold now.
I added patch-system-font $1
at the bottom of the script, outside of the wrapper. I figured all correct styles would be read automatically from the .ttc file
I ran ./patch-system-font "Avenir\ Next.ttc"
but this gave me an error saying that the Avenir\
couldn't be found. For some reason the space cannot be read. Therefor I changed the font name to AvenirNext.ttc
.
Now I was able to generate a bunch of fonts.
Terminal reads this over and over:
The following table(s) in the font have been ignored by FontForge Ignoring 'hdmx' horizontal device metrics table Ignoring 'meta' This font contains both a 'kern' table and a 'GPOS' table. The 'kern' table will only be read if there is no 'kern' feature in 'GPOS'. The following table(s) in the font have been ignored by FontForge Ignoring 'meta' Ignoring 'trak' tracking table Warning: Mac and Windows entries in the 'name' table differ for the Family string in the language English (US) Mac String: .SF NS Display Windows String: System Font The glyph named Tcommaaccent is mapped to U+021A. But its name indicates it should be mapped to U+0162. The glyph named tcommaaccent is mapped to U+021B. But its name indicates it should be mapped to U+0163.
Resulting in each generated font to be the bold style of Avenir Next.
Maybe because I changed the name of the font, the font styles are not recognised. I am surprised that spaces couldn't be read with quotations or \
for that matter.
i tried "Avenir Next.ttc"
"Avenir\ Next.ttc.ttc"
Avenir\ Next.ttc
and Avenir Next.ttc
Shouldn’t this issue be closed? After all, the repo’s name has been changed.
Hey, not an issue but I've been trying to get the same process working on El Capitan (and failing). Looks like they don't even list San Francisco in the font list in Font Book. Not sure how hard support would be? San Francisco font isn't amazing though and it'd be nice to use Avenir Next.