Highlighted
Absent Member.
Absent Member.
574 views

What's the easiest way to check a font name? Any help appreciated, thanks.

Hi all,

What's the easiest way for an MF cobol program to check a font is present on a Windows (7, 10) PC or Windows Server (2008/2012).  My environment is Visual Studio 15, Visual COBOL v3 - compiling to native windows .exe i.e. not .net. 

Thanks,

Linden

Linden Rowland - IT Consultant
Owner/Developer, www.SchoolReportWriter.com
IT Consultant to Tindle Newspaper Group

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: What's the easiest way to check a font name? Any help appreciated, thanks.

Linden,

What you will need to do to return the installed fonts is make calls to the relevant Windows APIs such as EnumFontFamiliesEx

Gael
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: What's the easiest way to check a font name? Any help appreciated, thanks.

ok thanks Gael. I guess I was hoping there would be a simpler way of just asking if a particular font was valid or not but sounds like I need to do it the hard way!

Linden Rowland - IT Consultant
Owner/Developer, www.SchoolReportWriter.com
IT Consultant to Tindle Newspaper Group

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.