[why]
When a certain 'higher codepoint' glyph is needed for a substitution or
ligature rule of a basic glyph and we replace the 'higher codepoint'
glyph with a symbol that stylistic set or ligature will be broken.
[how]
We can not determine if a certain glyph is the _target_ of a pos-sub
rule (at least I could not find a way). What we do is remove all pos-sub
entries that _start_ at a symbol-patched glyph [1], but that is not the
same.
Instead of walking through all substitution tables we just examine the
'basic glyphs' and also protect all glyphs that they reference through
most of the possub tables.
In fact I encountered only "Substitution" entries and never "Ligature"
entries, but we handle both alike. "Pair", "AltSub", and "MultSub" are
not handled, but could be added if need be.
[1] #711Fixes: #901
Reported-by: Xiangyu Zhu <frefreak.zxy@gmail.com>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
All/most fonts are now available as Arch Community packages and not as
AUR anymore.
[how]
Instead of listing all individually link to search page.
Make sure the Symbols Only font in Community is also found.
Fixes: #1057
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
It's a pain to have the addition of contributors automated via
all-contributors bot, but then it does not end up on the webpage.
[how]
I'm not sure it will automatically be triggered (pretty sure it will
not), but at least one can clickstart manually the workflow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The script is not a 'proper' script with shebang.
The CONTRIBUTORS.md format changed.
We want to incorporate this as CI workflow.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
In the course of #271 the source for SourceCodePro switched: Before we
used SourceCode Powerline [1], afterwards the original one [2].
One font file has been forgotten, as the font files were differently
named in both variants.
This caused issed with parallel build in the CI and font tweaking (which
is done as additional process after the actual patching).
[note]
[1] https://github.com/ryanmcilmoyl/sourceCodePro-Powerline
[2] https://github.com/adobe-fonts/source-code-pro/releases/tag/2.030R-ro%2F1.050R-it
Maybe, this is not entirely clear, and the 'Powerline' variant does not
have an Italic style.
Fixes: #1084
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The JetBrains Mono family names are still broken.
The commit
b98c2a19 Fix JetBrains Mono Family names
did not do much, because it was not activated with gotta-patch-em.
The previous commit fixed that.
Put the fonts in the repo are still wrong. Repatching those gives a
chance to test them properly before v3.0.0.
[how]
Run gotta-patch-em with version set to v3.3.3-p6 because thats the git
status right now.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
JetBrains Mono is patched without `--makegroups`, although it is
specified in the `config.cfg`.
[how]
As with the licenses the code expects a specific font directory depth.
That is violated with some fonts, for example JetBrains Mono.
The config is never found.
Compare commit
8a749ab21 patch-em-all: Fix missing licenses
Fixes: #1081
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
I'm not sure why it has been in the code like this, and I removed these
strange globs already before in some places [1].
find -name "*.[o,t]tf"
actually allows
*.otf
*.ttf
*.,tf
[how]
Remove spurious comma in all `find` calls.
Systematically.
[note]
Just some commits mentioned here:
2ace3de8e7722458821ac6817bc729e2
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
With commit
6e361d40c cheat-sheet: Allow click to copy on hex value
(on branch gh-pages) we add the possibility to copy the raw hex code by
clicking on the hex number.
It would be more obvious if there is a tooltip.
[how]
Add tooltip via 'title' in cheat-sheet generator script.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Travis stopped working in 2021, and we would need to set up a new thing
somewhere else.
The shield is always red (because Travis stopped working at all), which
does not look good ;-)
See also #212
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Also correct some metadata in package info.
Reason for this bugfix release is problem we had with 2.3.2 and Symbols
Only font. Tried to fix the release retroactively but Arch was faster.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The commits needed to be in the master branch, but that is protected, so
we can not force push the commits away after debugging.
Revert "DEBUG: Show directory contents"
Revert "DEBUG: archive-fonts.sh"
Revert "DEBUG: Add more of original workflow"
This reverts commit 40f6990282.
This reverts commit 9e3fdefeba.
This reverts commit 5e8b8c6ed5.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If the license file is not in the same folder as the font file or its
parent directory it will not be copied.
Example:
├── AUTHORS.txt
├── config.cfg
├── copyall.sh
├── Ligatures
│ ├── Bold
│ │ └── JetBrainsMono-Bold.ttf
│ ├── BoldItalic
│ │ └── JetBrainsMono-BoldItalic.ttf
├── OFL.txt
└── README.md
When processing one font file (.ttf) the OFL.txt is neither in the same
nor in the parent directory (but rather in the parent's parent.
[how]
Collect all license-ish files for a complete font set and copy them all
over each other into all appropriate destinations in patched-fonts.o
Note that in situations like this:
├── fonts.dir
├── fonts.scale
├── L
│ ├── Bold
│ │ └── Meslo LG L Bold for Powerline.ttf
│ ├── config.cfg
│ └── LICENSE.txt
├── LICENSE.txt
└── README.rst
All LICENSE.txt files will be copied, but only the last one will 'win'.
So make sure all license files are identical.
Fixes: #1068
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
For some reason we work with strange paths like "root/a/b/../../c/d/e"
instead of "root/c/d/e".
[how]
Use dirname to go directories up.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
When running with --info on a completely empty patch-destination some
directories are missing and are never created. They would have been
created by the actual patching that is suppressed now.
[how]
Check and create the needed subdirs.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
Somehow the license file is missing from the release run.
It is present if I run it on the local machine.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We added a lot of glyphs in Seti + Custom and the new range Material
Design Icons.
[how]
Create new graphics with generator, see README.md.
Use Inkscape to implant into old image.
Note:
In the totals just the new Material Design Icons are included, the old
(obsolete, to be removed) range is not counted at all anymore.
Also did not change the distribution of the diagram. When we would
create a real sankey diagram (with the actual numbers) all the other
sets would be dwarfted by the new Material Design Icons.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
List comprehension helps with readability. Also add comments that
describe expected data structures of altuni and references. Also bump up
the patcher version number.
[how]
Use list comprehension. Add comments. Change the version number.
[why]
Using `continue` feels inelegant when there's a way to write the if
conditions in add_glyphrefs_to_essential() without necessitating the use
of `continue` while ensuring that the function still works as intended.
[how]
Change the `if` conditions and remove any usage of the `continue`
keyword in add_glyphrefs_to_essential().
[why]
Issue #400 recently reoccurred with the latest build of Input font, and
it turns out the dotless-j part of the small `j` now points to U+0237,
which in turn has an alternate unicode encoding to U+F6BE; overwriting
U+F6BE effectively overwrites U+0237, and in turn, alters the small `j`.
This patch aims to fix that.
[how]
In addition to references, the patcher also checks for alternate unicode
encodings which are returned by the glyph.altuni attribute, adds those
to the essential set of glyphs, and in turn recursively searches for
their references/alternate unicode encodings, making sure to handle
circular references (for example: U+2010 and U+2011 in Input Mono)
[why]
When HHEA and (depending on USE-TYPO-METRIC) TYPO or WIN are not
consistent it is unclear which metric we should trust.
In #1056 the complete font bounding box (i.e. yMin and yMax) has been
compared to the baseline to baseline distances, and in all these cases
the WIN values seem to be best (preserve the glyph bounding box).
font-line report fontname.ttf | grep metrics:
ttfdump -t head fontname.ttf | grep "yM(in|ax)"
[note]
Roboto will still be clipped?! There seem to be ridiculously high glyphs
in there. Did not check which.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The initial font-patcher used the WIN font metrics to determine the cell
height. What has been found was forced into HHEA metrics but without
observing the USE_TYPO_METRICS flag.
That has been changed to use the TYPO metric instead of the WIN metric
when the font wants that. For that the gap value becomes important.
This is the current code. It still has problems to detect the correct
cell height. A more rigorous approach seem to be needed.
[how]
The baseline to baseline distance is what we need as 'cell height', to
fill it completely with the powerline glyphs. This is a little bit
complicated and not really specified, each font rendering application or
engine can handle the font metrics differently. But there are some
common approaches.
So we try to come up with the correct and congruent height, comparing
different metrics and issuing a warning on problematic fonts.
Afterwards we make all metrics equal (even if they were not before),
because our goal is clear now and we impose it onto all platforms.
[note]
Useful resources:
* https://glyphsapp.com/learn/vertical-metrics
* https://github.com/source-foundry/font-lineFixes: #1056
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
The -l option tries to improve (especially) the powerline glyphs by
making the baseline to baseline height (cell height) an even number.
But it does so only for 2 of the three possible metrics.
[how]
Assuming the hight is identical for all metrics we just need to add '1'
to all ascender values.
[note]
I'm not sure this does anything. After rounding an odd height might
create a 'sharper' triangle tip, not an even height?
Do not understand the real reason for the -l option.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
More often than not (i.e. almost always) I cancel the release workflow.
The problem is that a release workflow will patch all fonts, and all
fonts will differ (at least in the timestamp) and so the repo will grow
A LOT. Usually you want to be really conciously deciding that the growth
is really warranted, and no automatic can do that.
I guess one could trigger rebuilding the zip archives but not commiting
the newly patched fonts back to the repo, but that is also a strange
situation.
[how]
Release has now only a workflow-dispatch trigger, that must be clicked
if a release workflow shall run.
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>