mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
@@ -56,10 +56,6 @@ ImagesExportWindow::ImagesExportWindow(Window* parent, const SetP& set)
|
||||
|
||||
// ----------------------------------------------------------------------------- : Exporting the images
|
||||
|
||||
bool is_filename_char(Char c) {
|
||||
return isAlnum(c) || c == _(' ') || c == _('_') || c == _('-') || c == _('.');
|
||||
}
|
||||
|
||||
void ImagesExportWindow::onOk(wxCommandEvent&) {
|
||||
// Update settings
|
||||
GameSettings& gs = settings.gameSettingsFor(*set->game);
|
||||
@@ -85,16 +81,7 @@ void ImagesExportWindow::onOk(wxCommandEvent&) {
|
||||
String filename = untag(ctx.eval(*filename_script)->toString());
|
||||
if (!filename) continue; // no filename -> no saving
|
||||
// sanitize filename
|
||||
String clean_filename;
|
||||
FOR_EACH(c, filename) {
|
||||
if (is_filename_char(c)) {
|
||||
clean_filename += c;
|
||||
}
|
||||
}
|
||||
if (clean_filename.empty() || starts_with(clean_filename, _("."))) {
|
||||
clean_filename = _("no-name") + clean_filename;
|
||||
}
|
||||
fn.SetFullName(clean_filename);
|
||||
fn.SetFullName(clean_filename(filename));
|
||||
// does the file exist?
|
||||
if (fn.FileExists()) {
|
||||
// file exists, what to do?
|
||||
|
||||
Reference in New Issue
Block a user