Giter Site home page Giter Site logo

fontpatcher's People

Contributors

lokaltog avatar zyx-i avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fontpatcher's Issues

The ttfs are not recognised, in Windows 8, as fixed width (monospace)

I took the consolas font and ran it through the patcher (under Ubuntu) and then installed the output, which works in most places, but is not counted by gVim as an available font. This seems to be because it's not counted as a fixed-width font so gVim doesn't even show it when I bring up the guifont selection dialog using

:set guifont=*

TypeError: No such glyph

Hi everyone!

Any help on this error, please?

…/font_tools ❯ ./FontForge-2023-01-01-a1dad3e-x86_64.AppImage -script $PWD/powerline-fontpatcher/scripts/powerline-fontpatcher $HOME/files/kits/design/fonts/00___my_purchases/64-SRC/64-SRC-DZ-Medium.otf 
Copyright (c) 2000-2023. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Version: 20230101
 Based on sources from 2023-01-01 05:26 UTC-ML-TtfDb-D-GDK3.
 Based on source from git with hash: a1dad3e81da03d5d5f3c4c1c1b9b5ca5ebcfcecf
Traceback (most recent call last):
  File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 144, in <module>
    raise SystemExit(main(sys.argv[1:]))
  File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 141, in main
    return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
  File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 133, in patch_fonts
    patch_one_font(source_font, target_font, rename_font)
  File "/home/devs/files/kits/design/font_tools/powerline-fontpatcher/scripts/powerline-fontpatcher", line 117, in patch_one_font
    target_font[0xFB01].removePosSub('*')  # fi ligature
TypeError: No such glyph
…/font_tools ❯ 

Thanks in advance!

How to use it modification OperatorMono font ?

how to use fontpatcher ? I dowload the fontpatcher project and let the font in fontpatcher folder , i input the command in terminale

fontforge -script /Users/imac/Downloads/fontpatcher/setup.py OperatorMono-Book.otf

but console errorinvalid command name 'OperatorMono-Book.otf'
how to use fontpatcher ?

Can't use due to python3 dependency

I tried to use this, but I have to jump through all sorts of hoops to get a python 3 fontforge library installed.

Does anyone know how to get past this?

Rendering problems with Inconsolata LGC font in gVim

Migrated from powerline/powerline#583 by @yl3dy

Powerline symbols look stretched and shifted down when using Inconsolata LGC font. I'm using gVim. Font was patched manually using the manual. Same thing is observed in sakura terminal (it does support fontconfig, but using normal or patched font doesn't make any difference).

Example in gVim

System: Arch Linux, package python2-powerline-git.

Better target_bb selection

I have found that for the Menlo font, the default way to determine the target_bb gives very bad results (the box drawing characters extend beyond the normal character bounds quite a bit).

Due to this, every patched Menlo i found online looked very bad (at least to me, most others seem not to notice 😅).

I have now found a target_bb that looks good to me (at least at 288pt font size and below).

Now that I have gone through this work, I think it would be a shame to just use it for me. But I also dislike the idea of me just publishing this patched Menlo online somewhere. I think a more generic approach would be useful.

Thus I think it would be a good idea to include target bounding boxes for specific fonts in fontpatcher, and fall back to the default way of going through characters if there is no bounding box for the font to be patched.

This way, everyone who uses the patcher with Menlo in the future would get the better target bounding box.

I am not very well versed in python, so I don't know what the best way to keep this data separate from the actual script would be, or I would have set up a pull request, but if you like this idea, here is the target_bb that I have found works well for Menlo: [0, -483 1227, 1936]

Throws Value Error, does not patch font.

I ran: ./powerline-fontpatcher --source-font /usr/share/fonts/opentype/PowerlineSymbols.otf /usr/share/fonts/truetype/vlgothic/OxygenMono-Regular.ttf. All the paths in this are correct, and I have rw permissions. Here's the full error message:

Traceback (most recent call last):
  File "./powerline-fontpatcher", line 144, in <module>
    raise SystemExit(main(sys.argv[1:]))
  File "./powerline-fontpatcher", line 141, in main
    return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
  File "./powerline-fontpatcher", line 133, in patch_fonts
    patch_one_font(source_font, target_font, rename_font)
  File "./powerline-fontpatcher", line 104, in patch_one_font
    target_font.selection.select(source_glyph.unicode)
ValueError: Encoding is out of range

Patching Crystal font leads to strange effect on UTF-8 characters

Environment: Ubuntu 14.04, $LANG=ja_JP.UTF-8

Patching https://github.com/whistler/monospace-fonts/blob/master/crystal.ttf is successful, but causes Japanese glyphs to be rendered oblique where they appear.

Did not observe this error on any other fonts I have tried.

Steps to reproduce:

export LANG=ja_JP.UTF-8
./powerline-fontpatcher crystal.ttf
mv "Crystal for Powerline.ttf" ~/.fonts/
fc-cache -v ~/.fonts/

Set terminal font accordingly, type, say, apt-get.

EnvironmentError: Font generation failed error while patching AnkaCoder font

While trying to patch AnkaCoder font, I faced this error

The glyph named Delta is mapped to U+0394.
But its name indicates it should be mapped to U+2206.
The glyph named Omega is mapped to U+03A9.
But its name indicates it should be mapped to U+2126.
The glyph named mu is mapped to U+03BC.
But its name indicates it should be mapped to U+00B5.
Save Failed
Traceback (most recent call last):
  File "./powerline-fontpatcher", line 146, in <module>
    raise SystemExit(main(sys.argv[1:]))
  File "./powerline-fontpatcher", line 143, in main
    return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
  File "./powerline-fontpatcher", line 135, in patch_fonts
    patch_one_font(source_font, target_font, rename_font)
  File "./powerline-fontpatcher", line 127, in patch_one_font
    target_font.generate('{0}{1}'.format(target_font.fullname, extension))
EnvironmentError: Font generation failed

Before it throws this error
TypeError: No such glyph but I used this patch #13 to overcome it.

cannot find fontpatcher-symbols.sfd

argparse.ArgumentError: argument --source-font: can't open '/usr/local/bin/fontpatcher-symbols.sfd': [Errno 2] file not found: '/usr/local/bin/fontpatcher-symbols.sfd'

I also tried to execute powerline-fontpatcher before I run "setup.py install", but still can't find the symbol file.

No such glyph 0xFB01

When trying to patch the font linked (Commodore 64) below, I get

Traceback (most recent call last):
  File "powerline-fontpatcher", line 144, in <module>
    raise SystemExit(main(sys.argv[1:]))
  File "powerline-fontpatcher", line 141, in main
    return patch_fonts(args.source_font, args.target_fonts, args.rename_font)
  File "powerline-fontpatcher", line 133, in patch_fonts
    patch_one_font(source_font, target_font, rename_font)
  File "powerline-fontpatcher", line 117, in patch_one_font
    target_font[0xFB01].removePosSub('*')  # fi ligature
TypeError: No such glyph

Can you point me in the right direction?

https://www.dropbox.com/s/23crhkwdyhi33is/C64_Pro_Mono_v1.0-STYLE.ttf?dl=0

Patched font not behaving correctly

Screen Shot 2019-04-29 at 7 40 59 PM

So I ran the script and got the patched font, but it is not working correctly as expected.

fontforge -script scripts/powerline-fontpatcher NotoSansMono-Regular.ttf
Copyright (c) 2000-2018 by George Williams. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Based on sources from 17:36 UTC 13-Apr-2019-D.
 Based on source from git with hash:
The glyph named macron is mapped to U+02C9.
But its name indicates it should be mapped to U+00AF.

How can I fix it here? Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.