Skip to main content
Tweeted twitter.com/#!/StackMma/status/168846711412899840
added 194 characters in body
Source Link
Isaac
  • 3.2k
  • 1
  • 29
  • 36

Is there a way to get the dimensions that the results of a Text[] will occupy within a Graphics[]? Specifically, if I run something like

Graphics[Text[
  Style["how quickly daft jumping zebras vex", 
   FontFamily -> "Verdana", FontSize -> 20]], PlotRange -> 1]

how can I get the dimensions relative to the coordinate system of the text?

edit: I have the PlotRange->1 in there because I'm using the text on a larger field and manipulating the text and other graphics using transformations that depend on the coordinate system. The text also is likely to change (hence my using sample text), so I'd like to have the transformations depend on measurements derived from the text (taking into account the styling of it).

Is there a way to get the dimensions that the results of a Text[] will occupy within a Graphics[]? Specifically, if I run something like

Graphics[Text[
  Style["how quickly daft jumping zebras vex", 
   FontFamily -> "Verdana", FontSize -> 20]], PlotRange -> 1]

how can I get the dimensions relative to the coordinate system of the text?

Is there a way to get the dimensions that the results of a Text[] will occupy within a Graphics[]? Specifically, if I run something like

Graphics[Text[
  Style["how quickly daft jumping zebras vex", 
   FontFamily -> "Verdana", FontSize -> 20]], PlotRange -> 1]

how can I get the dimensions relative to the coordinate system of the text?

edit: I have the PlotRange->1 in there because I'm using the text on a larger field and manipulating the text and other graphics using transformations that depend on the coordinate system. The text also is likely to change (hence my using sample text), so I'd like to have the transformations depend on measurements derived from the text (taking into account the styling of it).

Source Link
Isaac
  • 3.2k
  • 1
  • 29
  • 36

Dimensions of the results of Text[] within Graphics[]

Is there a way to get the dimensions that the results of a Text[] will occupy within a Graphics[]? Specifically, if I run something like

Graphics[Text[
  Style["how quickly daft jumping zebras vex", 
   FontFamily -> "Verdana", FontSize -> 20]], PlotRange -> 1]

how can I get the dimensions relative to the coordinate system of the text?