Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ryanoasis/nerd-fonts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: faf7503
Choose a base ref
...
head repository: ryanoasis/nerd-fonts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c8bd64c
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Sep 7, 2022

  1. font-patcher: Shift glyphs in a ScaleGlyph identically

    [why]
    Ranges of glyphs in the ScaleGlyph shall be handles 'as one' glyph,
    utilizing the same scale (and new: the same shift) for each of them.
    
    The shift has been ignored until now; each glyph is shifted based on its
    individual bounding box and not the combined bounding box.
    
    This is needed now for Braille glyphs, where the relative position of an
    identical 'dot' is of significance.
    
    [how]
    We use the ScaleGlyph's new combined bounding box feature (previous
    commit) to do the shifting based on that virtual box instead of the
    concrete glyph's box.
    
    For this to work we always prepareScaleGlyph(); previously we only did
    it if we needed the scale for --mono.
    
    Because we do the shifting after the scaling the combined bounding box
    also needs to be scaled.
    
    Cave: The actual glyph transformation (scaling) is not exact and incurs
    rounding errors. To prevent that we usually first scale, then determine
    the new bounding box (which is slightly different from what mathe-
    matically would be expected), then do the shift based on the new BB.
    
    This can not be done with our 'virtual' bounding box, so we resort to
    the 'mathematically correct' shift, which can be off by some 0.x %.
    Do not use this on glyphs that shall go right to the border of the font
    'cells'.
    To enforce this it is only active if we have a negative 'overlap' (i.e.
    padding) around that glyphs.
    
    Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
    Finii committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    8677331 View commit details
    Browse the repository at this point in the history
  2. font-patcher: Preserve padding around Braille glyphs

    [why]
    Usually we scale symbols so that they are maximized within one 'cell' of
    the font. If we do this for the Braille glyphs the bottom dots from un
    upper line will (almost) touch the top dots of the next line. This is
    not useful.
    
    [how]
    We add padding around the Braille glyphs, to get about the same distance
    to the cell borders as the different dots in one glyph have to the
    other (~10 %, 5% on each side).
    
    This also activated the previous commit's shift-fix-code that is only
    active on padded glyphs.
    
    Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
    Finii committed Sep 7, 2022
    Configuration menu
    Copy the full SHA
    c8bd64c View commit details
    Browse the repository at this point in the history
Loading