Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Font

Font

A font typeface for rendering text.

Constructor

  • Font(file_dir: str | PathLike, pt_size: int) → FontFont(file_dir: str | PathLike, pt_size: int) → Font

A font typeface for rendering text.

Properties


NameDescriptionType
alignmentGet or set the text alignment for wrapped text.TextAlign
ascentGet the pixel ascent of the font.int
boldGet or set whether bold text style is enabled.bool
descentGet the pixel descent of the font.int
heightGet the maximum pixel height of all glyphs in the font.int
hintingGet or set the font hinting mode.FontHint
italicGet or set whether italic text style is enabled.bool
kerningGet or set whether kerning is enabled.bool
line_spacingGet or set the spacing between lines of text in pixels.int
outlineGet or set the outline width in pixels (0 for no outline).int
pt_sizeGet or set the point size of the font. Values below 8 are clamped to 8.int
strikethroughGet or set whether strikethrough text style is enabled.bool
underlineGet or set whether underline text style is enabled.bool
PreviousFlip (Texture)
NextImageLayer

On this page

ConstructorProperties