projects
/
redact.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce0230b
)
Added support for the 'use alternate font metrics' flag.
master
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 26 Aug 2007 14:43:22 +0000
(16:43 +0200)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 26 Aug 2007 14:43:22 +0000
(16:43 +0200)
lib/redact/part.rb
patch
|
blob
|
history
diff --git
a/lib/redact/part.rb
b/lib/redact/part.rb
index 5c3bd607bc6df006329ead7aad05309aaf01a48d..0fd4139eeca2234f8525ccbe240c3df9ffc4d93e 100644
(file)
--- a/
lib/redact/part.rb
+++ b/
lib/redact/part.rb
@@
-136,6
+136,11
@@
module Redact
@type = TYPE_TEXT
@effect = :none
+ @use_alternate_font_metrics = false
+ end
+
+ def use_alternate_font_metrics=(b)
+ @use_alternate_font_metrics = (b == true)
end
protected
@@
-157,7
+162,9
@@
module Redact
raise(RedactError, "invalid effect value - #{@effect}")
end
- super.merge!({"effect" => [effect, :char]})
+ super.merge!(
+ {"effect" => [effect, :char],
+ "use_alternate_font_metrics" => [@use_alternate_font_metrics, :char]})
end
end