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
+1 -14
View File
@@ -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?