All constructors for making a TrueType font take an optional settings table.

This supersedes the existing optional hinting and dpi scale parameters. The table's fields are:
{
  hinting = "normal",
  dpiscale = 1, -- nil will default to the current window DPI scale.
}
This commit is contained in:
Sasha Szpakowski
2023-10-20 20:19:30 -03:00
parent 8c13943f64
commit 5a0a6a1a27
12 changed files with 84 additions and 74 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ struct Optional
hasValue = true;
}
T get(T defaultVal)
T get(T defaultVal) const
{
return hasValue ? value : defaultVal;
}