chisel v0.2.0 Chisel.Font View Source

Font

Link to this section Summary

Functions

Loads a font from a file

Link to this section Types

Link to this type

load_opts()

View Source
load_opts() :: [
  {:encoding,
   :latin1
   | :unicode
   | :utf8
   | :utf16
   | :utf32
   | {:utf16, :big | :little}
   | {:utf32, :big | :little}}
]
Link to this type

t()

View Source
t() :: %Chisel.Font{
  glyphs: %{required(Chisel.Font.Glyph.codepoint()) => Chisel.Font.Glyph.t()},
  name: String.t(),
  offset: {x :: integer(), y :: integer()},
  size: {w :: integer(), h :: integer()}
}

Link to this section Functions

Link to this function

load(filename, opts \\ [])

View Source
load(filename :: String.t(), opts :: load_opts()) ::
  {:ok, Chisel.Font.t()} | {:error, term()}

Loads a font from a file