from _typeshed import Incomplete
from typing import Final, Literal

from reportlab.pdfbase import pdfmetrics

__version__: Final[str]
DISABLE_CMAP: bool

def findCMapFile(name: str) -> str: ...
def structToPDF(structure): ...

class CIDEncoding(pdfmetrics.Encoding):
    name: Incomplete
    source: str | None
    def __init__(self, name, useCache: bool | Literal[0, 1] = 1) -> None: ...
    def parseCMAPFile(self, name) -> None: ...
    def translate(self, text) -> list[Incomplete]: ...
    def fastSave(self, directory) -> None: ...
    def fastLoad(self, directory) -> None: ...
    def getData(self) -> dict[str, Incomplete]: ...

class CIDTypeFace(pdfmetrics.TypeFace):
    def __init__(self, name) -> None: ...
    def getCharWidth(self, characterId): ...

class CIDFont(pdfmetrics.Font):
    faceName: Incomplete
    face: CIDTypeFace
    encodingName: Incomplete
    encoding: CIDEncoding
    fontName: Incomplete
    name: Incomplete
    isVertical: bool
    substitutionFonts: list[Incomplete]
    def __init__(self, face, encoding) -> None: ...
    def formatForPdf(self, text) -> str: ...
    def stringWidth(self, text, size, encoding=None) -> float: ...
    def addObjects(self, doc) -> None: ...

class UnicodeCIDFont(CIDFont):
    language: str
    name: Incomplete
    fontName: Incomplete
    vertical: bool
    isHalfWidth: bool
    unicodeWidths: Incomplete
    def __init__(self, face: str, isVertical: bool = False, isHalfWidth: bool = False) -> None: ...
    def formatForPdf(self, text) -> str: ...
    def stringWidth(self, text, size, encoding=None) -> float: ...

def precalculate(cmapdir) -> None: ...
def test() -> None: ...
