This makes it possible to decompile the Edje properly.
--
-$Id: ChangeLog 47 2005-06-08 20:05:19Z tilman $
+$Id: ChangeLog 48 2005-06-08 21:38:34Z tilman $
++
2005-06-08 Tilman Sauerbeck (tilman at code-monkey de)
* lib/redact/part.rb: Also set TextDescription::font if a
matching FontDirectoryEntry was found
* lib/redact/{redact,app}.rb: Improved imagedir support
+ * lib/redact/{app,redact,part,source}.rb: Split a font's filename and
+ its alias, so the Edje can be decompiled properly
2005-05-29 Tilman Sauerbeck (tilman at code-monkey de)
* Rakefile: Use FileUtils.mkdir_p to create the destination
#--
-# $Id: app.rb 43 2005-06-08 17:31:47Z tilman $
+# $Id: app.rb 48 2005-06-08 21:38:34Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
def dump_fonts(ef)
EDJE.font_dir.each do |entry|
- ef.write("fonts/#{entry.filename}",
+ ef.write("fonts/#{entry.alias}",
File.read(entry.filename))
end
end
#--
-# $Id: part.rb 47 2005-06-08 20:05:19Z tilman $
+# $Id: part.rb 48 2005-06-08 21:38:34Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
found = EDJE.font_dir.find { |font| font.filename == f2 }
if found.nil?
EDJE.font_dir << FontDirectoryEntry.new(f2)
- @font = EDJE.font_dir.last.filename
+ @font = EDJE.font_dir.last.alias
else
- @font = found.filename
+ @font = found.alias
end
else
@font = f
#--
-# $Id: redact.rb 47 2005-06-08 20:05:19Z tilman $
+# $Id: redact.rb 48 2005-06-08 21:38:34Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
end
class FontDirectoryEntry # :nodoc:
- attr_reader :filename
+ attr_reader :filename, :alias
def initialize(filename)
@filename = filename.to_str.dup.freeze
+ @alias = "Edje." + File.basename(@filename).
+ sub(/.[^.]+$/, "").freeze
end
protected
end
def to_eet_properties
- {"entry" => [@filename]}
+ {"entry" => [@alias]}
end
end
#--
-# $Id: source.rb 1 2005-03-26 01:32:38Z tilman $
+# $Id: source.rb 48 2005-06-08 21:38:34Z tilman $
#
# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
#
def to_eet_properties
{"file" => [@font.filename],
- "name" => [@font.filename]}
+ "name" => [@font.alias]}
end
end