Font: Allow setting dpi internally

This fixes some unexpected changes in text rendering for OpenFL which rely on a private function in Lime. Previously we defaulted at 72 dpi, which apparently is expected to layout the text properly. Most displays are 96 dpi or higher today, so we should probably look into this. For RenderGlyph, which was previously broken over several versions, we will now use a dpi of 96 for now. In the next version of lime, we absolutely should alter the function signature to allow for renderGlyph to accept a dpi argument.
This commit is contained in:
Chris Speciale
2024-10-30 12:49:30 -04:00
parent dbfd6615c0
commit 579efa5351
5 changed files with 27 additions and 19 deletions

View File

@@ -59,7 +59,7 @@ namespace lime {
int GetUnitsPerEM ();
int RenderGlyph (int index, Bytes *bytes, int offset = 0);
int RenderGlyphs (value indices, Bytes *bytes);
void SetSize (size_t size);
void SetSize (size_t size, size_t dpi);
void* library;
void* face;