Implemented exporting symbol fonts;

Rendering symbols to an image always uses anti-aliassing (by downsampling from a large size);
Finished the spoiler export template;
Added <soft-line> tag to make line breaks use the line height for soft line breaks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@440 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-27 18:58:43 +00:00
parent ef1ac8fd5b
commit 31b7380d99
19 changed files with 532 additions and 132 deletions
+19
View File
@@ -263,3 +263,22 @@ bool cannocial_name_compare(const String& as, const Char* b) {
a++; b++;
}
}
// ----------------------------------------------------------------------------- : Filenames
bool is_filename_char(Char c) {
return isAlnum(c) || c == _(' ') || c == _('_') || c == _('-') || c == _('.');
}
String clean_filename(const String& name) {
String clean;
FOR_EACH_CONST(c, name) {
if (is_filename_char(c)) {
clean += c;
}
}
if (clean.empty() || starts_with(clean, _("."))) {
clean = _("no-name") + clean;
}
return clean;
}