forked from 1b-agent/opencadstudio-upstream
feat(text): TEXTFILL — fill or hollow TrueType glyphs (#260)
TEXTFILL 1 (default) fills TrueType text; TEXTFILL 0 draws it hollow (outline only). Settable directly or via SETVAR, 0/1 or ON/OFF. SHX/LFF stroke fonts are unaffected. Reuses the existing stroke-SDF path: bake_glyph treats a TTF glyph as a stroke (outline) field instead of a signed fill field when TEXTFILL is off. Toggling resets the glyph atlas and re-tessellates text so quads pick up the re-baked tiles. Persisted in user settings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
694c5b5a7f
commit
3c3ca89d97
5 files changed
+60
-2
No files matched your search
@@ -79,6 +79,7 @@ impl OpenCADStudio {
|
||||
},
|
||||
plugin_repos: self.plugin_repos.clone(),
|
||||
texteditmode: self.texteditmode,
|
||||
textfill: crate::scene::text::sdf_atlas::textfill(),
|
||||
backup_on_save: self.backup_on_save,
|
||||
file_assoc_enabled: self.file_assoc_enabled,
|
||||
savetime_min: self.savetime_min,
|
||||
@@ -100,6 +101,7 @@ impl OpenCADStudio {
|
||||
self.disabled_plugins = s.disabled_plugins.iter().cloned().collect();
|
||||
self.plugin_repos = s.plugin_repos.clone();
|
||||
self.texteditmode = s.texteditmode;
|
||||
crate::scene::text::sdf_atlas::set_textfill(s.textfill);
|
||||
self.backup_on_save = s.backup_on_save;
|
||||
self.file_assoc_enabled = s.file_assoc_enabled;
|
||||
self.savetime_min = s.savetime_min;
|
||||
|
||||
Reference in new issue
Block a user