From 1d99c6222ac7d792acf3ea25985637ae5ad75e1c Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Sat, 13 Jul 2024 12:10:23 +0100 Subject: [PATCH] Update fonts.scad - added auto direction = rtl --- examples/fonts.scad | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/fonts.scad b/examples/fonts.scad index 15b796b..18242ee 100644 --- a/examples/fonts.scad +++ b/examples/fonts.scad @@ -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");