New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pango-WARNING couldn't load font #48

Closed
BackOrder opened this Issue Jan 28, 2015 · 12 comments

Comments

Projects
None yet
2 participants
@BackOrder
Collaborator

BackOrder commented Jan 28, 2015

Shoes unveils a series of warnings emitted by Pango library on Windows.

(cshoes.exe:2456): Pango-WARNING **: couldn't load font "Lacuna Not-Rotated 17.3
33984375px", falling back to "Sans Not-Rotated 17.333984375px", expect ugly outp
ut.

Recap from #46:

  • MacOS X and Linux version have a launch script handling Pango dynamic setup.
  • Includes pangorc, pango.modules, pango-querymodules files.
  • Windows version doesn't need all the DLLs required by Pango, so those are not included.
  • Windows version might need setting up Pango at installation time in https://github.com/Shoes3/shoes3/blob/master/platform/msw/base.nsi.

TESTING LACUNA FONT

Shoes.app {
   font "#{DIR}/fonts/Lacuna.ttf"
   para "#{Shoes::FONTS}\n"

   para "THIS IS A NORMAL FONT | this is a normal font\n"
   para "THIS IS A LACUNA FONT | this is a lacuna font\n", :font => "Lacuna Regular"
}

_CONSOLE OUTPUT_

(shoes.exe:9868): Pango-WARNING **: couldn't load font "Lacuna Not-Rotated 16.0009765625px", falling back to "Sans Not-Rotated 16.0009765625px", expect ugly output.

_RENDERING_
image
The rendering seems to work despite the warning.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Jan 28, 2015

Collaborator

Shoes::FONTS is empty when starting a new Shoes app on Windows whereas there are 492 fonts available in the MacOS X version.

Collaborator

BackOrder commented Jan 28, 2015

Shoes::FONTS is empty when starting a new Shoes app on Windows whereas there are 492 fonts available in the MacOS X version.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 13, 2015

Contributor

Shoes font loading is a separate step from the graphical tool kit init. The old msw native windows code had a way to load them. For example, OSX 10.6 and 10.9 have two different native api's. that Shoes can be compiled for. For Windows gtk, we need the old msw code that iterates through the fonts and then presents font info in a way Gtk2 Pango/Cairo is happy with. If we can do that then we can dump fontconfig.dll, font.conf and friends on Windows. That should (he hopes) make the Pango Lucuna error messages go away as well.

https://github.com/Shoes3/shoes3/blob/master/shoes/native/gtk.c#L47
https://github.com/Shoes3/shoes3/blob/master/shoes/native/windows.c#L238

Contributor

ccoupe commented Feb 13, 2015

Shoes font loading is a separate step from the graphical tool kit init. The old msw native windows code had a way to load them. For example, OSX 10.6 and 10.9 have two different native api's. that Shoes can be compiled for. For Windows gtk, we need the old msw code that iterates through the fonts and then presents font info in a way Gtk2 Pango/Cairo is happy with. If we can do that then we can dump fontconfig.dll, font.conf and friends on Windows. That should (he hopes) make the Pango Lucuna error messages go away as well.

https://github.com/Shoes3/shoes3/blob/master/shoes/native/gtk.c#L47
https://github.com/Shoes3/shoes3/blob/master/shoes/native/windows.c#L238

@ccoupe ccoupe added Normal and removed Low labels Feb 13, 2015

@BackOrder

This comment has been minimized.

Show comment
Hide comment
Collaborator

BackOrder commented Feb 14, 2015

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 14, 2015

Contributor

@BackOrder , that would be bad news if we have to run pango-querymodules. cshoes.bat? shoes.bat

Contributor

ccoupe commented Feb 14, 2015

@BackOrder , that would be bad news if we have to run pango-querymodules. cshoes.bat? shoes.bat

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 14, 2015

Collaborator

Isn't pango-querymodules a run-once thing? We can manage that from NSIS.

Collaborator

BackOrder commented Feb 14, 2015

Isn't pango-querymodules a run-once thing? We can manage that from NSIS.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 14, 2015

Contributor

Good observation. I'm used to the linux/osx handling where it runs every Shoes time. You should have pango-querymodules.exe in the gtk bundle bin/ if you want to try it.

Contributor

ccoupe commented Feb 14, 2015

Good observation. I'm used to the linux/osx handling where it runs every Shoes time. You should have pango-querymodules.exe in the gtk bundle bin/ if you want to try it.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 14, 2015

Collaborator

There is no Pango DLL modules on the Windows build. That would be something needed before calling pango-querymodules.

Collaborator

BackOrder commented Feb 14, 2015

There is no Pango DLL modules on the Windows build. That would be something needed before calling pango-querymodules.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Feb 14, 2015

Contributor

There are no pango.modules on some Linux either or the names have been changed to protect the innocent! Also it appears that Shoes/linux doesn't do the pango-querymodules dance (just OSX) so I'd prefer we not add the dance to Windows if we don't have to.

Your sandbox/share/ has the pango manual in html and more. In particular win32 calls to manage fonts.

We know that Shoes is perfectly happy with the fonts, and fontconfig is primarily used to build the Shoes font list (and perhaps thats all it does). Only gtk/windows/pango complains about those two fonts. Research and deep thought is needed.

Perhaps NSIS can install the two fonts and Shoes/Windows doesn't issue load them from loose files?
Perhaps Shoes/gtk.s should not call the the Linux centric code and call the win32 centric code to find and build the the internal font.

Contributor

ccoupe commented Feb 14, 2015

There are no pango.modules on some Linux either or the names have been changed to protect the innocent! Also it appears that Shoes/linux doesn't do the pango-querymodules dance (just OSX) so I'd prefer we not add the dance to Windows if we don't have to.

Your sandbox/share/ has the pango manual in html and more. In particular win32 calls to manage fonts.

We know that Shoes is perfectly happy with the fonts, and fontconfig is primarily used to build the Shoes font list (and perhaps thats all it does). Only gtk/windows/pango complains about those two fonts. Research and deep thought is needed.

Perhaps NSIS can install the two fonts and Shoes/Windows doesn't issue load them from loose files?
Perhaps Shoes/gtk.s should not call the the Linux centric code and call the win32 centric code to find and build the the internal font.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Feb 15, 2015

Collaborator

The question is what are the Pango modules for? From Pango website:

Dynamically loaded modules then handle text layout for particular combinations of script and font backend. Pango ships with a wide selection of modules, including modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts. Virtually all of the world's major scripts are supported.

My understanding is that Shoes for all platforms may not properly support fonts localization. Even on MacOS X, there would be some modules missing (as seen on stackoverflow). This would be a separate issue to file.

We know that Shoes is perfectly happy with the fonts, and fontconfig is primarily used to build the Shoes font list (and perhaps thats all it does). Only gtk/windows/pango complains about those two fonts. Research and deep thought is needed.

The Pango manual says either one can be used — fontconfig or win32 fonts api. This might be a case where win32 is a winner when it comes to runtime speed but fontconfig is already implemented and running fc-cache using NSIS might cut it, speed afterwards will be matched.

Perhaps NSIS can install the two fonts and Shoes/Windows doesn't issue load them from loose files? Perhaps Shoes/gtk.s should not call the the Linux centric code and call the win32 centric code to find and build the the internal font.

Installing the fonts wouldn't solve the problem. Normal Windows applications would install the fonts but it acceptable for an open source software to have its own fonts directory. Also, it serves as an example to Shoes programmers on how to load non-system fonts.

The Pango message handler from stackoverflow should tell us the exact reason for these errors. Then we can figure out what to do next.

Collaborator

BackOrder commented Feb 15, 2015

The question is what are the Pango modules for? From Pango website:

Dynamically loaded modules then handle text layout for particular combinations of script and font backend. Pango ships with a wide selection of modules, including modules for Hebrew, Arabic, Hangul, Thai, and a number of Indic scripts. Virtually all of the world's major scripts are supported.

My understanding is that Shoes for all platforms may not properly support fonts localization. Even on MacOS X, there would be some modules missing (as seen on stackoverflow). This would be a separate issue to file.

We know that Shoes is perfectly happy with the fonts, and fontconfig is primarily used to build the Shoes font list (and perhaps thats all it does). Only gtk/windows/pango complains about those two fonts. Research and deep thought is needed.

The Pango manual says either one can be used — fontconfig or win32 fonts api. This might be a case where win32 is a winner when it comes to runtime speed but fontconfig is already implemented and running fc-cache using NSIS might cut it, speed afterwards will be matched.

Perhaps NSIS can install the two fonts and Shoes/Windows doesn't issue load them from loose files? Perhaps Shoes/gtk.s should not call the the Linux centric code and call the win32 centric code to find and build the the internal font.

Installing the fonts wouldn't solve the problem. Normal Windows applications would install the fonts but it acceptable for an open source software to have its own fonts directory. Also, it serves as an example to Shoes programmers on how to load non-system fonts.

The Pango message handler from stackoverflow should tell us the exact reason for these errors. Then we can figure out what to do next.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 1, 2015

Contributor

updating to fontconfig 2.11.1 does not fix the problem

Contributor

ccoupe commented Mar 1, 2015

updating to fontconfig 2.11.1 does not fix the problem

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Mar 1, 2015

Collaborator

updating to fontconfig 2.11.1 does not fix the problem

Thanks for testing this one! How about Pango message handler?

Collaborator

BackOrder commented Mar 1, 2015

updating to fontconfig 2.11.1 does not fix the problem

Thanks for testing this one! How about Pango message handler?

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 2, 2015

Contributor

As we have discussed somewhere, Theres a lot to do with getting fontconfig really working properly and the new version I built from source has some 'features' we might want.

Contributor

ccoupe commented Mar 2, 2015

As we have discussed somewhere, Theres a lot to do with getting fontconfig really working properly and the new version I built from source has some 'features' we might want.

@ccoupe ccoupe referenced this issue Mar 11, 2015

Closed

Gtk2 Themes #24

ccoupe referenced this issue Mar 12, 2015

copy enough hicolor icon theme stuff to stop choes whines.
* requires new shoesdeps
* doesn't make the exe download smaller
* not a peep on cshoes.exe console
* when confirmed, it closes #78,#48, perhaps #24.

@ccoupe ccoupe added this to the 3.2.22 milestone Mar 17, 2015

@ccoupe ccoupe closed this Mar 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment