from __future__ import annotations
from typing import Any, Protocol, runtime_checkable
from com.sun.star.uno import XInterface

@runtime_checkable
class XFont(XInterface, Protocol):
    def getFontDescriptor(self) -> FontDescriptor: ...
    def getFontMetric(self) -> SimpleFontMetric: ...
    def getCharWidth(self, c: str) -> int: ...
    def getCharWidths(self, nFirst: str, nLast: str) -> list[int]: ...
    def getStringWidth(self, str: str) -> int: ...
    def getStringWidthArray(self, str: str, aDXArray: sequence<long>) -> int: ...
    def getKernPairs(self, Chars1: sequence<char>, Chars2: sequence<char>, Kerns: sequence<short>) -> None: ...
