kopia lustrzana https://github.com/inkstitch/inkstitch
Sample correct font variant (#2883)
rodzic
9bd3f3658e
commit
6019f0cce0
|
@ -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'),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue