Code cleanup.
[redact.git] / lib / redact / part.rb
index bac1ba4e51da438d9789f80e636f16eb912807b0..c271fef5f27af986b572753ffa7ec000c8092377 100644 (file)
@@ -1,5 +1,5 @@
 #--
-# $Id: part.rb 25 2005-04-14 19:42:06Z tilman $
+# $Id: part.rb 26 2005-04-14 19:44:49Z tilman $
 #
 # Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
 #
@@ -508,7 +508,8 @@ module Redact
                end
 
                def font=(f)
-                       md = f.to_str.match(/.*\.ttf/)
+                       f = f.to_str.strip
+                       md = f.match(/.*\.ttf/)
                        unless md.nil?
                                found = EDJE.font_dir.find { |font| font.filename == f }
                                if found.nil?
@@ -516,7 +517,7 @@ module Redact
                                end
                        end
 
-                       @font = f.dup
+                       @font = f
                end
 
                def outline_color=(c)