All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ru.casperix.multiplatform.text.TextGraphicProcessor.kt Maven / Gradle / Ivy

The newest version!
package ru.casperix.multiplatform.text

import ru.casperix.multiplatform.font.FontMetrics
import ru.casperix.multiplatform.font.FontReference
import ru.casperix.multiplatform.text.impl.TextDirectionSolver
import ru.casperix.multiplatform.text.impl.TextScheme
import ru.casperix.renderer.vector.VectorGraphic

interface TextGraphicProcessor {
    fun create(scheme: TextScheme): VectorGraphic
    fun getStringMetrics(font: FontReference, line: String): StringMetrics

    fun getFontMetrics(font: FontReference): FontMetrics
    fun isLeftToRight(line: String): Boolean {
        return TextDirectionSolver.isLeftToRight(line)
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy