-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
font-patcher: Add progress indicators #1733
Draft
Finii
wants to merge
5
commits into
master
Choose a base branch
from
feature/progress-indicators
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+494
−33
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Something is wrong with the width when Compare handling of |
[note] Glyphs taken from FiraCode; remove negative bearings and add a helper glyphs for vertical alignment that is used for the combined boundingbox calculation but not patched in. Fixes: #1345 Signed-off-by: Fini Jastrow <[email protected]>
Finii
force-pushed
the
feature/progress-indicators
branch
from
November 14, 2024 11:40
d89c9a4
to
054dbc0
Compare
There is obviously a problem with center aligned glyphs... But that is already there before this MR :-( Two notabke commits: acd49cc
Glyphs to check
master branchCommit 81d052bCommit ?Another |
Finii
force-pushed
the
feature/progress-indicators
branch
from
November 14, 2024 14:29
054dbc0
to
943980a
Compare
Signed-off-by: Fini Jastrow <[email protected]>
|
Finii
force-pushed
the
feature/progress-indicators
branch
from
November 14, 2024 23:20
943980a
to
ac13251
Compare
[why] It can be confusing what is or is not synced when scaling-shifting. [how] Add text from commit: 90bde73 font-patcher: Use ScaleGlyph BB to align glyph Also add a new (documentary) property for the tables that can be checked so that nothing unexpected will happen. Signed-off-by: Fini Jastrow <[email protected]>
[why] All the glyphs have overlap (negative bearings). That in itself is ok, altough it (the glyph width for example) is not consistent for all subsets. The overlaps can interact strangely with the overlap given by the font-patcher script. [how] It seems better to remove the negative bearings. Also some glyph width are corrected (unified). The font is then stored uncompressed. [note] The script used to modify the font: import fontforge, psMat font = fontforge.open('src/glyphs/extraglyphs_orig.sfd') font.encoding = 'UnicodeFull' def adjust(f, rang, left, width): for c in rang: g = f[c] if c in range(0x2599, 0x259f + 1): plus = 0 g.transform(psMat.scale(1233/1234, 1)) if c == 0x259D or c == 0x2595: g.width = width g.right_side_bearing = 0 else: g.left_side_bearing = int(g.left_side_bearing + left) g.width = width print('{:X} {} {} {} {}'.format(c, g.boundingBox(), g.left_side_bearing, g.width, g.right_side_bearing)) adjust(font, [*range(0x2500, 0x2570 + 1), *range(0x2574, 0x257f + 1)], 20, 1233 + 40) adjust(font, range(0x2571, 0x2573 + 1), 87, 1280+127) adjust(font, range(0x2580, 0x259f + 1), 0, 1233) font.generate('TEST.sfd') font.generate('TEST.ttf') Signed-off-by: Fini Jastrow <[email protected]>
[why] The shifting in the final patched font is broken for the 'blocks' subset. The reason is that it contains a glyph that is one unit too small. [how] Manually shift the points to make it as wide as the others. Signed-off-by: Fini Jastrow <[email protected]>
Finii
force-pushed
the
feature/progress-indicators
branch
from
November 15, 2024 11:47
ac13251
to
6a07537
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #1345
Description
Please explain the changes you made here.
Requirements / Checklist
Issue number where discussion took place: #xxx
What does this Pull Request (PR) do?
How should this be manually tested?
Any background context you can provide?
What are the relevant tickets (if any)?
Screenshots (if appropriate or helpful)