mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-13 03:03:33 +02:00
font-patcher: Allow to specify custom symbolfont with absolute path
[why] When one wants to use a custom symbol font and specifies it with an absolute path, the glyphdir is still prepended. That means that the argument to `--custom` is always used as relative path (to `--glyphdir`), even when it starts with `/`. That is somehow unexpected or at least inconvenient. Example: fontforge font-patcher --custom ~/Downloads/fa6.otf Inconsolata-Regular.otf fa6.otf is searched for in ./src/glyphs/home/username/Downloads [how] Use Python function that handles joining path fragments. If a component is an absolute path, all previous components are thrown away. Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
parent
64d53b8247
commit
7cda326515
@ -225,7 +225,7 @@ class font_patcher:
|
|||||||
if symfont:
|
if symfont:
|
||||||
symfont.close()
|
symfont.close()
|
||||||
symfont = None
|
symfont = None
|
||||||
symfont = fontforge.open(self.args.glyphdir + patch['Filename'])
|
symfont = fontforge.open(os.path.join(self.args.glyphdir, patch['Filename']))
|
||||||
|
|
||||||
# Match the symbol font size to the source font size
|
# Match the symbol font size to the source font size
|
||||||
symfont.em = self.sourceFont.em
|
symfont.em = self.sourceFont.em
|
||||||
|
Loading…
Reference in New Issue
Block a user