Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
添加抽象类约束
Browse files Browse the repository at this point in the history
  • Loading branch information
TakWolf committed Jul 19, 2023
1 parent 19e7fc7 commit ba9fe9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nico_font_tool/font.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from abc import ABCMeta, abstractmethod
from typing import Iterator


class FontRasterizer:
class FontRasterizer(metaclass=ABCMeta):
def __init__(
self,
ascent: int,
Expand All @@ -26,5 +27,6 @@ def line_height(self) -> int:
def adjusted_line_height(self) -> int:
return self.line_height + self.glyph_adjust_height

@abstractmethod
def rasterize_glyphs_in_order(self) -> Iterator[tuple[str, list[list[int]], int]]:
raise NotImplementedError()

0 comments on commit ba9fe9c

Please sign in to comment.