Feature: Variable GUI scale.

GUI scale is now variable from 100% to 500%, and no longer restricted to
powers-of-2.
This commit is contained in:
Peter Nelson
2021-04-20 11:49:20 +01:00
committed by PeterN
parent 13d271217f
commit 9666e46739
22 changed files with 175 additions and 205 deletions

View File

@@ -339,12 +339,12 @@ FallbackParagraphLayout::FallbackVisualRun::FallbackVisualRun(Font *font, const
/* Positions contains the location of the begin of each of the glyphs, and the end of the last one. */
this->positions = MallocT<float>(this->glyph_count * 2 + 2);
this->positions[0] = x;
this->positions[1] = 0;
this->positions[1] = font->fc->GetAscender();
for (int i = 0; i < this->glyph_count; i++) {
this->glyphs[i] = font->fc->MapCharToGlyph(chars[i]);
this->positions[2 * i + 2] = this->positions[2 * i] + font->fc->GetGlyphWidth(this->glyphs[i]);
this->positions[2 * i + 3] = 0;
this->positions[2 * i + 3] = font->fc->GetAscender();
this->glyph_to_char[i] = i;
}
}