struct

CrImage::Font::Metrics

Inherits Struct / Value / Object

Metrics holds the metrics for a Face. A visual depiction is at https://developer.apple.com/library/mac/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Art/glyph_metrics_2x.png

Constructors

new(height : CrImage::Math::Fixed::Int26_6 = Math::Fixed::Int26_6[0], ascent : CrImage::Math::Fixed::Int26_6 = Math::Fixed::Int26_6[0], descent : CrImage::Math::Fixed::Int26_6 = Math::Fixed::Int26_6[0], x_height : CrImage::Math::Fixed::Int26_6 = Math::Fixed::Int26_6[0], cap_height : CrImage::Math::Fixed::Int26_6 = Math::Fixed::Int26_6[0], caret_slope : CrImage::Point = CrImage::Point.zero)
Source

Instance methods

ascent

ascent is the distance from the top of a line to its baseline

Source
ascent=(ascent : Math::Fixed::Int26_6)

ascent is the distance from the top of a line to its baseline

Source
cap_height

cap_height is the distance from the top of uppercase letters to the baseline.

Source
cap_height=(cap_height : Math::Fixed::Int26_6)

cap_height is the distance from the top of uppercase letters to the baseline.

Source
caret_slope

caret_slope is the slope of a caret as a vactor with the y axis pointing up. The slope(0,1) is the vertical caret.

Source
caret_slope=(caret_slope : CrImage::Point)

caret_slope is the slope of a caret as a vactor with the y axis pointing up. The slope(0,1) is the vertical caret.

Source
descent

descent is the distance from the bottom of a line to its baseline. The value si typically positive, even though a descender goes below the baseline.

Source
descent=(descent : Math::Fixed::Int26_6)

descent is the distance from the bottom of a line to its baseline. The value si typically positive, even though a descender goes below the baseline.

Source
height

height is the recommended amount of vertical space between two lines of text.

Source
height=(height : Math::Fixed::Int26_6)

height is the recommended amount of vertical space between two lines of text.

Source
x_height

x_height is the distance from the top of uppercase letters to the baseline.

Source
x_height=(x_height : Math::Fixed::Int26_6)

x_height is the distance from the top of uppercase letters to the baseline.

Source