Commit graph

1308 commits

Author SHA1 Message Date
ryanoasis
6424cbbffd Rebuilds patched fonts 2022-01-03 21:28:58 +00:00
Ryan L McIntyre
b7866f2114 RC: Commit the patched font subset to the repo 2022-01-03 05:05:42 -08:00
Ryan L McIntyre
adcef8e294 Fix missing font patcher archive readme info 2022-01-03 03:48:46 -08:00
Ryan L McIntyre
30d2a0427b Fix font patcher going to separate release 2022-01-03 03:47:23 -08:00
Ryan L McIntyre
1e65572c2c RC font-patcher archive missing creds 2022-01-03 03:27:10 -08:00
Ryan L McIntyre
3bb002c395 Add font patcher to release in separate job 2022-01-03 02:15:14 -08:00
Ryan L McIntyre
e630dd1697 Fixes use of archive, archive patcher and cleanup 2022-01-03 00:53:22 -08:00
Ryan L McIntyre
2f429c8fac Cleanup incorrect license files in patched dirs 2022-01-02 08:57:00 -08:00
Ryan L McIntyre
6748326a90 RC: Upload multiple paths 2022-01-01 10:23:38 -08:00
Ryan L McIntyre
c1d81cdda8 Tweak RC for less fonts and try wildcard pattern for artifact upload, comments out commit for now 2022-01-01 07:50:03 -08:00
Ryan L McIntyre
877fef6831 use smaller subset of fonts in RC and do a single commit using artifacts between jobs 2022-01-01 06:48:04 -08:00
Fini Jastrow
e805b87997 font-patcher: Resolve rounding error when rescaling
[why]
The symbol glyphs are rescaled (when --mono is specified) so that they
have a predefined width after insertion in the source font (to be
patched font, called 'target font' below).

Sometimes the width of the glyph after insertion is off a bit, like
0.2% or so. This seems strange, as we calculate the target width
exactly.

[how]
As expected this are rounding errors. In the old code we take the
original width of the glyph when it is in the symbol font and
rescale it when it is in the target font. The width of the glyph
should be the same in the source and the target font, right?

It fact it is not, because the coordinate systems of the two fonts can
(and usually are) different. fontforge's magic scales the glyph
into the new coordinate system on insertion, such that it is approx
the same as before. But when the coordinate system is integer based
we get some small rounding errors just from copy and paste.

To solve this, we
- first copy the glyph from the source into the target font
- then determine the glyphs width
- then rescale the glyph to the target width

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-01-01 01:52:22 +01:00
Fini Jastrow
d887391ca0 font-patcher: Add docu for ScaleGlyphs
[why]
The ScaleGlyph just gives a lot of anonymous numbers.

[how]
Write down which glyphs are rescaled and group them to related
groups.

They are not changed to 'new' ScaleGlyph method.

[note]
Checked the current Devicons, and they are completely different to ours.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-01-01 01:50:47 +01:00
Fini Jastrow
d8579b1b11 font-patcher: Use new ScaleGlyph for problematic Font Awesome
[why]
While patching for --mono with Font Awesome we get glyphs that are
too wide, for example '_520' (0xF22B). In the symbol font original
it is about 1918 wide. According to ScaleGlyph FONTA_SCALE_LIST
it shall be scaled as 0xF17A - which is only 1664 wide.

[how]
Fill the ScaleGlyph of Font Awesome with groups of glyphs that shall be
kept same-sized after scaling.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-01-01 01:50:47 +01:00
Fini Jastrow
e5768e925c font-patcher: Redesign ScaleGlyph parameter
[why]
While patching for --mono with Font Awesome we get glyphs that are
too wide, for example '_520' (0xF22B). In the symbol font original
it is about 1918 wide. According to ScaleGlyph FONTA_SCALE_LIST
it shall be scaled as 0xF17A - which is only 1664 wide.

This results in too wide symbols in the patched font.

[how]
The ScaleGlyph dict works like this:
- 'ScaleGlyph' Lead glyph, which scaling factor is taken
- 'GlyphsToScale': List of (glyph code) or (list of two glyph codes
      that form a closed range)) that shall be scaled

Note that this allows only one group for the whole symbol font, and
that the scaling factor is defined by a specific character, which
needs to be manually selected (on each symbol font update).

The redesign drops 'ScaleGlyph' and changes the glyph list to:
- 'GlyphsToScale': List of ((lists of glyph codes) or (ranges of glyph codes)) that shall be scaled

Each item in 'GlyphsToScale' (a range or an explicit list) forms a group of glyphs that shall be
as rescaled all with the same and maximum possible (for the included glyphs) factor.

The old data structure is automatically rewritten to new entries.

[note]
This commit just changes the algorithm. As the new ScaleGlyph is not
used for any font, there is no change in the patched fonts.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-01-01 01:50:47 +01:00
Fini Jastrow
cfcd15aa25 font-patcher: Issue warning if symbol scaling fails monospace goal
[why]
Sometimes fonts patched with --mono are not recognized as monospaced
fonts.

One reason can be that the inserted glyphs are too wide. This will show
in the end in the font's advanceWidthMax property which is not congruent
to the normal font width.

[how]
After all the scaling and jiggling we double check if the new glyph
already in the to-be-patched is not wider than our design goal for the
width. Normally one would expect that this always holds.

An exemption could be if we insert ligatures, that are two spaces wide.
But at the moment we can not anyhow (because there is no way to add
information to the ligature tables right now).

If a glyph is wider a warning is issued.

No warning is issued if the glyph shall have some overlap. That overlap
is taken into account of this check.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2022-01-01 01:43:28 +01:00
ryanoasis
de13c66797 Rebuilds patched fonts 2022-01-01 00:28:50 +00:00
ryanoasis
c45941eee5 Rebuilds patched fonts 2022-01-01 00:28:16 +00:00
ryanoasis
331b3c1fbb Rebuilds patched fonts 2022-01-01 00:27:47 +00:00
ryanoasis
e3f60ecc88 Rebuilds patched fonts 2022-01-01 00:27:28 +00:00
Ryan L McIntyre
d3e09c2a29 Attempt fix build action 2021-12-31 08:11:51 -08:00
ryanoasis
447c6246c2 Rebuilds patched fonts 2021-12-31 23:10:29 +00:00
ryanoasis
187d9e0312 Rebuilds patched fonts 2021-12-31 23:10:15 +00:00
ryanoasis
381d398ce8 Rebuilds patched fonts 2021-12-31 23:10:08 +00:00
ryanoasis
01bd1062b6 Rebuilds patched fonts 2021-12-31 23:09:33 +00:00
ryanoasis
9ed2450224 Rebuilds patched fonts 2021-12-31 23:09:12 +00:00
ryanoasis
7f3ea3c5c5 Rebuilds patched fonts 2021-12-31 23:08:36 +00:00
ryanoasis
5f9e05a149 Rebuilds patched fonts 2021-12-31 23:07:22 +00:00
Ryan L McIntyre
bd8f3c56eb Get all the fonts for the release matrix 2021-12-31 06:54:14 -08:00
ryanoasis
7648367146 Rebuilds patched fonts 2021-12-24 23:16:28 +00:00
ryanoasis
34a9f6717d Rebuilds patched fonts 2021-12-24 23:12:45 +00:00
ryanoasis
20c4134e09 Rebuilds patched fonts 2021-12-24 23:03:25 +00:00
ryanoasis
85527ad378 Rebuilds patched fonts 2021-12-24 22:55:50 +00:00
ryanoasis
0a5366e232 Rebuilds patched fonts 2021-12-24 22:55:38 +00:00
ryanoasis
86b7e926e8 Rebuilds patched fonts 2021-12-24 22:53:36 +00:00
Ryan L McIntyre
a5b43f63bb
Merge pull request #736 from ryanoasis/feature/remove-selection-todo
font-patcher: Copy selection instead of continuously regenerating
2021-12-24 14:39:36 -08:00
Ryan L McIntyre
855e707f43 Updates metadata 2021-12-24 05:58:40 -08:00
ryanoasis
4bcd43c4c0 Rebuilds patched fonts 2021-12-24 19:54:53 +00:00
ryanoasis
f61aace253 Rebuilds patched fonts 2021-12-24 19:42:49 +00:00
ryanoasis
d68f64e153 Rebuilds patched fonts 2021-12-24 19:34:56 +00:00
ryanoasis
1389ba8a2c Rebuilds patched fonts 2021-12-24 19:28:31 +00:00
Ryan L McIntyre
87caa467cc
fix license link 2021-12-24 11:26:44 -08:00
ryanoasis
056483b420 Rebuilds patched fonts 2021-12-24 19:22:04 +00:00
ryanoasis
b60101f534 Rebuilds patched fonts 2021-12-24 19:21:25 +00:00
ryanoasis
5bc87a4a3e Rebuilds patched fonts 2021-12-24 19:20:28 +00:00
Ryan L McIntyre
c63600d124 Setup release action to pull version from file and commit back upon patching 2021-12-24 03:07:20 -08:00
Ryan L McIntyre
60bf84536a Updates info and simplifies some sections 2021-12-24 03:07:20 -08:00
allcontributors[bot]
efc2a57f7f
docs: add cstrahan as a contributor for code (#738)
* docs: update CONTRIBUTORS.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-22 14:04:11 -08:00
Fini Jastrow
c728079b61 font-patcher: Simplify output code
[why]
The code around `currentSourceFontGlyph` and `copiedToSlot` is
needlessly complex and checks for conditions that are impossible to
occur (possibly because the algorithm was different in the past).

It becomes rather hard to follow which variable holds what kind of value
and when.

[how]
Drop all the string-that-contain-hex-numbers stuff and use a regular
integer list/variable.

Format the string when it is output.

Drop obsolete checks.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2021-12-22 21:32:14 +01:00
Ryan L McIntyre
90572b9542 Merge branch 'cstrahan-codicon' 2021-12-22 06:01:24 -08:00