Skip to content

Commit

Permalink
black format platform.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stenson committed Jan 17, 2025
1 parent ebad85f commit 244bab9
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Lib/fontgoggles/misc/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ class PlatformCocoa:
@staticmethod
def pathFromArrays(font, points, tags, contours):
from ..mac.makePathFromOutline import makePathFromArrays
return makePathFromArrays(points, tags, contours)

return makePathFromArrays(points, tags, contours)

@staticmethod
def pathFromGlyph(font, gid):
from ..mac.makePathFromOutline import makePathFromGlyph
return makePathFromGlyph(font, gid)

return makePathFromGlyph(font, gid)

@staticmethod
def convertRect(r):
from ..mac.drawing import rectFromNSRect
return rectFromNSRect(r)

return rectFromNSRect(r)

@staticmethod
def convertColor(c):
from ..mac.drawing import nsColorFromRGBA
return nsColorFromRGBA(c)

return nsColorFromRGBA(c)

@staticmethod
def drawCOLRv1Glyph(colorFont, glyphName, colorPalette, defaultColor):
Expand All @@ -54,7 +54,6 @@ def drawCOLRv1Glyph(colorFont, glyphName, colorPalette, defaultColor):
textColor=defaultColor,
)


class PenWrapper:
def __init__(self, glyphSet, path=None):
self.pen = CocoaPen(glyphSet, path=path)
Expand All @@ -73,29 +72,24 @@ def pathFromArrays(font, points, tags, contours):
font.draw(rp)
return rp


@staticmethod
def pathFromGlyph(font, gid):
rp = RecordingPen()
font.draw_glyph_with_pen(gid, rp)
return rp


@staticmethod
def convertRect(r):
raise NotImplementedError()


@staticmethod
def convertColor(c):
raise NotImplementedError()


@staticmethod
def drawCOLRv1Glyph(colorFont, glyphName, colorPalette, defaultColor):
raise NotImplementedError()


class PenWrapper:
def __init__(self, glyphSet, path=None):
self.pen = RecordingPen()
Expand All @@ -118,4 +112,4 @@ def setUseCocoa(onOff):


def getUseCocoa():
return platform is PlatformCocoa
return platform is PlatformCocoa

0 comments on commit 244bab9

Please sign in to comment.