views:

570

answers:

1

Hi all!

I have a big problem, and I hope you can help me.

I'm porting a game from Linux to Windows, and using MinGW works fine (except for some crashes that I don't know how, but this is not my problem now)

Game use Fontconfig (2.4.2-3), Cairo (1.8.8) and Pango (1.26.0) to render text.

Problem is that, using Visual Studio, I can't see fonts (all characters are displayed as little box), and in the output it say me this:

** (performous.exe:4344): CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
  'D:\Project\PerformousInstall-vc\etc\pango\pango.modules'
You should create this file by running:
  pango-querymodules > 'D:\Project\PerformousInstall-vc\etc\pango\pango.modules'


** (performous.exe:4344): WARNING **: couldn't load font "Bitstream Charter Not-Rotated 18px", falling back to "Sans Not-Rotated 18px", expect ugly output.

** (performous.exe:4344): WARNING **: couldn't load font "Sans Not-Rotated 18px", falling back to "Sans Not-Rotated 18px", expect ugly output.

** (performous.exe:4344): WARNING **: All font fallbacks failed!!!!

** (performous.exe:4344): WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderWin32', script='latin'

** (performous.exe:4344): WARNING **: All font fallbacks failed!!!!

This error is only when I use Visual Studio, but because it fix me a lot of other bugs, I'll be very interested to get fonts working under VS.

Sorry if I forgot something or I haven't posted anything, but I have no idea what to post.

Someone has some hints?

Thanks in advance for help, if I don't get myself clear, feel free to ask.

A: 

You need to set the fonts that Pango are using to something that actually exists on a Windows machine, neither Bitstream nor Sans exist and that's what Pango is telling you (its default is Sans). Try setting it to Segoe UI and you should see text

Paul Betts
Thanks for reply, I tried to do that, now I have "only" this error: ** (performous.exe:4344): WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderWin32', script='latin'Don't know how to solve it. Maybe PS: tried with "Arial" and "Verdana" too, no effective. What about modules error? I can't find anything usefully on Google
Xaldyz
Go into the pango room on GNOME IRC "#pango" or on the mailing list, the people there are really helpful and friendly
Paul Betts
Ok, problem solved: copy generated "module-*" of a compiled pango under MinGW into directory of pango of Visual C++, inverted second line with four of every group, compile and all works. If someone has trouble, feel free to contact me. Thanks Paul for the answer
Xaldyz