LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
WaltBrown
- Posts: 466
- Joined: Mon May 11, 2009 9:12 pm
Post
by WaltBrown » Mon Jul 28, 2014 5:08 am
Hi!
I have a possible pilot error problem. I am trying to get the font languages for the installed fonts using this:
Code: Select all
on mouseUp
put empty into tLanguages
repeat for each line tLine in fld "fFonts" // after filling it with the fontNames
put the fontLanguage of tLine into tLang
add 1 to tLanguages[tLang]
end repeat
put the keys of tLanguages into fld "fData"
end mouseUp
While the Windows 7 Font Manager shows me the wide array of languages used on the 201 installed fonts, LiveCode only gives me "ANSI" (193 instances) and "Hebrew" (8 instances). I have tried on both 5.5.5 Commercial and 6.6.2 Community. I looked through the existing bug reports and here, and saw no obvious answers. Anyone have any ideas on what I am doing wrong?
Thanks, Walt
Walt Brown
Omnis traductor traditor
-
WaltBrown
- Posts: 466
- Joined: Mon May 11, 2009 9:12 pm
Post
by WaltBrown » Tue Jul 29, 2014 3:04 am
I had a Doh! moment and thought it would return a list, but alas no.
This returned the same results:
Code: Select all
on mouseUp
local tLine, tLanguages, tData, tLang, tItem
put empty into tLanguages
repeat for each line tLine in fld "fFonts" // after filling it with the fontNames
put the fontLanguage of tLine into tLang
repeat for each item tItem in tLang
add 1 to tLanguages[tItem]
end repeat
end repeat
put the keys of tLanguages into fld "fData"
sort fld "fData"
end mouseUp
Walt Brown
Omnis traductor traditor
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Tue Jul 29, 2014 4:35 am
Hi Walt,
I'm getting the same sort of results but I think something else is going on.
If I pick Meiryo (Japanese font) when I type I still get English text, even the fonts that show foreign symbols next to them I get English.
This is Win 7 as well.
Interesting 193 + 8 = 201
I think fontLanguage is not what I thunk.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
[-hh]
- VIP Livecode Opensource Backer

- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
Post
by [-hh] » Thu Jul 31, 2014 3:08 am
..........
Last edited by
[-hh] on Wed Aug 13, 2014 4:04 pm, edited 1 time in total.
shiftLock happens
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Mon Aug 04, 2014 8:18 am
Hey Walt,
We haven't heard back from you?
Did any of this help/not help. Did you find a workaround?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
WaltBrown
- Posts: 466
- Joined: Mon May 11, 2009 9:12 pm
Post
by WaltBrown » Mon Aug 04, 2014 11:43 am
Simon,
I gave up. On Windows the font files are not directly listed in the file explorer - the file explorer filters and presents font information in a "user friendly" way with a "virtual" display. I couldn't find a simple shell-based resource on Windows to get the information into LC.
To get the info I wanted I would have had to make a few trips through the Registry and .Net objects in a PowerShell script, which is not at the moment worth the effort. If I get the raw font file contents using LC I would need to write a TTF file parser, also not on my "Have Time To Do" list. Just getting to the raw files means a cryptic trip through the C:\Windows\winsxs subdirectories. There are probably further complexities I haven't gotten to yet.
Thanks
Walt
Walt Brown
Omnis traductor traditor