Sample correct font variant (#2883)

pull/2885/head
Kaalleen 2024-05-07 23:36:35 +02:00 zatwierdzone przez GitHub
rodzic 9bd3f3658e
commit 6019f0cce0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
4 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -486,7 +486,7 @@ class FillStitch(EmbroideryElement):
sort_index=44)
def enable_random_stitches(self):
return self.get_boolean_param('enable_random_stitches', False)
@property
@param('random_stitch_length_jitter_percent',
_('Random stitch length jitter'),

Wyświetl plik

@ -5,7 +5,7 @@
from ..commands import is_command
from ..marker import has_marker
from ..svg.tags import EMBROIDERABLE_TAGS, SVG_IMAGE_TAG, SVG_PATH_TAG, SVG_TEXT_TAG
from ..svg.tags import EMBROIDERABLE_TAGS, SVG_IMAGE_TAG, SVG_TEXT_TAG
from .clone import Clone, is_clone
from .element import EmbroideryElement
from .empty_d_object import EmptyDObject

Wyświetl plik

@ -141,8 +141,10 @@ class FontSampleFrame(wx.Frame):
# parameters
line_width = self.max_line_width.GetValue()
direction = self.direction.GetValue()
font._load_variants()
font_variant = font.variants[self.direction.GetValue()]
font_variant = font.variants[direction]
# setup lines of text
text = ''
@ -184,7 +186,7 @@ class FontSampleFrame(wx.Frame):
width += width_to_add
# render text and close
font.render_text(text, self.layer)
font.render_text(text, self.layer, variant=direction, back_and_forth=False)
self.GetTopLevelParent().Close()
def cancel(self, event):

Wyświetl plik

@ -208,7 +208,7 @@ class Font(object):
line = line.strip()
letter_group = self._render_line(line, position, glyph_set)
if back_and_forth and self.reversible and i % 2 == 1:
if (back_and_forth and self.reversible and i % 2 == 1) or variant == '':
letter_group[:] = reversed(letter_group)
destination_group.append(letter_group)