Difference between revisions of "love.font.newTrueTypeRasterizer"

m (Updated page)
m (From source code.)
Line 6: Line 6:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
rasterizer = love.font.newTrueTypeRasterizer( size, hinting_mode, DPIScale )
+
rasterizer = love.font.newTrueTypeRasterizer( size, hinting, dpiscale )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
 
{{param|number|size (12)|The font size.}}
 
{{param|number|size (12)|The font size.}}
 
{{New feature|0.10.0|
 
{{New feature|0.10.0|
{{param|HintingMode|hinting_mode ("normal")|True Type hinting mode.}}
+
{{param|HintingMode|hinting ("normal")|True Type hinting mode.}}
 
}}
 
}}
 
{{New feature|11.0|
 
{{New feature|11.0|
{{param|number|DPIScale|The font DPI scale.}}
+
{{param|number|dpiscale ([[love.window.getDPIScale]]())|The font DPI scale.}}
 
}}
 
}}
 
=== Returns ===
 
=== Returns ===
Line 23: Line 23:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
rasterizer = love.font.newTrueTypeRasterizer( fileName, size, hinting_mode, DPIScale )
+
rasterizer = love.font.newTrueTypeRasterizer( fileName, size, hinting, dpiscale )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 29: Line 29:
 
{{param|number|size (12)|The font size.}}
 
{{param|number|size (12)|The font size.}}
 
{{New feature|0.10.0|
 
{{New feature|0.10.0|
{{param|HintingMode|hinting_mode ("normal")|True Type hinting mode.}}
+
{{param|HintingMode|hinting ("normal")|True Type hinting mode.}}
 
}}
 
}}
 
{{New feature|11.0|
 
{{New feature|11.0|
{{param|number|DPIScale|The font DPI scale.}}
+
{{param|number|dpiscale ([[love.window.getDPIScale]]())|The font DPI scale.}}
 
}}
 
}}
 
=== Returns ===
 
=== Returns ===
Line 41: Line 41:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
rasterizer = love.font.newTrueTypeRasterizer( fileData, size, hinting_mode, DPIScale )
+
rasterizer = love.font.newTrueTypeRasterizer( fileData, size, hinting, dpiscale )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 47: Line 47:
 
{{param|number|size (12)|The font size.}}
 
{{param|number|size (12)|The font size.}}
 
{{New feature|0.10.0|
 
{{New feature|0.10.0|
{{param|HintingMode|hinting_mode ("normal")|True Type hinting mode.}}
+
{{param|HintingMode|hinting ("normal")|True Type hinting mode.}}
 
}}
 
}}
 
{{New feature|11.0|
 
{{New feature|11.0|
{{param|number|DPIScale|The font DPI scale.}}
+
{{param|number|dpiscale ([[love.window.getDPIScale]]())|The font DPI scale.}}
 
}}
 
}}
 
=== Returns ===
 
=== Returns ===

Revision as of 08:44, 31 July 2020

Available since LÖVE 0.7.0
This function is not supported in earlier versions.

Creates a new TrueType Rasterizer.

Function

Create a TrueTypeRasterizer with the default font.

Synopsis

rasterizer = love.font.newTrueTypeRasterizer( size, hinting, dpiscale )

Arguments

number size (12)
The font size.
Available since LÖVE 0.10.0
HintingMode hinting ("normal")
True Type hinting mode.


Available since LÖVE 11.0
number dpiscale (love.window.getDPIScale())
The font DPI scale.

Returns

Rasterizer rasterizer
The rasterizer.

Function

Create a TrueTypeRasterizer with custom font.

Synopsis

rasterizer = love.font.newTrueTypeRasterizer( fileName, size, hinting, dpiscale )

Arguments

string fileName
Path to font file.
number size (12)
The font size.
Available since LÖVE 0.10.0
HintingMode hinting ("normal")
True Type hinting mode.


Available since LÖVE 11.0
number dpiscale (love.window.getDPIScale())
The font DPI scale.

Returns

Rasterizer rasterizer
The rasterizer.

Function

Create a TrueTypeRasterizer with custom font.

Synopsis

rasterizer = love.font.newTrueTypeRasterizer( fileData, size, hinting, dpiscale )

Arguments

FileData fileData
File data containing font.
number size (12)
The font size.
Available since LÖVE 0.10.0
HintingMode hinting ("normal")
True Type hinting mode.


Available since LÖVE 11.0
number dpiscale (love.window.getDPIScale())
The font DPI scale.

Returns

Rasterizer rasterizer
The rasterizer.

See Also


Other Languages