From 23be86318e07b70142c352631ea347046d341663 Mon Sep 17 00:00:00 2001 From: Miguel Sousa Date: Thu, 15 Aug 2024 00:09:16 -0700 Subject: [PATCH] Improve the formatting of `font_revision` value A 'header.font_revision' value of 72090 will now be displayed as 1.100 instead of 0001199a. --- examples/metrics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/metrics.rb b/examples/metrics.rb index 321a9c2..bbe1fa0 100644 --- a/examples/metrics.rb +++ b/examples/metrics.rb @@ -26,7 +26,7 @@ def character_lookup(file, character) puts '-- FONT ------------------------------------' -puts format('revision : %08x', file.header.font_revision) +puts format('revision : %.3f', file.header.font_revision.to_f / 65536) puts "name : #{file.name.font_name.join(', ')}" puts "family : #{file.name.font_family.join(', ')}" puts "subfamily : #{file.name.font_subfamily.join(', ')}"