[JW Lua] JW Lua, beta 0.53 / Font dialog problem

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Mon Aug 21 11:51:13 CEST 2017


Jan,

I'm mapping directly to the Finale PDK API here. Finale have the same 
issue with the changing sample text. The problem is that the ChooseFont 
Windows API doesn't support sample strings (while Cocoa does) in the 
dialog box, so Finale seems to do a hack to change the text after the 
dialog box opens.

While googling for a permanent solution, it seems like it isn't easy to fix:
https://groups.google.com/forum/#!topic/comp.os.ms-windows.programmer.controls/hwCAToT7NsE


I have (manually) discovered some very few font name differences between 
dialog and FCStrings:LoadSystemFontNames() on the Mac side, but not on 
Windows.


Best regards,

Jari Williamsson


On 2017-08-21 11:02, Jan Angermüller wrote:
> Thanks again, Jari, for this update!
> 
>  >FCFontDialog class added, for a user font selection dialog.
> Wow, great feature!
> Unfortunately the sample string changes when the font changes in the dialog.
> See this video:
> https://www.youtube.com/watch?v=6IsMT5Q_tDw
> And do you know if the list of fonts displayed here is identical to what 
> FCStrings:LoadSystemFontNames() returns ?
> 
> Test code:
> local fontinfo=finale.FCFontInfo()
> fontinfo.Name="HayFIN"
> local d=finale.FCFontDialog(finenv.UI(),fontinfo)
> local str=finale.FCString()
> str.LuaString=string.char(38)
> d:SetSampleString(str)
> d:Execute()
> 
> Best,
> Jan
> 
> 
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
> 





More information about the JWLua mailing list