I have the following string in a file, and it needs to be converted back to a Font object. But I’m not sure how to do this one:
font string:
[Font: Name=Segoe UI, Size=14, Units=3, GdiCharSet=1, GdiVerticalFont=False]
I appreciate any help at all, thank you
bael
Check out my
FontBuilderclass in the CC.Utilities library. It does exactly what you want and provides an extension methodToStringEx()to cover theFontStyleproperty thatFont.ToString()is missing.I originally wrote it so I could store a
Fontin the registryEdit: Here are the specific files it you’re not interested in the whole thing:
FontBuilder: http://ccutilities.codeplex.com/SourceControl/changeset/view/40596#648008
FontExtensions: http://ccutilities.codeplex.com/SourceControl/changeset/view/40596#664902