Glyph geometry: visualizing letters as graphics objects

17 Likes

Very nice. I hope to see this in the Wolfram Function Repository.

3 Likes

Thank you so much Mark for sharing this. Clear illustrations and easy to read code. It is a treat to see the Arabic letter “ظ” in your opening image. This letter’s pronunciation is close to the letter “Z” in English.

2 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

What a cool post, Mark! I’d like to point out something that might come handy. In the docs on BoundaryDiscretizeGraphics you can find an example in Applications section about another way of getting a glyph geometry, for example:

BoundaryDiscretizeGraphics[
	Text[Style["ظ",Bold]],
_Text,MaxCellMeasure->0.01]

Then you can use unctions like MeshPrimitives, MeshCells, MeshCoordinates, etc. to extract underlying geometric elements.

6 Likes

Unfortunately, when I updated to Mathematica 12.2, the trick of exporting in PDF format no longer produced graphics objects. If you want to play with this method, it will have to be in v < 12.2. : (

Hi Mark,

It works in Mathematica 12.3.1 if you specify "PageGraphics" as the second argument of ImportString:

InputForm@ImportString[ExportString[l, "PDF"], "PageGraphics"]
1 Like

Here is a ready-made solution from version 1.0.2 of ResourceObject["SVGImport"]["DefinitionNotebook"] by Richard Hennigan (Wolfram Research):

ImportString[ExportString[l, "PDF"], 
       If[$VersionNumber >= 12.2, {"PDF", "PageGraphics"}, {"PDF", "Pages"}]]