Difference between revisions of "love.font.newTrueTypeRasterizer"

m (love.font.newTrueTypeRasterizer also didn't exist in 0.9, only love.font.newRasterizer)
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{newin|[[0.7.0]]|070|type=function}}
+
{{newin|[[0.10.0]]|100|type=function}}
Creates a new Rasterizer.
+
Creates a new TrueType Rasterizer.
  
 
== Function ==
 
== Function ==
Line 6: Line 6:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
rasterizer = love.font.newRasterizer( size )
+
rasterizer = love.font.newTrueTypeRasterizer( size, hinting, dpiscale )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|size|The font size.}}
+
{{param|number|size (12)|The font size.}}
 +
{{param|HintingMode|hinting ("normal")|True Type hinting mode.}}
 +
{{New feature|11.0|
 +
{{param|number|dpiscale ([[love.window.getDPIScale]]())|The font DPI scale.}}
 +
}}
 
=== Returns ===
 
=== Returns ===
{{param|TrueTypeRasterizer|rasterizer|The rasterizer.}}
+
{{param|Rasterizer|rasterizer|The rasterizer.}}
 +
 
 +
== Function ==
 +
Create a TrueTypeRasterizer with custom font.
 +
=== Synopsis ===
 +
<source lang="lua">
 +
rasterizer = love.font.newTrueTypeRasterizer( fileName, size, hinting, dpiscale )
 +
</source>
 +
=== Arguments ===
 +
{{param|string|fileName|Path to font file.}}
 +
{{param|number|size (12)|The font size.}}
 +
{{param|HintingMode|hinting ("normal")|True Type hinting mode.}}
 +
{{New feature|11.0|
 +
{{param|number|dpiscale ([[love.window.getDPIScale]]())|The font DPI scale.}}
 +
}}
 +
=== Returns ===
 +
{{param|Rasterizer|rasterizer|The rasterizer.}}
 +
 
 +
== Function ==
 +
Create a TrueTypeRasterizer with custom font.
 +
=== Synopsis ===
 +
<source lang="lua">
 +
rasterizer = love.font.newTrueTypeRasterizer( fileData, size, hinting, dpiscale )
 +
</source>
 +
=== Arguments ===
 +
{{param|FileData|fileData|File data containing font.}}
 +
{{param|number|size (12)|The font size.}}
 +
{{param|HintingMode|hinting ("normal")|True Type hinting mode.}}
 +
{{New feature|11.0|
 +
{{param|number|dpiscale ([[love.window.getDPIScale]]())|The font DPI scale.}}
 +
}}
 +
=== Returns ===
 +
{{param|Rasterizer|rasterizer|The rasterizer.}}
  
 
== See Also ==
 
== See Also ==
Line 17: Line 53:
 
* [[love.font.newRasterizer]]
 
* [[love.font.newRasterizer]]
 
* [[love.font.newBMFontRasterizer]]
 
* [[love.font.newBMFontRasterizer]]
 +
* [[love.font.newImageRasterizer]]
 
* [[Constructs::Rasterizer]]
 
* [[Constructs::Rasterizer]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Creates a new Rasterizer.}}
+
{{#set:Description=Creates a new TrueType Rasterizer.}}
 +
 
 
== Other Languages ==
 
== Other Languages ==
{{i18n|love.font.newRasterizer}}
+
{{i18n|love.font.newTrueTypeRasterizer}}

Latest revision as of 22:40, 25 January 2023

Available since LÖVE 0.10.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.
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.
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.
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