import typing

import android.content.res
import android.graphics
import android.os
import java
import java.chaquopy
import java.io
import java.lang
import java.nio
import java.util

class Font(java.lang.Object):
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getAxes(self) -> java.chaquopy.JavaArray[FontVariationAxis] | None: ...
    def getBuffer(self) -> java.nio.ByteBuffer: ...
    def getFile(self) -> java.io.File | None: ...
    def getGlyphBounds(self, glyphId: int | java.jint | java.lang.Integer, paint: android.graphics.Paint, outBoundingBox: android.graphics.RectF, /) -> float: ...
    def getLocaleList(self) -> android.os.LocaleList: ...
    def getMetrics(self, paint: android.graphics.Paint, outMetrics: android.graphics.Paint.FontMetrics, /) -> None: ...
    def getSourceIdentifier(self) -> int: ...
    def getStyle(self) -> FontStyle: ...
    def getTtcIndex(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

    class Builder(java.lang.Object):
        @typing.overload
        def __init__(self, font: Font, /) -> None: ...
        @typing.overload
        def __init__(self, fd: android.os.ParcelFileDescriptor, /) -> None: ...
        @typing.overload
        def __init__(self, path: java.io.File, /) -> None: ...
        @typing.overload
        def __init__(self, buffer: java.nio.ByteBuffer, /) -> None: ...
        @typing.overload
        def __init__(self, am: android.content.res.AssetManager, path: str | java.lang.String, /) -> None: ...
        @typing.overload
        def __init__(self, res: android.content.res.Resources, resId: int | java.jint | java.lang.Integer, /) -> None: ...
        @typing.overload
        def __init__(self, fd: android.os.ParcelFileDescriptor, offset: int | java.jlong | java.lang.Long, size: int | java.jlong | java.lang.Long, /) -> None: ...
        def build(self) -> Font: ...
        @typing.overload
        def setFontVariationSettings(self, variationSettings: str | java.lang.String, /) -> Font.Builder: ...
        @typing.overload
        def setFontVariationSettings(self, axes: java.chaquopy.JavaArray[FontVariationAxis], /) -> Font.Builder: ...
        def setSlant(self, slant: int | java.jint | java.lang.Integer, /) -> Font.Builder: ...
        def setTtcIndex(self, ttcIndex: int | java.jint | java.lang.Integer, /) -> Font.Builder: ...
        def setWeight(self, weight: int | java.jint | java.lang.Integer, /) -> Font.Builder: ...

class FontFamily(java.lang.Object):
    def getFont(self, index: int | java.jint | java.lang.Integer, /) -> Font: ...
    def getSize(self) -> int: ...

    class Builder(java.lang.Object):
        def __init__(self, font: Font, /) -> None: ...
        def addFont(self, font: Font, /) -> FontFamily.Builder: ...
        def build(self) -> FontFamily: ...
        def buildVariableFamily(self) -> FontFamily: ...

class FontStyle(java.lang.Object):
    FONT_SLANT_ITALIC: typing.ClassVar[int] = ...
    FONT_SLANT_UPRIGHT: typing.ClassVar[int] = ...
    FONT_WEIGHT_BLACK: typing.ClassVar[int] = ...
    FONT_WEIGHT_BOLD: typing.ClassVar[int] = ...
    FONT_WEIGHT_EXTRA_BOLD: typing.ClassVar[int] = ...
    FONT_WEIGHT_EXTRA_LIGHT: typing.ClassVar[int] = ...
    FONT_WEIGHT_LIGHT: typing.ClassVar[int] = ...
    FONT_WEIGHT_MAX: typing.ClassVar[int] = ...
    FONT_WEIGHT_MEDIUM: typing.ClassVar[int] = ...
    FONT_WEIGHT_MIN: typing.ClassVar[int] = ...
    FONT_WEIGHT_NORMAL: typing.ClassVar[int] = ...
    FONT_WEIGHT_SEMI_BOLD: typing.ClassVar[int] = ...
    FONT_WEIGHT_THIN: typing.ClassVar[int] = ...
    FONT_WEIGHT_UNSPECIFIED: typing.ClassVar[int] = ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def __init__(self, weight: int | java.jint | java.lang.Integer, slant: int | java.jint | java.lang.Integer, /) -> None: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    def getSlant(self) -> int: ...
    def getWeight(self) -> int: ...
    def hashCode(self) -> int: ...
    def toString(self) -> str: ...

class FontVariationAxis(java.lang.Object):
    def __init__(self, tagString: str | java.lang.String, styleValue: float | java.jfloat | java.lang.Float, /) -> None: ...
    def equals(self, o: java.lang.Object | int | bool | float | str, /) -> bool: ...
    @staticmethod
    def fromFontVariationSettings(settings: str | java.lang.String, /) -> java.chaquopy.JavaArray[FontVariationAxis] | None: ...
    def getStyleValue(self) -> float: ...
    def getTag(self) -> str: ...
    def hashCode(self) -> int: ...
    @staticmethod
    def toFontVariationSettings(axes: java.chaquopy.JavaArray[FontVariationAxis], /) -> str: ...
    def toString(self) -> str: ...

class SystemFonts(java.lang.Object):
    @staticmethod
    def getAvailableFonts() -> java.util.Set[Font]: ...
