material symbols: prevent memory spikes

This commit is contained in:
end-4
2025-06-08 08:19:15 +02:00
parent 0b7f80ed05
commit f084cd7a23
@@ -6,6 +6,7 @@ Text {
id: root id: root
property real iconSize: Appearance?.font.pixelSize.small ?? 16 property real iconSize: Appearance?.font.pixelSize.small ?? 16
property real fill: 0 property real fill: 0
property real truncatedFill: Math.round(fill * 100) / 100 // Reduce memory consumption spikes from constant font remapping
renderType: Text.NativeRendering renderType: Text.NativeRendering
font.hintingPreference: Font.PreferFullHinting font.hintingPreference: Font.PreferFullHinting
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
@@ -22,7 +23,7 @@ Text {
} }
font.variableAxes: { font.variableAxes: {
"FILL": fill, "FILL": truncatedFill,
// "wght": font.weight, // "wght": font.weight,
// "GRAD": 0, // "GRAD": 0,
"opsz": iconSize, "opsz": iconSize,