Package-level declarations
Types
Link copied to clipboard
                  interface BaseTextMetricsResult
Link copied to clipboard
                  abstract class BaseTtfFont(s: FastByteArrayInputStream, extName: String? = null, onlyReadMetadata: Boolean = false, enableLigatures: Boolean = true) : VectorFont, Extra
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  open class FolderBasedNativeSystemFontProvider(val context: CoroutineContext, val folders: List<String> = (linuxFolders + windowsFolders + macosFolders + androidFolders + iosFolders).distinct(), val fontCacheFile: VfsFile = standardVfs.userSharedCacheFile("korimFontCache")) : TtfNativeSystemFontProvider
Link copied to clipboard
                  Link copied to clipboard
                  interface FontRegistry
Link copied to clipboard
                  Link copied to clipboard
                  class LazyBitmapFont(val font: VectorFont, val fontSize: Double, val distanceField: String? = null) : BitmapFont, Extra
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  data class PlacedGlyphMetrics(val codePoint: Int, val pos: Point, val metrics: GlyphMetrics, val fontMetrics: FontMetrics, val transform: Matrix, val index: Int, val nline: Int)
Link copied to clipboard
                  class SystemFont(val name: String, val coroutineContext: CoroutineContext) : VectorFont, Resourceable<Font> , Extra
Link copied to clipboard
                  data class TextMetrics(var bounds: Rectangle = Rectangle(), var lineBounds: List<Rectangle> = emptyList(), val fontMetrics: FontMetrics = FontMetrics(), var nlines: Int = 0)
Link copied to clipboard
                  data class TextMetricsResult(var fmetrics: FontMetrics = FontMetrics(), var metrics: TextMetrics = TextMetrics(), var glyphs: List<PlacedGlyphMetrics> = emptyList(), var glyphsPerLine: List<List<PlacedGlyphMetrics>> = emptyList()) : BaseTextMetricsResult
Link copied to clipboard
                  data class TextToBitmapResult(val bmp: Bitmap, val fmetrics: FontMetrics, val metrics: TextMetrics, val glyphs: List<PlacedGlyphMetrics>, val glyphsPerLine: List<List<PlacedGlyphMetrics>>, val shape: Shape? = null) : BaseTextMetricsResult
Link copied to clipboard
                  object TtfCIDFont
Compact Font Format font representation (also known as a PostScript Type 1, or CIDFont) https://docs.microsoft.com/en-us/typography/opentype/spec/cff
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Properties
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  Gets a BitmapFont from the font, that is going to be computed lazily as glyphs are required.
Returns, creates and caches a LazyBitmapFont instance from the VectorFont that will generate and cache glyphs as required.
Link copied to clipboard
                  Functions
Link copied to clipboard
                  Link copied to clipboard
                  fun Bitmap32.drawText(font: BitmapFont, str: String, pos: Point = Point.ZERO, color: RGBA = Colors.WHITE, size: Double = font.fontSize, alignment: TextAlignment = TextAlignment.TOP_LEFT): Bitmap32
fun <T> Font.drawText(ctx: Context2d?, size: Double, text: T, paint: Paint?, pos: Point = Point.ZERO, fill: Boolean = true, renderer: TextRenderer<T> = DefaultStringTextRenderer as TextRenderer<T>, align: TextAlignment = TextAlignment.BASELINE_LEFT, outMetrics: TextMetricsResult? = null, fillStyle: Paint? = null, stroke: Stroke? = null, textRangeStart: Int = 0, textRangeEnd: Int = Int.MAX_VALUE, placed: TextRendererActions.(codePoint: Int, Point, size: Double, metrics: GlyphMetrics, fmetrics: FontMetrics, transform: Matrix) -> Unit? = null): TextMetricsResult?
Link copied to clipboard
                  fun <T> Font.getTextBounds(size: Double, text: T, out: TextMetrics = TextMetrics(), renderer: TextRenderer<T> = DefaultStringTextRenderer as TextRenderer<T>, align: TextAlignment = TextAlignment.TOP_LEFT): TextMetrics
Link copied to clipboard
                  fun <T> Font.getTextBoundsWithGlyphs(size: Double, text: T, renderer: TextRenderer<T> = DefaultStringTextRenderer as TextRenderer<T>, align: TextAlignment = TextAlignment.BASELINE_LEFT): TextMetricsResult
Link copied to clipboard
                  Link copied to clipboard
                  suspend fun VfsFile.readBitmapFont(props: ImageDecodingProps = ImageDecodingProps.DEFAULT, mipmaps: Boolean = true, atlas: MutableAtlasUnit? = null): BitmapFont
Link copied to clipboard
                  suspend fun VfsFile.readTtfFont(onlyReadMetadata: Boolean = false, enableLigatures: Boolean = true): TtfFont
Link copied to clipboard
                  Link copied to clipboard
                  inline fun <T> Font.registerTemporarily(registry: DefaultFontRegistry, name: String = this.name, block: () -> T): T
Link copied to clipboard
                  fun Font.renderGlyphToBitmap(size: Double, codePoint: Int, paint: Paint = DefaultPaint, fill: Boolean = true, effect: BitmapEffect? = null, border: Int = 1, nativeRendering: Boolean = true, reader: WStringReader? = null): TextToBitmapResult
Link copied to clipboard
                  fun <T> Font.renderTextToBitmap(size: Double, text: T, paint: Paint = DefaultPaint, background: Paint = NonePaint, fill: Boolean = true, border: Int = 0, renderer: TextRenderer<T> = DefaultStringTextRenderer as TextRenderer<T>, returnGlyphs: Boolean = true, nativeRendering: Boolean = true, drawBorder: Boolean = false): TextToBitmapResult
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard
                  inline fun Font.toBitmapFont(fontSize: Number, chars: CharacterSet = CharacterSet.LATIN_ALL, fontName: String = this.name, paint: Paint = Colors.WHITE, mipmaps: Boolean = true, effect: BitmapEffect? = null): BitmapFont
Link copied to clipboard
                  Link copied to clipboard
                  Link copied to clipboard