[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r12268: Give imported fonts at least
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r12268: Give imported fonts at least a chance of working. |
Date: |
Tue, 22 Jun 2010 12:09:24 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 12268 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2010-06-22 12:09:24 +0200
message:
Give imported fonts at least a chance of working.
modified:
libcore/parser/SWFMovieDefinition.cpp
=== modified file 'libcore/parser/SWFMovieDefinition.cpp'
--- a/libcore/parser/SWFMovieDefinition.cpp 2010-06-13 08:43:35 +0000
+++ b/libcore/parser/SWFMovieDefinition.cpp 2010-06-22 07:15:04 +0000
@@ -709,42 +709,26 @@
source->get_frame_count());
}
- // TODO: can this be anything else?
boost::intrusive_ptr<SWF::DefinitionTag> res =
source->getDefinitionTag(targetID);
-
- if (!res) {
- log_error(_("import error: could not find resource '%s' in "
- "movie '%s'"), symbolName, source->get_url());
+ if (res) {
+ // It's a character import.
+ addDisplayObject(id, res.get());
+ registerExport(symbolName, id);
+ ++importedSyms;
continue;
}
-#ifdef DEBUG_EXPORTS
- log_debug("Exporting symbol %s imported from source %s",
- symbolName, source->get_url());
-#endif
-
- // NB: we add this symbol with a new id, not its original one.
- registerExport(symbolName, id);
-
- if (Font* f = dynamic_cast<Font*>(res.get())) {
- // Add this shared font to the currently-loading movie.
+ Font* f = source->get_font(id);
+ if (f) {
+ // It's a font import
add_font(id, f);
- ++importedSyms;
- }
- else if (SWF::DefinitionTag* ch =
- dynamic_cast<SWF::DefinitionTag*>(res.get())) {
- // Add this DisplayObject to the loading movie.
-
- // NB: we add this character with a new id, not its original one.
- addDisplayObject(id, ch);
- ++importedSyms;
- }
- else {
- log_error(_("importResources error: unsupported import of '%s' "
- "from movie '%s' has unknown type"),
- symbolName, source->get_url());
- }
+ registerExport(symbolName, id);
+ ++importedSyms;
+ continue;
+ }
+ log_error(_("import error: could not find resource '%s' in "
+ "movie '%s'"), symbolName, source->get_url());
}
if (importedSyms) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r12268: Give imported fonts at least a chance of working.,
Benjamin Wolsey <=