这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Finii
Copy link
Collaborator

@Finii Finii commented Oct 12, 2022

Description

Fix empty Symbols Only Nerd Font Mono fonts.

Requirements / Checklist

What does this Pull Request (PR) do?

  • Make the empty-input-font detection more robust (such that the empty font may have linegap defined)
  • Remote the linegap from out symbols only font templates

How should this be manually tested?

Create a symbols only Mono variant and look at the glyphs. Are they existing and scaled ok?

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

Finii added 3 commits October 12, 2022 13:25
[why]
Use of abs() looks like we do not know if the descenders are expected
to be positive or negative. But it is well defined.

Furthermore on abnormal fonts (where the descenders are nonexisting)
we can use the wrong value. Well, that is academic I guess.

[how]
In our own `ymin` value we store a value like os2_descender, which means
that it is on the same axis as the ascender (ymax). Typical values where
the baseline is on y-coordinate 0 ymax will be positive and ymin (being
below the baseline) will be negative.

The total height has to be calculated from adding ascender + -descender
(when the descenders are lower than the ascenders, which is guaranteed).

The older descender values have positive values; are on an opposite y
axis... The height with them would be ascender + descender.

Well, WE have in the font_dim os2-like values...

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
If we have an empty input font (i.e. for Symbols Only font) and that
font has a gap.. That gap will be redistributed to a gapless font where
the ascenders and descenders are expanded to fill/keep the gap.

If the font has no height (i.e. == ) and a gap, the height will
afterwards be > 0 and the empty font detection breaks.

[how]
Detect empty fonts before gaps.

Fixes: #965

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
[why]
We do not want fonts with gap. Gaps are explicitely removed on patching
anyhow. Why should the templates have gaps?

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii merged commit f84b4a2 into master Oct 12, 2022
@Finii Finii deleted the bugfix/symbol-only-mono branch October 12, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants