Skip to main content

vScriptValFontMetrics

Return font measurements as a Fusion ScriptVal object Sample output from the "vScriptValFontMetrics" node when formatted as text based Lua table output looks like: { FontMetrics = { TypeName = "TextStyleFontMetrics", CharWidthAverage = 0, UnderlineThickness = 123, TextExternalLeading = 0, TextInternalLeading = 0.0232686980609418, TypeNamePtr = "TextStyleFontMetrics*", TextDescent = 0.0175623268698061, Scale = 3610, TextAscent = 0.0624376731301939, FontSize = 0.1, CharWidthSpace = 0.0189196675900277 }, Font = "Arial Black", Text = "Hello", Style = "Regular", Size = 0.1 }

Core / ScriptValScriptVal
vScriptValFontMetrics node

Parameters​

ParameterTypeDefaultDescription
FontText—Font family name to measure, e.g. Arial Black.
StyleText—Font style/weight, e.g. Regular or Bold.
Styled TextText—Sample text the metrics are measured against.
SizeFloat0.1Font size used for the measurement.