Commit graph

210 commits

Author SHA1 Message Date
Hugo Barrera
66b29f6d54 Change bearing to int, since an int is expected
I keep seeing this warning when running `font-patcher`, and realised this is a relatively simple fix. This property expects and `int`, but a `float` is passed and implicitly cast.

This squelches the deprecation warning, and keeps the code future-proof too.

```
/nerd/font-patcher:823: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  glyph.left_side_bearing = 0.0
/nerd/font-patcher:825: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  glyph.right_side_bearing = 0.0
```
2020-07-29 09:53:28 +02:00
Ryan L McIntyre
36d0708dc2
Merge pull request #439 from onokatio/fix-postscript-cid
Fix #412
2020-02-21 22:27:59 -08:00
onokatio
2c7af61136 Fixes TypeError: unsupported operand (fix #412)
use cid object instead of native.
2020-02-12 13:32:07 +09:00
Anton Maminov
3bdc0949b8 add Crystal icon 2020-01-29 13:53:56 +02:00
Ryan L McIntyre
d0faead4dd Adds Cascadia Code patched version (as 'Caskaydia Cove') (issue #373) 2020-01-25 21:22:11 -08:00
Ryan L McIntyre
a192bff0b0
Merge pull request #394 from Finii/bugfix/diacritics_in_mono
Bugfix/diacritics in mono
2019-12-21 20:55:47 -08:00
Ryan L McIntyre
8566c6539e Updates scripts in preparation for for v2.1.0 2019-11-03 09:08:39 -08:00
Fini Jastrow
d307a73356 font-patcher: Fix broken diacritic glyphs in monospaced font
[why]
Some glyphs are just used as overlays for 'real' glyphs. These can be
for example U+0300 .. U+036F (the 'COMBINING ...' diactritics) like
  U+0300, gravecomb, COMBINING GRAVE ACCENT
  U+0301, acutecomb, COMBINING ACUTE ACCENT
  U+0308, uni0308, COMBINING DIAERESIS

They are never used on their own, at least they are overlayed over a
blanc (U+0020, space).

For the font rendering engine they need to have the correct negative
bearings, so they are shifted to take no space by themselves.

The font-patcher script does not allow negative bearings in monospaced
fonts. This makes sense if every glyph is in itself a 'letter' that
should not reach beyond it's allotted (monospaced) space.

[how]
In the font-patcher script we do not touch the bearings of such overlay
glyphs. They can be identified by their width of zero.

For Windows to detect this font as 'monospaced' we need to change the
width to the standard width, though.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2019-10-24 08:21:02 +02:00
Fini Jastrow
a2f0958ae5 font-patcher: Fix broken ligature glyphs in monospaced font
[why]
For some reason reading a font into fontforge looses data on glyphs. As
a workaround the `font-patcher` script has the switch `--mono` to
ascertain an equal width of all glyphs. We want to (and sometimes need to)
use that mode of the script to get a new font that is detected as monospaced
by Windows.

Sometimes that workaround fails. For example it breaks ligature glyphs
in some circumstances; they seem to be moved sideways.

[how]
The workaround is done in two steps: First each glyph is checked for
negative bearings. If these are found they are set to fixed zero.
Afterwards the glyph width is set to the font global width.

The ligature glyphs have already the correct width, they just have
negative bearings that they indeed need. There is no reason to change
the (correct) bearings to get a monospaced font. In strict monospaced
fonts that would be impossible, but the ligatures are only used in
applications that could work with negative bearings and so they should
be there. Strict monospaced usage does ignore the bearings anyhow.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2019-10-24 08:20:12 +02:00
Gunnar Tiedt
fb2347dac8 Extend FontNameReplacements for Anka/Coder 2019-09-24 16:41:19 +02:00
Ryan L McIntyre
5512f1881f Adds font 'iA Writer' (patched as 'iM Writing) (issue #326)
* pre-release build only
2019-08-17 23:01:59 -07:00
Ryan L McIntyre
ebc95f5eb2 Makes suer to add 'Liberation' to RFN list (discovered via PR #366)
- needs to be repatched with correct name
2019-08-11 08:15:41 -07:00
Ryan L McIntyre
3068126a16 Fixes version to proper status 2019-07-26 14:57:04 -07:00
Ryan L McIntyre
28b6548d7d Designates version as alpha for now 2019-07-05 12:36:47 -07:00
Ryan L McIntyre
f49b92cb6c Resolves conflicts 2019-07-05 12:32:06 -07:00
Ryan L McIntyre
e3710e3875 Merge branch 'refactor-font-patcher' of https://github.com/haasosaurus/nerd-fonts into haasosaurus-refactor-font-patcher 2019-07-05 11:42:27 -07:00
Ryan L McIntyre
86dff75f7e Removes RFN replacement for Fira Code
* continues modifications from #352 and #356 PR
* see: https://github.com/tonsky/FiraCode/issues/767#issuecomment-495163622
2019-06-22 05:30:17 -07:00
Ryan L McIntyre
bfde19a193
Merge pull request #283 from haasosaurus/master
fix monospace/overlap problem
2019-06-19 22:05:49 -07:00
Ryan L McIntyre
3241ea6e44
Fixes the same typo found in #331
Fixes the same typo discovered in #331
2019-03-11 19:13:10 -07:00
Jimmy Haas
c5433d8de8 fix comments 2018-08-07 04:38:13 -07:00
Jimmy Haas
edba9ebdf1 removed unneeded var 2018-08-07 04:27:48 -07:00
Jimmy Haas
d83d930ee6 fix comment 2018-08-07 04:10:27 -07:00
Jimmy Haas
e442611644 polish refactor 2018-08-07 04:06:39 -07:00
Jimmy Haas
0a480bbc8d refactor font-patcher 2018-08-04 03:39:21 -07:00
Jimmy Haas
cf625d46b5 fix monospace/overlap problem 2018-08-03 18:47:20 -07:00
Nicola Tuveri
d27ef23278 Rename the patched font as 'Blex' 2018-04-03 22:49:38 +03:00
Nicola Tuveri
27b7d35a0e Add IBM Plex (https://github.com/IBM/plex) font. 2018-04-01 13:35:06 +03:00
Ryan L McIntyre
47b42c8067 Changes name for 'complete' variations to not be abbreviated with 'C' 2018-03-26 21:27:05 -04:00
Ryan L McIntyre
31d7524a2c Fixes glyph overlapping issues 2018-03-23 21:05:52 -04:00
Ryan L McIntyre
1906150729 Updates patcher and source script for Weather glyph set (issue #247) 2018-03-23 21:05:52 -04:00
Ryan L McIntyre
1d84436942 Updates 'Knack' to now be just 'Hack' (license change)
- Removes reliance on 'Knack' name due to removal of SIL OFL Reserved font name 'Hack' no longer being a RFN
- This change has been in effect since Hack v3.000
2018-03-17 11:50:06 -04:00
Ryan L McIntyre
2f25d0618e Updates parameter info for 'configfile' flag 2018-03-10 17:30:03 -05:00
Ryan L McIntyre
b7931da607 Updates version metadata consistency 2018-03-03 14:14:55 -05:00
Ryan L McIntyre
ba5a35c8b6 Updates metadata to match other scripts convention 2018-02-26 05:45:21 -05:00
Ryan L McIntyre
3ebe0a79f6 Version bumps in preparation for v2.0.0 release 2018-02-26 05:43:40 -05:00
Ryan L McIntyre
26ea118d77 Updates some logging 2018-02-25 21:51:58 -05:00
Ryan L McIntyre
5007170cf9 Updates glyph core set (SetiUI and custom) with new glyphs for Elm, Elixir, Electron (WIP #172, #228, #237) 2018-02-25 16:15:13 -05:00
Ryan L McIntyre
3e2cc61e4e Config file parsing fixes 2018-02-25 15:52:49 -05:00
Ryan L McIntyre
f49db2ae1c Add missing TTF Names String ID metadata update (WIP fix for #231) 2018-02-24 10:43:27 -05:00
Ryan L McIntyre
c7e1aafa67 Minor clean-up 2018-02-22 22:11:24 -05:00
Ryan L McIntyre
9917e2dbea Adds ability to read from config JSON file and remove subtables (thus ligatures) (WIP #186) 2018-02-18 19:06:09 -05:00
Ryan L McIntyre
6955ac2bdb Updates scripts in preparation for Weather Icons (WIP issue #226) 2018-02-15 17:46:19 -05:00
Ryan L McIntyre
8fa121b14d Fixes typo 2018-02-13 21:59:33 -05:00
Ryan L McIntyre
1ae39f339e Updates scripts in preparation for Material Design Icons (WIP issue #154) 2018-02-12 21:32:37 -05:00
Ryan L McIntyre
30c296bb8f Adds Material Design Icons (WIP issue #154)
- Also moves one Octicon that conflicts with the set
2018-02-11 15:38:33 -05:00
Ryan L McIntyre
cac0352044 Preparation work for updating font-logos (font-linux) glyphs (issue #157) 2018-02-11 10:50:26 -05:00
Ryan L McIntyre
85ed8a4b43 Bumps project version numbers of scripts for v1.2.0 release 2017-11-18 16:11:22 -05:00
JinwookMBP
d44a574e23 fix '__dir__' set to empty 2017-08-27 17:57:25 +09:00
Ryan L McIntyre
4227f0bf46 Fixes an update to font name references with various sanitation
- removes 'for Powerline'
2017-08-01 17:52:10 -04:00
Ryan L McIntyre
6af2fdc8d7 Bumps project version numbers of scripts for v1.1.0 release 2017-07-30 18:02:58 -04:00
Ryan L McIntyre
dc64c11258 Adds more project details to '--help' argument 2017-07-30 17:58:42 -04:00
Ryan L McIntyre
c8801c0ec8 Updates progress bars styling and fixes incorrect glyph set calculation 2017-07-30 17:21:08 -04:00
Ryan L McIntyre
474e384a9d Updates font name references with various sanitation
- removes 'for Powerline'
- removes 'Powerline'
- removes extra whitespace
2017-07-30 17:20:31 -04:00
Ryan L McIntyre
8284d59508 Fixes SyntaxError with EOL on string 2017-07-29 21:55:20 -04:00
Ryan L McIntyre
715df80487 Simplifies font names with Powerline
- removes 'for Powerline' from patched fonts
2017-07-29 21:42:58 -04:00
Ryan L McIntyre
ad2bd608c8 Deouples changelog.md being required in patcher
- simplifies dependency
- simplifies fontlog and comments in the actual font
- adds links to website, project, and changelog
2017-07-29 21:41:49 -04:00
reujab
3a2cc32662 fixed links 2017-07-28 16:29:44 -04:00
reujab
7dd3712791 apt-get -> apt 2017-07-27 19:20:32 -04:00
reujab
8cdcf2ef02 print errors to stderr 2017-07-27 18:25:42 -04:00
reujab
f2b36427af use sys.exit to die 2017-07-27 18:17:40 -04:00
reujab
c505466c56 removed unused import time 2017-07-27 17:49:46 -04:00
Ryan L McIntyre
b5d8c11fbd Adds missing glyph e0ca (ice waveform mirrored) (fixes #182) 2017-07-25 22:07:04 -04:00
Ryan L McIntyre
975cf78fc3 Merge pull request #185 from reujab/relative-open
Open files relative to the script's directory
2017-07-24 16:54:37 -04:00
Ryan L McIntyre
b304a6b319 Merge pull request #183 from reujab/round-progress
Convert progress to an integer
2017-07-24 16:53:16 -04:00
Ryan L McIntyre
0b59fade46 Merge pull request #178 from kballard/mono_font_name
Change the font family name for mono fonts
2017-07-24 16:47:27 -04:00
reujab
24c38f37ea open files relative to the script's directory 2017-07-17 05:15:35 -04:00
reujab
4885d2fe97 fixed a few typos 2017-07-17 04:30:42 -04:00
reujab
e5ebaa5e50 AndreLGava -> AndreLZGava 2017-07-17 04:29:06 -04:00
reujab
10a530226a math.floor -> int 2017-07-17 03:48:55 -04:00
reujab
0c91dcfb88 floor progress 2017-07-17 03:37:01 -04:00
Kevin Ballard
40baa33645 Change the font family name for mono fonts
Fixes #176.
2017-07-11 13:33:27 -07:00
Tim Bellefleur
0b0c222b5b
Fix font-patcher python errors.
* Need to encapsulate flags and properties in str() or else fontforge
  refuses to recognize that they are strings.
2017-06-17 14:54:42 -07:00
Aron Griffis
bbc922e973 Make font-patcher Python 3 compatible.
Fedora's fontforge modules only work on Python 3. The small changes in
this patch make font-patcher work on Python 3 so I can run the script on
Fedora (26 at least, I don't know about older versions)
2017-05-18 21:55:35 -04:00
Ryan L McIntyre
0aa5fc4a2e Fixes for non-mono (double width) variations (fixes #142)
* Apply the l/r/c alignment to both mono and non-mono
* Apply the valign centering to both mono and non-mono
* Apply the vertical stretching (good for powerline separators) to both mono and non-mono
2017-04-21 19:11:11 -04:00
Ryan L McIntyre
a610ef8770 Adds flag for adjusting line height (not by default) 2017-04-21 18:46:18 -04:00
Ryan L McIntyre
a2345efbe4 Removes 'status' from progress bars
* currently breaking on clean-up of status length
* also not particularly useful just looked 'cool' to show codepoints
2017-04-20 22:23:56 -04:00
Ryan L McIntyre
83a3549611 Fixes issue with from sfnt_names (fixes #126)
* fixes order of indexes being transposed
* fonts need to be re-built
2017-04-08 13:45:22 -04:00
Ryan L McIntyre
ea3301387b Rebuilt Hasklig (Hasklug) to fix not complying with SIL Open Font License (OFL)
* related to PR #103
2017-01-15 17:21:17 -05:00
Ryan L McIntyre
17f9ee5db6 Updates versioning info for v1.0.0 2016-12-14 20:22:26 -05:00
Ryan L McIntyre
e9d84b6c02 Adds WIP scripts and logic for post processing patched fonts (WIP for fixing #70) 2016-12-03 14:57:11 -05:00
Ryan L McIntyre
0633e9d6f5 Tweaks to quiet and progressbar statuses + adds missing vim icon from custom glyph set 2016-11-20 19:33:49 -05:00
Ryan L McIntyre
102c3883e6 Progress bar fixes and tweaks 2016-11-06 11:23:50 -05:00
Ryan L McIntyre
4e9166e43c Adds progress bar and tweaks the option flags and help description 2016-11-05 22:55:27 -04:00
Ryan L McIntyre
3921fbdf43 Fixes issues patching octicons and/or fontlinux due to changes from merge 2016-11-03 18:57:53 -04:00
Ryan L McIntyre
1eeb1a2657 Merge branch 'sharkusk-monofixes' into 0.9.0
Conflicts:
	font-patcher
2016-11-02 23:24:00 -04:00
Marcus Kellerman
9770856f83 Zero out linegap values to allow power line glyphs to fill properly 2016-11-02 15:13:09 -07:00
Ryan L McIntyre
1214bf8afd Upgrades Font Awesome glyph set to v4.7.0 2016-10-29 18:46:59 -04:00
Ryan L McIntyre
c04aea8c4f Updates paths used due to re-organizing of files 2016-10-29 16:51:08 -04:00
Ryan L McIntyre
bba116c557 Fixes missing new Vim glyph (0xe52b) from patched fonts 2016-10-29 00:27:01 -04:00
Marcus Kellerman
7cd183b9cb Use original symbol fonts for scaling lists 2016-10-25 21:24:11 -07:00
Marcus Kellerman
96eafa9bb9 Support custom symbol font and specify which glyphs use fixed scale factor 2016-10-24 17:05:15 -07:00
Ryan L McIntyre
8fa1d162c4 Misc fixes
* wrong name for font awesome extension
* scale glyph for font awesome extension
* octicons 'desktop' glyph exact match fix
* octicons range updated to include the new glyphs in latest version
2016-10-23 18:29:11 -04:00
Ryan L McIntyre
53756eb842 Updates patcher and readme with the new options and glyph sets 2016-10-23 17:23:00 -04:00
Ryan L McIntyre
30d306216b Improves readability, prose, and some minor spelling fixes 2016-10-23 17:20:06 -04:00
Ryan L McIntyre
e9c3d443ee Merge branch 'sharkusk-monofixes' into 0.9.0
Conflicts:
	font-patcher
2016-10-23 13:18:42 -04:00
Ryan L McIntyre
c9b2fb4e66 Misc code readability fix 2016-10-23 12:28:35 -04:00
Ryan L McIntyre
6dfb1f0527 Fixes missing Octicons glyphs (fixes #87) 2016-10-23 12:03:33 -04:00
Jamie Rolfs
1691f47564 Add Hasklig 2016-10-22 12:27:34 -04:00
Marcus Kellerman
994267d94c Fix overlap (noticable with large amounts) 2016-10-21 23:26:03 -07:00
Marcus Kellerman
1edd4ca9d2 Fixed final issues with careful mode, parameterized overlap. 2016-10-21 21:59:40 -07:00