Merge pull request #45 from openscad/ochafik-patch-1

Update examples/fonts.scad - added auto direction = rtl
This commit is contained in:
Olivier Chafik 2024-07-13 12:10:48 +01:00 committed by GitHub
commit d6e7304cca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,11 +86,17 @@ greeting = struct_val([
["Thai", "สวัสดี"],
["Tibetan", "བཀྲ་ཤིས་བདེ་ལེགས།"],
["Tifinagh", "ⴰⵣⵓⵍ"],
], language, "Hello");
], script, "Hello");
echo(script=script,
greeting=greeting,
direction = struct_val([
["Arabic", "rtl"],
["Hebrew", "rtl"],
], script, "ltr");
echo(greeting=greeting,
font=font,
script=script,
direction=direction,
style=style);
color("gray")
@ -99,6 +105,7 @@ color("gray")
text(
greeting,
font=str(font, ":style=", style),
direction=direction,
script=script,
halign="center",
valign="center");