Skip to content

Commit

Permalink
Don't use specific kilolitres codepoint glyph
Browse files Browse the repository at this point in the history
The font we use doesn't support that glyph, so work around it.

Contributes to issue #1830
  • Loading branch information
chriadam committed Feb 17, 2025
1 parent 3bbacdb commit 68c038c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,10 @@ quantityInfo Units::getDisplayTextWithHysteresis(VenusOS::Enums::Units_Type unit
// Litre scaling is special, only kilo range scaling is supported
if (unit == VenusOS::Enums::Units_Volume_Liter) {
if (isOverLimit(scaleMatch, VenusOS::Enums::Units_Scale_Kilo, previousScale)) {
// \u2113 = l, \u3398 = kl
quantity.unit = QStringLiteral("\u3398");
// \u2113 = litres symbol.
// we don't use \u3398 (kilolitres symbol)
// as it isn't available in the required font.
quantity.unit = QStringLiteral("k\u2113");
quantity.scale = VenusOS::Enums::Units_Scale_Kilo;
scaledValue = scaledValue / 1000.0;
}
Expand Down

0 comments on commit 68c038c

Please sign in to comment.