Difference between revisions of "Font:getDPIScale"

(Created page)
 
m (0.11.0 -> 11.0)
 
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=method}}
+
{{newin|[[11.0]]|110|type=method}}
 
Gets the DPI scale factor of the Font.
 
Gets the DPI scale factor of the Font.
  

Latest revision as of 18:34, 7 May 2019

Available since LÖVE 11.0
This method is not supported in earlier versions.

Gets the DPI scale factor of the Font.

The DPI scale factor represents relative pixel density. A DPI scale factor of 2 means the font's glyphs have twice the pixel density in each dimension (4 times as many pixels in the same area) compared to a font with a DPI scale factor of 1.

The font size of TrueType fonts is scaled internally by the font's specified DPI scale factor. By default, LÖVE uses the screen's DPI scale factor when creating TrueType fonts.

Function

Synopsis

dpiscale = Font:getDPIScale( )

Arguments

None.

Returns

number dpiscale
The DPI scale factor of the Font.

See Also

Other Languages