I originally posted this to comp.emulators.ms-windows.wine, where it was suggested I send a copy here. Please CC: replies to me as I'm not subscribed to wine-devel. TIA!
I have been using a shareware program called Noteworthy Composer for many years on Windows, but am trying to switch to a Linux-only setup and this is one the last obstacles. I don't want to switch to the other Linux music programs as to my mind they don't provide as simple an interface as NWC does, and I already have many song files in the NWC format. The main problem with running this is that it uses its own TrueType Font, which doesn't display properly under Wine - I just get outline boxes instead of the note symbols.
Here's how I got to where I am right now:
I tried various RPM versions of wine on my RH8.0 system, and finally downloaded the Wine source and did a cvs update and build about a week ago. The first problem was that I was using a fake C drive and the NWCV15.TTF font was the only one found, and was being used for all text including menus & dialog boxes - this just doesn't make sense, the NWCV15 font is analagous to a symbol font and doesn't have text characters, so everything came out totally illegible, although recognizable enough to see that it was mostly working.
I installed a few standard TTF fonts in the windows\Fonts directory to fix that, but then the program wouldn't start, complaining that it couldn't find its special font NWCV15.ttf, which had been correctly installed in the C:\Windows\Fonts directory. I ran wine with --debugmsg +font and added a few more TRACE() statements to dlls/gdi/freetype.c, and discovered that the font was being ignored by Wine because the program doesn't specify SYMBOL_CHARSET when requesting the font; Windows finds the font but Wine doesn't.
There is a specific check in the routine WineEngCreateFontInstance to compare the font name requested with "Symbol" and in that case to set the charset being searched for to SYMBOL_CHARSET. When I add similar code for the font name "NWCV15" the program now starts up and finds its font, but doesn't display it correctly. My change is obviously highly specific to running this program, so there's obviously a significant algorithm difference between Wine and Windows when it comes to font selection of SYMBOL_CHARSET fonts.
Now I can read the dialogs properly and the program runs pretty well (it even plays MIDI stuff properly after I installed the ALSA drivers from source - cool), but the score display is still only only showing boxes instead of the note heads and other symbols that appear in that font. The font file does show various expected glyphs if I install it in the xfs truetype directory and look at it using xfontsel, but I don't know of any other Linux tools for analysing .ttf files.
Can anyone suggest what I should do next to try and get the NWCV15 font displaying properly? This is obviously an unusual font but I'm not sure whether that's causing the problems or not. Ideas?
If anyone wants to have a look at the font file for themselves, free evaluation copies of the software can be obtained from http://www.noteworthysoftware.com/composer/download.htm
- Andrew
PS: Thanks to all the Wine developers for making this feat achievable, it amazes me how well it all works!
Andrew Johnson wrote:
I originally posted this to comp.emulators.ms-windows.wine, where it was suggested I send a copy here. Please CC: replies to me as I'm not subscribed to wine-devel. TIA!
I have been using a shareware program called Noteworthy Composer for many years on Windows, but am trying to switch to a Linux-only setup and this is one the last obstacles. I don't want to switch to the other Linux music programs as to my mind they don't provide as simple an interface as NWC does, and I already have many song files in the NWC format. The main problem with running this is that it uses its own TrueType Font, which doesn't display properly under Wine - I just get outline boxes instead of the note symbols.
Here's how I got to where I am right now:
I tried various RPM versions of wine on my RH8.0 system, and finally downloaded the Wine source and did a cvs update and build about a week ago. The first problem was that I was using a fake C drive and the NWCV15.TTF font was the only one found, and was being used for all text including menus & dialog boxes - this just doesn't make sense, the NWCV15 font is analagous to a symbol font and doesn't have text characters, so everything came out totally illegible, although recognizable enough to see that it was mostly working.
I installed a few standard TTF fonts in the windows\Fonts directory to fix that, but then the program wouldn't start, complaining that it couldn't find its special font NWCV15.ttf, which had been correctly installed in the C:\Windows\Fonts directory. I ran wine with --debugmsg +font and added a few more TRACE() statements to dlls/gdi/freetype.c, and discovered that the font was being ignored by Wine because the program doesn't specify SYMBOL_CHARSET when requesting the font; Windows finds the font but Wine doesn't.
There is a specific check in the routine WineEngCreateFontInstance to compare the font name requested with "Symbol" and in that case to set the charset being searched for to SYMBOL_CHARSET. When I add similar code for the font name "NWCV15" the program now starts up and finds its font, but doesn't display it correctly. My change is obviously highly specific to running this program, so there's obviously a significant algorithm difference between Wine and Windows when it comes to font selection of SYMBOL_CHARSET fonts.
Now I can read the dialogs properly and the program runs pretty well (it even plays MIDI stuff properly after I installed the ALSA drivers from source - cool), but the score display is still only only showing boxes instead of the note heads and other symbols that appear in that font. The font file does show various expected glyphs if I install it in the xfs truetype directory and look at it using xfontsel, but I don't know of any other Linux tools for analysing .ttf files.
Can anyone suggest what I should do next to try and get the NWCV15 font displaying properly? This is obviously an unusual font but I'm not sure whether that's causing the problems or not. Ideas?
If anyone wants to have a look at the font file for themselves, free evaluation copies of the software can be obtained from http://www.noteworthysoftware.com/composer/download.htm
- Andrew
PS: Thanks to all the Wine developers for making this feat achievable, it amazes me how well it all works!
The best that I can suggest for now is that you attach your hack^H^H^H^Hpatch and provide a link to your screen shot. It would not hurt to start a bug report for this either http://bugs.winehq.org
Please CC: me on any replies, I'm not subscribed.
Tony Lambregts wrote:
The best that I can suggest for now is that you attach your hack^H^H^H^Hpatch and provide a link to your screen shot. It would not hurt to start a bug report for this either http://bugs.winehq.org
Ok, the change necessary to get Noteworthy Composer to find its font is shown below. There's a screen dump showing it running at http://www.aps.anl.gov/~anj/font_bug.png Note that the rectangular boxes should all be note heads or other musical symbols found in the Noteworthy font NWCV15.
This issue may explain bug #380, which similarly involved a music font not being properly selected, but in my case the program noticed and aborts without the wine patch below. I have not filed a bug report for this yet.
Thanks to Tony and Huw for responding.
- Andrew
Index: freetype.c =================================================================== RCS file: /home/wine/wine/dlls/gdi/freetype.c,v retrieving revision 1.30 diff -u -r1.30 freetype.c --- freetype.c 23 Jan 2003 21:32:36 -0000 1.30 +++ freetype.c 20 Feb 2003 06:18:23 -0000 @@ -165,6 +165,8 @@ static WCHAR MSSansSerifW[] = {'M','S',' ','S','a','n','s',' ', 'S','e','r','i','f','\0'}; static WCHAR HelvW[] = {'H','e','l','v','\0'}; +/* ANJ */ +static WCHAR NWCV15W[] = {'N','W','C','V','1','5','\0'};
static WCHAR ArabicW[] = {'A','r','a','b','i','c','\0'}; static WCHAR BalticW[] = {'B','a','l','t','i','c','\0'}; @@ -970,6 +972,9 @@
if(!strcmpiW(lf.lfFaceName, SymbolW)) lf.lfCharSet = SYMBOL_CHARSET; + /* ANJ */ + if(!strcmpiW(lf.lfFaceName, NWCV15W)) + lf.lfCharSet = SYMBOL_CHARSET;
if(!TranslateCharsetInfo((DWORD*)(INT)lf.lfCharSet, &csi, TCI_SRCCHARSET)) { switch(lf.lfCharSet) {
Andrew Johnson wrote:
Please CC: me on any replies, I'm not subscribed.
Tony Lambregts wrote:
The best that I can suggest for now is that you attach your hack^H^H^H^Hpatch and provide a link to your screen shot. It would not hurt to start a bug report for this either http://bugs.winehq.org
Ok, the change necessary to get Noteworthy Composer to find its font is shown below. There's a screen dump showing it running at http://www.aps.anl.gov/~anj/font_bug.png Note that the rectangular boxes should all be note heads or other musical symbols found in the Noteworthy font NWCV15.
This issue may explain bug #380, which similarly involved a music font not being properly selected, but in my case the program noticed and aborts without the wine patch below. I have not filed a bug report for this yet.
I would appreciate if you filled on out. If Huw is able to fix it that would be great. This is not the same problem as #380 as that bug has a postscript font so solving this bug will not solve that one.
Tony Lambregts wrote:
I would appreciate if you filled on out. If Huw is able to fix it that would be great.
Filed as Bug #1291. This actually feels like two different bugs to me - the search failure in WineEngCreateFontInstance() is probably unrelated to the non-display of the font symbols (which could be a character-encoding problem), but the two are obviously related because it's a symbolic font.
- Andrew
On Tue, Feb 18, 2003 at 10:02:09PM -0600, Andrew Johnson wrote:
I originally posted this to comp.emulators.ms-windows.wine, where it was suggested I send a copy here. Please CC: replies to me as I'm not subscribed to wine-devel. TIA!
I have been using a shareware program called Noteworthy Composer for many years on Windows, but am trying to switch to a Linux-only setup and this is one the last obstacles. I don't want to switch to the other Linux music programs as to my mind they don't provide as simple an interface as NWC does, and I already have many song files in the NWC format. The main problem with running this is that it uses its own TrueType Font, which doesn't display properly under Wine - I just get outline boxes instead of the note symbols.
Hi,
I'll try to take a look at this in the next few days.
Huw.