public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
ProcSet cleanup
sandal (author)
Thu Jul 24 09:19:40 -0700 2008
commit  96f660660345c7c22923ba51d0124022a3a189ab
tree    3ef4052f448a00d8275389cfff90597907e7e7f1
parent  8ea4927409c573f37f29a05d5e21100b4ad37a31
...
250
251
252
253
 
254
255
256
257
 
258
259
260
...
250
251
252
 
253
254
 
 
 
255
256
257
258
0
@@ -250,11 +250,9 @@ module Prawn
0
     end  
0
 
0
     # Add a new type to the current pages ProcSet
0
-    def register_proc(type)
0
+    def proc_set(*types)
0
       @current_page.data[:ProcSet] ||= ref([])
0
-      unless @current_page.data[:ProcSet].data.include?(type)
0
-        @current_page.data[:ProcSet].data << type
0
-      end
0
+      @current_page.data[:ProcSet].data |= types
0
     end
0
 
0
     def page_resources
...
96
97
98
99
100
 
101
102
103
...
96
97
98
 
 
99
100
101
102
0
@@ -96,8 +96,7 @@ module Prawn
0
       # more portable.
0
       #
0
       def font(name)
0
-        register_proc :PDF
0
-        register_proc :Text
0
+        proc_set :PDF, :Text
0
         @font_metrics = Prawn::Font::Metrics[name]
0
         case(name)
0
         when /\.ttf$/

Comments