Difference between revisions of "love.font.newRasterizer"
Buckle2000 (talk | contribs) |
(Expand all parameters) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | rasterizer = love.font.newRasterizer( | + | rasterizer = love.font.newRasterizer( filename ) |
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|string|filename|The font file.}} | ||
+ | === Returns === | ||
+ | {{param|Rasterizer|rasterizer|The rasterizer.}} | ||
+ | |||
+ | == Function == | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | rasterizer = love.font.newRasterizer( data ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|FileData|data|The FileData of the font file.}} | ||
+ | === Returns === | ||
+ | {{param|Rasterizer|rasterizer|The rasterizer.}} | ||
+ | |||
+ | == Function == | ||
+ | Create a TrueTypeRasterizer with the default font. | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | rasterizer = love.font.newRasterizer( size, hinting, dpiscale ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|number|size (12)|The font size.}} | ||
+ | {{New feature|0.10.0| | ||
+ | {{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.newRasterizer( fileName, size, hinting, dpiscale ) | ||
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param| | + | {{param|string|fileName|Path to font file.}} |
− | {{param| | + | {{param|number|size (12)|The font size.}} |
+ | {{New feature|0.10.0| | ||
+ | {{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.newRasterizer( fileData, size, hinting, dpiscale ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|FileData|fileData|File data containing font.}} | ||
+ | {{param|number|size (12)|The font size.}} | ||
+ | {{New feature|0.10.0| | ||
+ | {{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|Rasterizer|rasterizer|The rasterizer.}} | {{param|Rasterizer|rasterizer|The rasterizer.}} | ||
== Function == | == Function == | ||
+ | Creates a new BMFont Rasterizer. | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | rasterizer = love.font.newRasterizer( | + | rasterizer = love.font.newRasterizer( imageData, glyphs, dpiscale ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|string| | + | {{param|ImageData|imageData|The image data containing the drawable pictures of font glyphs.}} |
+ | {{param|string|glyphs|The sequence of glyphs in the ImageData.}} | ||
+ | {{New feature|11.0| | ||
+ | {{param|number|dpiscale (1)|DPI scale.}} | ||
+ | }} | ||
=== Returns === | === Returns === | ||
{{param|Rasterizer|rasterizer|The rasterizer.}} | {{param|Rasterizer|rasterizer|The rasterizer.}} | ||
== Function == | == Function == | ||
+ | Creates a new BMFont Rasterizer. | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | rasterizer = love.font.newRasterizer( | + | rasterizer = love.font.newRasterizer( fileName, glyphs, dpiscale ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param| | + | {{param|string|fileName|The path to file containing the drawable pictures of font glyphs.}} |
+ | {{param|string|glyphs|The sequence of glyphs in the ImageData.}} | ||
+ | {{New feature|11.0| | ||
+ | {{param|number|dpiscale (1)|DPI scale.}} | ||
+ | }} | ||
=== Returns === | === Returns === | ||
{{param|Rasterizer|rasterizer|The rasterizer.}} | {{param|Rasterizer|rasterizer|The rasterizer.}} | ||
Line 35: | Line 107: | ||
== See Also == | == See Also == | ||
* [[parent::love.font]] | * [[parent::love.font]] | ||
+ | * [[love.font.newTrueTypeRasterizer]] | ||
+ | * [[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 Rasterizer.}} | ||
+ | |||
== Other Languages == | == Other Languages == | ||
{{i18n|love.font.newRasterizer}} | {{i18n|love.font.newRasterizer}} |
Latest revision as of 08:52, 31 July 2020
Available since LÖVE 0.7.0 |
This function is not supported in earlier versions. |
Creates a new Rasterizer.
Contents
Function
Synopsis
rasterizer = love.font.newRasterizer( filename )
Arguments
string filename
- The font file.
Returns
Rasterizer rasterizer
- The rasterizer.
Function
Synopsis
rasterizer = love.font.newRasterizer( data )
Arguments
FileData data
- The FileData of the font file.
Returns
Rasterizer rasterizer
- The rasterizer.
Function
Create a TrueTypeRasterizer with the default font.
Synopsis
rasterizer = love.font.newRasterizer( 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.newRasterizer( fileName, size, hinting, dpiscale )
Arguments
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.newRasterizer( fileData, size, hinting, dpiscale )
Arguments
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
Creates a new BMFont Rasterizer.
Synopsis
rasterizer = love.font.newRasterizer( imageData, glyphs, dpiscale )
Arguments
ImageData imageData
- The image data containing the drawable pictures of font glyphs.
string glyphs
- The sequence of glyphs in the ImageData.
Available since LÖVE 11.0
number dpiscale (1)
- DPI scale.
Returns
Rasterizer rasterizer
- The rasterizer.
Function
Creates a new BMFont Rasterizer.
Synopsis
rasterizer = love.font.newRasterizer( fileName, glyphs, dpiscale )
Arguments
string fileName
- The path to file containing the drawable pictures of font glyphs.
string glyphs
- The sequence of glyphs in the ImageData.
Available since LÖVE 11.0
number dpiscale (1)
- DPI scale.
Returns
Rasterizer rasterizer
- The rasterizer.
See Also
- love.font
- love.font.newTrueTypeRasterizer
- love.font.newBMFontRasterizer
- love.font.newImageRasterizer
- Rasterizer
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info