mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Font: Allow switching between legacy non-portable metrics, and new portable metrics
This commit is contained in:
parent
4f2c287f9b
commit
c2fce879c5
12 changed files with 291 additions and 464 deletions
|
|
@ -81,7 +81,7 @@ void PositionedGlyph::createPath (Path& path) const
|
|||
if (auto t = font.getTypefacePtr())
|
||||
{
|
||||
Path p;
|
||||
t->getOutlineForGlyph (glyph, p);
|
||||
t->getOutlineForGlyph (font.getMetricsKind(), glyph, p);
|
||||
|
||||
path.addPath (p, AffineTransform::scale (font.getHeight() * font.getHorizontalScale(), font.getHeight())
|
||||
.translated (x, y));
|
||||
|
|
@ -96,7 +96,7 @@ bool PositionedGlyph::hitTest (float px, float py) const
|
|||
if (auto t = font.getTypefacePtr())
|
||||
{
|
||||
Path p;
|
||||
t->getOutlineForGlyph (glyph, p);
|
||||
t->getOutlineForGlyph (font.getMetricsKind(), glyph, p);
|
||||
|
||||
AffineTransform::translation (-x, -y)
|
||||
.scaled (1.0f / (font.getHeight() * font.getHorizontalScale()), 1.0f / font.getHeight())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue