Commit c7d52079 authored by dmMaze's avatar dmMaze
Browse files

fix normal font weight #555

parent fb5dc203
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -627,10 +627,15 @@ class TextBlkItem(QGraphicsTextItem):
        font.setPointSizeF(ffmat.size)
        font.setBold(ffmat.bold)

        fweight = ffmat.weight
        if fweight is  None:
            fweight = font.weight()
            ffmat.weight = fweight

        self.document().setDefaultFont(font)
        format.setFont(font)
        format.setForeground(QColor(*ffmat.frgb))
        format.setFontWeight(ffmat.weight)
        format.setFontWeight(fweight)
        format.setFontItalic(ffmat.italic)
        format.setFontUnderline(ffmat.underline)
        if not ffmat.vertical:
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class FontFormat(Config):
    italic: bool = False
    alignment: int = 0
    vertical: bool = False
    weight: int = 50
    weight: int = None
    line_spacing: float = 1.2
    letter_spacing: float = 1.
    opacity: float = 1.
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ class TextBlock:
    _bounding_rect: List = None
    default_stroke_width: float = 0.2
    stroke_decide_by_colordiff: bool = True
    font_weight: int = 50
    font_weight: int = None
    opacity: float = 1.
    shadow_radius: float = 0.
    shadow_strength: float = 1.