Created
March 11, 2014 05:05
-
-
Save nkostic/9479785 to your computer and use it in GitHub Desktop.
Figure out which font needs to be removes/reinstalled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfset fontobj = createobject("java","com.adobe.fontengine.fontmanagement.FontLoader")> | |
<cfdirectory action="list" directory="c:\windows\fonts" name="fontdir"> | |
<table border="1" style="border-collapse:collapse"> | |
<tr> | |
<th>Font Name:</th> | |
<th>Error</th> | |
</tr> | |
<cfloop query="fontdir"> | |
<cftry> | |
<cfset loaded = fontobj.load(createobject("java","java.net.URL").init("file:///C|/windows/fonts/#fontdir.name#"))> | |
<cfif arraylen(loaded) gt 0> | |
<cfset dummy="#loaded[1].getPlatformFontDescription()[1].toString()#" > | |
</cfif> | |
<cfcatch> | |
<cfif findnocase("platform",cfcatch.message)> | |
<tr> | |
<td><cfoutput>#fontdir.name#</cfoutput></td> | |
<td><cfoutput>#cfcatch.message#</cfoutput></td> | |
</tr> | |
</cfif> | |
</cfcatch> | |
</cftry> | |
</cfloop> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment