% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-text-3d.R
\name{text_outlines}
\alias{text_outlines}
\title{Convert text to polygon outlines}
\usage{
text_outlines(
  text,
  family = "sans",
  weight = "normal",
  italic = FALSE,
  size = 12,
  tolerance = 0.01,
  spacing = 0,
  hjust = 0.5,
  vjust = 0.5,
  width = NA,
  align = "left",
  lineheight = 1,
  internal_size = 144
)
}
\arguments{
\item{text}{Character string to convert}

\item{family}{Font family name (e.g., "Arial", "Helvetica", "sans")}

\item{weight}{Font weight ("normal", "bold", "thin", "light", etc.)}

\item{italic}{Logical; use italic variant}

\item{size}{Font size in points}

\item{tolerance}{Bezier curve tolerance; lower values give more detailed outlines}

\item{spacing}{Additional letter spacing in em units}

\item{hjust, vjust}{The justification of the textbox surrounding the text}

\item{width}{Maximum line width in inches for word wrapping; NA disables wrapping}

\item{align}{Text alignment: "left", "center", or "right"}

\item{lineheight}{Line height multiplier}

\item{internal_size}{Internal rendering size for kerning precision; generally
shouldn't need adjustment}
}
\value{
A data frame with columns: x, y, contour, glyph, letter, poly_id. X and y
are vertex coordinates, in point units.
}
\description{
Converts a text string into polygon vertices suitable for plotting with
ggplot2's geom_polygon. Uses systemfonts for font matching and glyph extraction.
}
\examples{
data <- text_outlines("Howdy, partner", family = "Arial")

ggplot2::ggplot(data, ggplot2::aes(x, y, group = letter, subgroup = poly_id)) +
  ggplot2::geom_polygon() +
  ggplot2::coord_fixed()

}
