Skip to main content
Notice removed Draw attention by user1747134
Bounty Ended with Anne's answer chosen by user1747134
Tweeted twitter.com/StackMma/status/958749212698701824
Notice added Draw attention by user1747134
Bounty Started worth 100 reputation by user1747134
added 24 characters in body
Source Link
user1747134
  • 797
  • 4
  • 13

There is a widely known trick of converting letters to curves:

TextToOutlines[style_] := 
 ImportString[ExportString[style, "PDF"], "TextMode" -> "Outlines"][[1, 1]]

But it seems to assign the y coordinate without any order that would be obvious to me:

Show[Graphics@TextToOutlines@
    Style["Fubar", FontFamily -> "Helvetica", FontSize -> #] &
    /@ {1, 2, 4, 8},
  Axes -> True]

produces:

enter image description here

I would like to have the typographical baseline (or better median line) of the imported letters identical with the x axis. How could I do that? Is there some extra margin/padding in the import or export? Or something else?

There is a widely known trick of converting letters to curves:

TextToOutlines[style_] := 
 ImportString[ExportString[style, "PDF"], "TextMode" -> "Outlines"][[1, 1]]

But it seems to assign the y coordinate without any order that would be obvious to me:

Show[Graphics@TextToOutlines@
    Style["Fubar", FontFamily -> "Helvetica", FontSize -> #] &
    /@ {1, 2, 4, 8},
  Axes -> True]

produces:

enter image description here

I would like to have the typographical baseline of the imported letters identical with the x axis. How could I do that? Is there some extra margin/padding in the import or export? Or something else?

There is a widely known trick of converting letters to curves:

TextToOutlines[style_] := 
 ImportString[ExportString[style, "PDF"], "TextMode" -> "Outlines"][[1, 1]]

But it seems to assign the y coordinate without any order that would be obvious to me:

Show[Graphics@TextToOutlines@
    Style["Fubar", FontFamily -> "Helvetica", FontSize -> #] &
    /@ {1, 2, 4, 8},
  Axes -> True]

produces:

enter image description here

I would like to have the typographical baseline (or better median line) of the imported letters identical with the x axis. How could I do that? Is there some extra margin/padding in the import or export? Or something else?

Source Link
user1747134
  • 797
  • 4
  • 13

How can I standardize the coordinate origin for exported/imported outlines?

There is a widely known trick of converting letters to curves:

TextToOutlines[style_] := 
 ImportString[ExportString[style, "PDF"], "TextMode" -> "Outlines"][[1, 1]]

But it seems to assign the y coordinate without any order that would be obvious to me:

Show[Graphics@TextToOutlines@
    Style["Fubar", FontFamily -> "Helvetica", FontSize -> #] &
    /@ {1, 2, 4, 8},
  Axes -> True]

produces:

enter image description here

I would like to have the typographical baseline of the imported letters identical with the x axis. How could I do that? Is there some extra margin/padding in the import or export? Or something else?