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

Cairo, Pango, Fontconfig. #78

Closed
ccoupe opened this Issue Feb 28, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@ccoupe
Contributor

ccoupe commented Feb 28, 2015

There are a number of bug reports having to do with Shoes and Pango warnings when running on Windows. Before hacking at font.conf or nsis or just flailing around I thought I'd look at the source code and configure options to see if there might be a better solution. You can't figure out fontconfig without knowing a little about Pango and you can't figure that out without dealing with Cairo. Until now, cairo and pango are just black box that work fine. But they don't on Shoes//Windows/GTK.

That turns out to be a very interesting place and way too much to document on the issues list. I started a wiki article [[Tower of Cairo]https://github.com/Shoes3/shoes3/wiki/Tower-of-Cairo] to document the exploration. There are so many hints of things we could use cairo for (svg back end, pdf back-end) Ctrl-P ? Of course we have to be willing to (re)build cairo and pango from source but we knew that would happen eventually. Just like we have to build Ruby from source.

Issues affected are #69, #54, #48, #23 and probably more.

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 1, 2015

Contributor

This may become even more complicated. The dependencies on Windows are many years old and hundred of patches have been applied since then. Some of them for pango win32 fonts. Certain pango versions require certain versions of glib and cairo. Ubuntu 14.04 is fairly recent and we know gtk and shoes are happy. OSX also has dependcies on some of the same libs and Brew installed recent ones so we should be safe upgrading the Windows deps. However, it may not fix anything and it might create new bugs.

Contributor

ccoupe commented Mar 1, 2015

This may become even more complicated. The dependencies on Windows are many years old and hundred of patches have been applied since then. Some of them for pango win32 fonts. Certain pango versions require certain versions of glib and cairo. Ubuntu 14.04 is fairly recent and we know gtk and shoes are happy. OSX also has dependcies on some of the same libs and Brew installed recent ones so we should be safe upgrading the Windows deps. However, it may not fix anything and it might create new bugs.

@BackOrder

This comment has been minimized.

Show comment
Hide comment
@BackOrder

BackOrder Mar 1, 2015

Collaborator

Here is a small snippet for listing dependencies. Run it into tightmingw directory using msys. It would be great to build a tree to display the relationship amongst the components.

require("pp")

Dir["*.{exe,dll}"].each { |file|
  output = %x[objdump -x #{file} | grep "DLL Name"].split("\n").collect { |n| n.gsub(/.*: (.*)/, '\1') }

  puts "#{file}: #{output}"
}

The list below is top-level components, which means no other component is reported depending on them.

cshoes.exe
shoes.exe
libcairo-gobject-2.dll
libeay32.dll
libffi-6.dll
libgcc_s_sjlj-1.dll
libgdbm_compat-3.dll
libiconv-2.dll
libyaml-0-2.dll
sqlite3.dll
ssleay32.dll
Collaborator

BackOrder commented Mar 1, 2015

Here is a small snippet for listing dependencies. Run it into tightmingw directory using msys. It would be great to build a tree to display the relationship amongst the components.

require("pp")

Dir["*.{exe,dll}"].each { |file|
  output = %x[objdump -x #{file} | grep "DLL Name"].split("\n").collect { |n| n.gsub(/.*: (.*)/, '\1') }

  puts "#{file}: #{output}"
}

The list below is top-level components, which means no other component is reported depending on them.

cshoes.exe
shoes.exe
libcairo-gobject-2.dll
libeay32.dll
libffi-6.dll
libgcc_s_sjlj-1.dll
libgdbm_compat-3.dll
libiconv-2.dll
libyaml-0-2.dll
sqlite3.dll
ssleay32.dll
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 1, 2015

Contributor

That appears to be the list of Ruby dependencies for ext/gems (mostly). A tree would be most helpful tracking down the dependencies in *.pc I'm trying to build all the deps starting from zlib-1.2.8 up and somebody is holding on to a old libpng.

Contributor

ccoupe commented Mar 1, 2015

That appears to be the list of Ruby dependencies for ext/gems (mostly). A tree would be most helpful tracking down the dependencies in *.pc I'm trying to build all the deps starting from zlib-1.2.8 up and somebody is holding on to a old libpng.

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

@ccoupe ccoupe self-assigned this Mar 7, 2015

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2015

Contributor

I'll commit some changes in a few hours that use the newer dependencies and fixes these bugs. Too soon to close the issues. When fontconfig can't match a request it may not return anything reasonable. So, I'm a more explicit about setting fonts (in gtk.c) and providing something that will match that in fonts.conf

There is a cost - I'm not all that happy with the font appearance on Windows compared to Linux (or even the old scheme on Windows. Duplicating the build of dependencies has to be done on a mingw tightshoes setup - a pain but my configure scripts could be run through a simple sed script and that would ease the task. Just set make/win/7/env.rb - ShoesDep to point to the newly built dependencies.

We still need to run the fc-cache.exe as part of the installation, but its now part of whats bundled up with Shoes.

And I have some new knowledge about fixing the icon theme, but that's a different bug report.

Contributor

ccoupe commented Mar 7, 2015

I'll commit some changes in a few hours that use the newer dependencies and fixes these bugs. Too soon to close the issues. When fontconfig can't match a request it may not return anything reasonable. So, I'm a more explicit about setting fonts (in gtk.c) and providing something that will match that in fonts.conf

There is a cost - I'm not all that happy with the font appearance on Windows compared to Linux (or even the old scheme on Windows. Duplicating the build of dependencies has to be done on a mingw tightshoes setup - a pain but my configure scripts could be run through a simple sed script and that would ease the task. Just set make/win/7/env.rb - ShoesDep to point to the newly built dependencies.

We still need to run the fc-cache.exe as part of the installation, but its now part of whats bundled up with Shoes.

And I have some new knowledge about fixing the icon theme, but that's a different bug report.

ccoupe added a commit that referenced this issue Mar 7, 2015

Modify minw to use newer dependencies addresses #78
* replaces gtk+-2 bundle
* must rebuild dependencies by hand or use my new collection

@ccoupe ccoupe closed this in 8909121 Mar 7, 2015

@ccoupe ccoupe reopened this Mar 7, 2015

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2015

Contributor

I don't remember closing this. Sorry

Contributor

ccoupe commented Mar 7, 2015

I don't remember closing this. Sorry

ccoupe added a commit that referenced this issue Mar 9, 2015

For #78 et all. Fix font handling.
* don't use gtk.c experiment of forcing a font choice.
* copy the missing gtk files that belong to a well behaved gtk app
* create the ShoesDeps.zip to match.
* Side effect - theme engine works and it's pretty.

@ccoupe ccoupe referenced this issue Mar 11, 2015

Closed

Gtk2 Themes #24

ccoupe added a commit that referenced this issue Mar 11, 2015

@ccoupe ccoupe closed this in 9ad02eb Mar 12, 2015

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