% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/latex-grob.R
\name{.make_text_measurer}
\alias{.make_text_measurer}
\title{Create a text measurement closure for MicroTeX layout}
\usage{
.make_text_measurer(text_gp)
}
\arguments{
\item{text_gp}{A \code{\link[grid]{gpar}} object with font settings
(\code{fontfamily}, \code{fontface}) to use for measurement.}
}
\value{
A function taking \code{(text, font_style)} that returns
\code{c(width_ratio, ascent_ratio, height_ratio)} where ratios
are relative to the font size.
}
\description{
Returns a function that measures text using R's grid graphics system.
The closure is called from C++ during \code{parse_latex_cpp()} to get
accurate font metrics for \code{\\text\{\}} blocks.
}
\keyword{internal}
