getLatexCharMetrics {tikzDevice} | R Documentation |
This function is used to retrieve the ascent, decent and width of a character glyph as it would appear in output typeset by LaTeX.
getLatexCharMetrics( charCode, cex=1, face=1 )
charCode |
an integer that corresponds to a symbol in the ASCII character table under the Type 1 font encoding. All numeric values are coerced using as.integer . Non-numeric values will not be accepted. |
cex |
a real number that specifies a scaling factor that is to be applied to device output. |
face |
an integer in the range [1-5] that specifies the font face to use. See par for details. |
getLatexCharMetrics
first checks to see if metrics have allready been calculated for the given character using the given values of cex
and face
. If so, cached values are returned. If no cached values exists, the LaTeX compiler specified by options( tikzLatex )
is invoked in order to calculate them.
metrics |
A numeric vector holding ascent, descent, width character metrics. Values should all be nonnegative. |
tikzDevice
tries very hard when it is loaded to find a working latex
or pdflatex
command. If it is successful the command is set in options('tikzLatex')
, otherwise this function will fail.
Charlie Sharpsteen source@sharpsteen.net
PGF Manual
# Calculate ascent, descent and width for "A" getLatexCharMetrics(65)