class interface TEXT_METRICS
feature(s) from TEXT_METRICS
is_ready: BOOLEAN
-- Is the associated device ready?
feature(s) from TEXT_METRICS
-- Metrics
font: LOGICAL_FONT
-- Logical font corresponding to the current font.
require
ready: is_ready
ensure
is_copy: Result /= Void; -- can be modified.
no_rotation: Result.character_orientation = 0 and Result.line_orientation = 0
font_families: DS_LIST[LOGICAL_FONT]
-- List of all font families available (a single representative
-- font is randomly elected for each family).
require
ready: is_ready
ensure
done: Result /= Void; -- list regenerated for each call.
is_copy:
font_family (typeface_name: STRING): DS_LIST[LOGICAL_FONT]
-- List all fonts from the typeface_name family.
require
ready: is_ready;
valid: typeface_name /= Void and then typeface_name.count > 0
ensure
done: Result /= Void; -- new list each time.
is_copy:
feature(s) from TEXT_METRICS
-- Metrics
is_vector: BOOLEAN
-- Is the current font a vector font?
require
ready: is_ready
is_truetype: BOOLEAN
-- Is the current font a true type font?
require
ready: is_ready
is_device: BOOLEAN
-- Is the current font a device specific font?
require
ready: is_ready
ascent: INTEGER
-- Current font's ascent (units above the base line).
require
ready: is_ready
descent: INTEGER
-- Current font's descent (units under the base line).
require
ready: is_ready
height: INTEGER
-- Current font's line height (ascent + descent).
require
ready: is_ready
internal_leading: INTEGER
-- Current font's internal leading (blank space above most characters).
require
ready: is_ready
external_leading: INTEGER
-- Current font's external leading (space between row, added to height).
require
ready: is_ready
maximum_character_width: INTEGER
-- Current font maximum char width.
require
ready: is_ready
invariant
valid_parent: parent /= Void;
end of TEXT_METRICS