Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a C# application which converts the Font to String using FontConverter class and writes to a file.

Now, i need to read this file in MFC application and convert the written Font (as string) to CFont object.

In short, i need to implement the below in MFC.
FontConverter fontConverter = new FontConverter();
Font font = fontConverter.ConvertFromInvariantString(fontData) as Font;

Any help would be highly appreciated.

Thanks,
Kishor

What I have tried:

Till now, i read the string as is and parsed to required contents.

For example if the string is "Monotype Corsiva, 15.75pt, style=Bold, Italic" i parsed seperately and created CFont object.

Is there any better way ?
Posted
Updated 7-Feb-18 1:00am

1 solution

According to CFont Class[^] there is no built in method to do what you want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900