Re: gtk3 (GtkTextView) and MacOS

2015-02-28 Thread Roger Davis


Hi Jim,

I suspect this may have something to do with how gtk3/gnome3 is built 
and/or configured on the Mac. I have no experience with the jhbuild 
environment and have always used the MacPorts packages, but have never 
made any attempt to dig into how the latter are built. As I said, I was 
quite startled to find that my apps were somehow getting their fonts out 
of the MacOS font system rather than the fontconfig stuff used by most X11 
servers. Perhaps gtk3 has some backdoor directly into the MacOS fonts that 
was enabled by the MacPorts build, or maybe somehow my XQuartz (2.7.7, 
xorg-server 1.15.2) has been built to use those fonts. Might be an 
interesting experiment to play with a non-gtk X11 client's fonts and see 
what happens.


As far as my use of $XDG_CONFIG_HOME/gtk-3.0/settings.ini, I based this 
strategy on


https://developer.gnome.org/gtk3/stable/GtkSettings.html

which reads

GtkSettings provide a mechanism to share global settings between 
applications. On the X window system, this sharing is realized by an 
XSettings manager that is usually part of the desktop environment, along 
with utilities that let the user change these settings. In the absence of 
an Xsettings manager, GTK+ reads default values for settings from 
settings.ini files in /etc/gtk-3.0, $XDG_CONFIG_DIRS/gtk-3.0 and 
$XDG_CONFIG_HOME/gtk-3.0. These files must be valid key files (see 
GKeyFile), and have a section called Settings. ...


Maybe the key phrase here is In the absence of an Xsettings manager, 
i.e., you have one and I don't? Also of interest might be On the X window 
system, implying that if someone used the direct-to-Quartz gtk backend 
this would not work then, either? It would certainly be nice to discover a 
strategy that worked under all these circumstances. I think that at this 
point I don't actually need my settings.ini file to get proper 
functionality with the default theme (now that my fonts are being 
correctly accessed), but I'm keeping it around mostly so users can alter 
the fontsize since I'm not running full-on gnome3 and there's no 
tweak-tool, etc., available. (I still can't install many of the gnome3 
MacPorts packages because of a MacPorts package bug, and am at any rate 
not enthusiastic about loading up the system with all that weight just to 
run my own gtk app suite.)


You might try changing your font size value in settings.ini just to 
confirm whether that file is being read at all. That had an effect for me 
even when I could not get the font to change (before discovering I was 
trying to use the wrong fonts).


This is a murky swamp indeed!

Roger


From: Jim Charlton char...@gmail.com

I tried your font changing solution to alter the font for my gtk3
application.  I was unable to change the font by putting gtk-font-name
in settings.ini regardless of where I put that file or the value of the
environment variable XDG_CONFIG_HOME... or the actual font name.  I
found this to be true on both MAC OS X (Yosemite 1010, Gtk3 and Gtkmm3
built with jhbuild) and on my Linux Ubuntu box.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-27 Thread Jim Charlton

Roger:

I tried your font changing solution to alter the font for my gtk3 
application.  I was unable to change the font by putting gtk-font-name 
in settings.ini regardless of where I put that file or the value of the 
environment variable XDG_CONFIG_HOME... or the actual font name.  I 
found this to be true on both MAC OS X (Yosemite 1010, Gtk3 and Gtkmm3 
built with jhbuild) and on my Linux Ubuntu box.


I can change the font for specific widgets, as I mentioned previously, 
using the override_font method of  Gtk::Widget in Gtkmm.


This is not an actual problem for me as I like the fonts that I am 
getting.  But I just thought that I would mention that there is still 
some magic going on that I, for one, do not understand.


jim...   Jim Charlton

On 15-02-25 10:35 PM, Roger Davis wrote:


Hi all,

So I finally have my problem fully solved for now, and here is a 
summary of the pertinent points. Beware that some of this may only 
apply to the MacPorts install of gtk3, I have no experience with any 
other type of gtk3 install on MacOS.


(1) I had to set my XDG_CONFIG_HOME environment variable to a 
directory of my own creation containing the file gtk-3.0/settings.ini. 
The contents of the latter are


[Settings]
gtk-application-prefer-dark-theme = false
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita
gtk-font-name = Cantarell 12

Use the gtk-font-name to specify a font name and size of your choice, 
but the named font must be MacOS-managed, not X11/fontconfig-managed! 
Meaning, if you were to open up the MacOS FontBook app you should see 
it listed there.


You may be able to set XDG_CONFIG_HOME to any gtk3-installed theme 
directory, e.g., /opt/local/share/themes/HighContrast, but whatever 
font is being used by that theme (or by default) must be similarly 
MacOS-managed.


(2) If you want to use a font that is not already managed by MacOS 
(e.g., Cantarell or any other gtk-ish font not already available in 
native MacOS), you must install it in one of two ways. You can use 
FontBook as recommended by many web sources, but I could not find any 
way to install my fonts in that manner so as to be visible to all 
userIDs. To do the latter I had to manually use the Finder to drag the 
desired .ttf file(s) into /Library/Fonts. See 
http://support.apple.com/en-us/HT201722 for more information.


(3 -- Free Bonus!) Unless you are using a direct gtk-on-Quartz 
implementation (in which case, please tell me if that's working well 
and, if so, how you made it so), you will very likely be using the 
XQuartz X11 server. I have been having intermittent problems with 
XQuartz startup when invoking various X11 clients, the problem being 
that occasionally X11 windows are mapped to the display in an 
unmanaged state (meaning without the MacOS window titlebar and its 
close/iconify/etc. buttons and with no way to move the window anywhere 
else on the display). This does not happen often but it's far from 
rare. When it does happen, it takes XQuartz a *very* long time to 
start (tens of seconds). This problem has been reported by other users 
but I have never seen any clear fix, and I have seen one fix that did 
not work for me at all (changing a Mission Control setting). In my 
case (and probably all the others), the quartz-wm window manager 
either died or was just never started. Fortunately for me at least, 
however, I have so far been able to fix this problem just by manually 
(re?)starting the window manager with


% quartz-wm 

May my luck continue and yours be as good, because this is a truly 
annoying problem!


I hope others find these tips helpful, and thanks again to the list 
members who helped me grope my way to these solutions!


Roger
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Jim Charlton
I had a similar problem with gtk3 and gtkmm3 programs on MacOS X 
(Yosemite) and Linux (Ubuntu).  I am using jhbuild to install the 
gtk/gtkmm libraries on the Mac.  The UI looks fine on Linux but not so 
good on the Mac.  The problem appears to be the theme.


On linux (Ubuntu), using libgtkmm-3.0-dev, compiled programs can have 
their themes changed with Tweak Tool. Having chosen the Ambiance theme, 
I can edit /usr/share/themes/Ambiance/gtk-3.0/gtk.css to @import 
url(gtk-main.css); and then edit 
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css to customize the theme.


I found (eventually) that I could do the same on the Mac if I set the 
environment variable
XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am not sure where your themes 
are installed using MacPorts. Perhaps /usr/share/themes/Ambiance or 
whatever).
prior to executing the program. The selected (and perhaps edited) theme 
is then used over the embedded default.
If memory serves me correctly... I was able to copy themes from Linux to 
the Mac and use them.


jim...   JIm Charlton


On 15-02-24 11:18 PM, Roger Davis wrote:

Hi all,

I have an application suite built on gtk3 which is targeted at both 
Linux (specifically CentOS 6 and 7) and MacOS X (Yosemite). Although 
the software is usable under MacOS I am having an ugly cosmetic 
problem there with my GtkTextView widgets, and other visual details 
are also not consistent with CentOS Linux. I suspect this is due to an 
incomplete or misconfigured gnome3 theme/font installation under 
Yosemite. (I am using the MacPorts gtk3/gnome packages.) I am hoping 
that someone here can give some advice on what gnome3 packages I need 
to install and configure to at least solve my GtkTextView problem.


Under Linux my GtkTextView widgets display text nicely with consistent 
and adequate spacing between successive lines of text. There appears 
to be a very consistent 2 or 3 pixels of white space between the 
lowest descenders of line N and the highest ascenders of line N+1. 
Under MacOS, however, the descenders from line N actually touch the 
ascenders of line N+1 and the text is thus hard to read. Furthermore, 
line spacing is not always consistent -- lines with the unicode 
sequence \342\206\222 (right-arrow) have 2 or 3 pixels of additional 
inter-line spacing after the preceding line. (That spacing is actually 
perfect, but I want it for *every* line.)


There appear to be no relevant gtk_text_view_XXX() functions 
controlling inter-line spacing, so I assume this problem is all about 
something that is broken with my gnome3 theme and/or font installation 
under MacOS. Does anyone have any idea of what this might be?


I would very much prefer to configure a gnome3 installation under 
MacOS that is as lightweight as possible. No gtk3 apps other than my 
own are running, and I don't want to force users to have to cope with 
the gnome3 UI any more than is necessary, although if there was a way 
for them to select their own theme (especially with regard to font 
sizing within GtkTextView and other dialog panel widgets) that would 
be a big plus. Another reason for a lightweight gnome3 environment is 
that I've so far been unable to even install the full MacPorts gnome3 
package set (due to a problem with the mojs17 port which seems to be a 
required dependency for many of the gnome3 packages), and I've read 
that many people who did manage to install a full-featured gnome3 
under MacOS never got it to operate.


Following is a list of gtk3- and gnome-related MacPorts packages which 
are now installed on my system, and which are clearly sufficient to 
build my software and run it, albeit with these annoying cosmetic issues:



port list installed | grep gnome

adwaita-icon-theme @3.14.1 gnome/adwaita-icon-theme
at-spi2-atk@2.14.1 gnome/at-spi2-atk
at-spi2-core   @2.14.1 gnome/at-spi2-core
gnome-backgrounds  @3.14.1 gnome/gnome-backgrounds
gnome-icon-theme   @3.12.0 gnome/gnome-icon-theme
gnome-themes-standard  @3.14.0 gnome/gnome-themes-standard
gobject-introspection  @1.42.0 gnome/gobject-introspection
gtk2   @2.24.25gnome/gtk2
gtk3   @3.14.5 gnome/gtk3
hicolor-icon-theme @0.14 gnome/hicolor-icon-theme
icon-naming-utils  @0.8.90 gnome/icon-naming-utils
libcroco   @0.6.8  gnome/libcroco

Can anyone recommend any other packages which are necessary to get my 
GtkTextView objects to display better-looking text? Is there any 
necessary user-environment configuration, e.g., environment variables 
or config files stashed in ~ or elsewhere? (I did try copying the 
~/.config directory from a CentOS 7 system with a functional 
full-blown gnome3 environment, but that didn't make any difference.) 
Are there any gnome3-related system processes which must be running 
before I start a gtk3 app if I want 

Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Roger Davis


Wow, here's a shocker, to my own stupid self at least -- it appears that 
gtk3 is tied into the native MacOS font system!


Thanks for the tip on fontconfig/fc-cache, Allin. Once I looked into this 
it became apparent that fontconfig had known all along about all kinds of 
fonts, but none of the ones listed by fc-list which I had already tried 
were usable from my settings.ini file. Eventually, however, I tried 
'Courier' which worked to my great surprise. I then tried to figure out 
what was special about Courier, and having noticed that the system process 
list showed


1330  9108 1   0  9:12AM ?? 0:06.92 
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Support/fontd


I opened up my MacOS Terminal preferences on a lark to see what fonts 
MacOS was making available. Courier, check. Copperplate, Monaco, check. 
And they all work in my settings.ini. Youse all have to try this just to 
see a gtk3 dialog panel overflowing with Copperplate. Or not.


It does seem a bit contradictory to me that gtk3 (at least as packaged by 
MacPorts) calls up XQuartz, but then completely ignores the X11 font 
support and goes direct to MacOS. Not a crazy idea, I suppose, but a bit 
surprising, and also not likely to make available all the gtk-related 
fonts you're used to having. I'd be less surprised to see a direct 
gtk-on-Quartz implementation do this.


OK, now to figure out how to add the font I want to MacOS -- how hard 
could that possibly be? ;-


Thanks for your followup, Jim, and for your comments as well, Daniel! 
Regarding the latter, I'd have to say that for what is supposed to be a 
cross-platform GUI, gtk3/gnome3 is abysmally supported on MacOS, which is 
a major platform. I won't say that's anybody's fault, but if the 
philosophy here is that gtk doesn't need to work well on boxes that aren't 
running full-on gnome3, I think that's a prescription for its ultimate 
demise -- a disturbing thought given that I've recently spent almost a 
year porting two decades' worth of Motif code into it.


Thanks all! (And back here in ten minutes after I'm whipped by the MacOS 
font system.)


Roger

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Jim Charlton

Roger:

I don't know if it will help or not... but I have used Gtk::TextView, 
the gtkmm wrapper for GtkTextView and have changed the fonts with the 
class method override_font.


For example

Gtk::TextView tv1;
Pango::FontDescription *pfd = new Pango::FontDescription(Sans 8);
tv1.override_font(*pfd);

This implies that GtkTextView uses pango font descriptors. Perhaps you 
can use the GtkWidget.modify_font() method that will accept a 
PangoFontDescription.


jim...   Jim Charlton



On 15-02-25 03:56 PM, Roger Davis wrote:


Thanks, Jim, your hint on setting XDG_CONFIG_HOME led me to a bunch of 
other useful info on the web that I have been slogging through all 
morning now. I have had some success but am still far from the finish 
line.


On my Mac, if I set XDG_CONFIG_HOME to 
/opt/local/share/themes/HighContrast, which is where MacPorts dumped the
HighContrast theme, and which contains a gtk-3.0 subdirectory with the 
files gtk.css, gtk.gresource and settings.ini, my app successfully 
loads the HighContrast theme, although I still have the same font 
problems within my GtkTextView windows.


Similarly, I can make my own settings.ini file in 
~/gtksettings/gtk-3.0, set XDG_CONFIG_HOME to ~/gtksettings, and my 
app processes that file, but again with the same font issues. That 
file contains a line of the form


   gtk-font-name = fontname fontsize

e.g.,

   gtk-font-name = Sans 10

and I can tweak the fontsize value and successfully get the altered 
font size in my app. However, absolutely nothing that I do to the 
fontname results in the use of a different font. In fact,


   gtk-font-name = FontConfusion 10

still loads exactly the same font!

So, I am now convinced this is some kind of font installation or 
configuration problem. I am guessing that my MacOS gtk3 can't find any 
fonts whatsoever except for this exceptionally unintelligent fallback 
font it seems to be using. Does anyone know where gtk3 is looking for 
its fonts? I've spent quite a while looking for font files on my 
CentOS 7 system where I'm not having font problems, and actually can't 
find many there anywhere! Can anyone give me a reference to some 
decent documentation on where gtk3 font management that describes how 
to name fonts with the gtk-font-name property and how that name is 
associated with an actual font file? I sure have not been able to find 
any on my own!


Thanks again,

Roger


I found (eventually) that I could do the same on the Mac if I set the 
environment variable XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am 
not sure where your themes are installed using MacPorts. Perhaps 
/usr/share/themes/Ambiance or whatever). prior to executing the 
program. The selected (and perhaps edited) theme is then used over 
the embedded default. If memory serves me correctly... I was able to 
copy themes from

Linux to the Mac and use them.

jim...   JIm Charlton


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Daniel Kasak
Sorry to wander slightly away from the original topic, but I'm also
building gtk3 for OSX using jhbuild, and I've found a bunch of issues with
themes and icons and fonts, as per the above discussion. I'm wondering
where the 'responsibility' of setting up a nice vanilla configuration lies?
Would this be in, eg, jhbuild? It would be good to nail these issues so
people can more easily build cross-platform apps.

Dan
‚Äč
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Roger Davis


Thanks, Jim, your hint on setting XDG_CONFIG_HOME led me to a bunch of 
other useful info on the web that I have been slogging through all morning 
now. I have had some success but am still far from the finish line.


On my Mac, if I set XDG_CONFIG_HOME to 
/opt/local/share/themes/HighContrast, which is where MacPorts dumped the
HighContrast theme, and which contains a gtk-3.0 subdirectory with the 
files gtk.css, gtk.gresource and settings.ini, my app successfully loads 
the HighContrast theme, although I still have the same font problems 
within my GtkTextView windows.


Similarly, I can make my own settings.ini file in ~/gtksettings/gtk-3.0, 
set XDG_CONFIG_HOME to ~/gtksettings, and my app processes that file, but 
again with the same font issues. That file contains a line of the form


   gtk-font-name = fontname fontsize

e.g.,

   gtk-font-name = Sans 10

and I can tweak the fontsize value and successfully get the altered font 
size in my app. However, absolutely nothing that I do to the fontname 
results in the use of a different font. In fact,


   gtk-font-name = FontConfusion 10

still loads exactly the same font!

So, I am now convinced this is some kind of font installation or 
configuration problem. I am guessing that my MacOS gtk3 can't find any 
fonts whatsoever except for this exceptionally unintelligent fallback font 
it seems to be using. Does anyone know where gtk3 is looking for its 
fonts? I've spent quite a while looking for font files on my CentOS 7 
system where I'm not having font problems, and actually can't find many 
there anywhere! Can anyone give me a reference to some decent 
documentation on where gtk3 font management that describes how to name 
fonts with the gtk-font-name property and how that name is associated 
with an actual font file? I sure have not been able to find any on my own!


Thanks again,

Roger


I found (eventually) that I could do the same on the Mac if I set the 
environment variable XDG_CONFIG_HOME=/path/to/theme/gtk-3.0/ (I am not 
sure where your themes are installed using MacPorts. Perhaps 
/usr/share/themes/Ambiance or whatever). prior to executing the program. 
The selected (and perhaps edited) theme is then used over the embedded 
default. If memory serves me correctly... I was able to copy themes from

Linux to the Mac and use them.

jim...   JIm Charlton


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Allin Cottrell

On Wed, 25 Feb 2015, Roger Davis wrote:

Thanks, Jim, your hint on setting XDG_CONFIG_HOME led me to a bunch of other 
useful info on the web that I have been slogging through all morning now. I 
have had some success but am still far from the finish line.


On my Mac, if I set XDG_CONFIG_HOME to /opt/local/share/themes/HighContrast, 
which is where MacPorts dumped the
HighContrast theme, and which contains a gtk-3.0 subdirectory with the files 
gtk.css, gtk.gresource and settings.ini, my app successfully loads the 
HighContrast theme, although I still have the same font problems within my 
GtkTextView windows.


Similarly, I can make my own settings.ini file in ~/gtksettings/gtk-3.0, set 
XDG_CONFIG_HOME to ~/gtksettings, and my app processes that file, but again 
with the same font issues. That file contains a line of the form


  gtk-font-name = fontname fontsize

e.g.,

  gtk-font-name = Sans 10

and I can tweak the fontsize value and successfully get the altered font size 
in my app. However, absolutely nothing that I do to the fontname results in 
the use of a different font. In fact,


  gtk-font-name = FontConfusion 10

still loads exactly the same font!

So, I am now convinced this is some kind of font installation or 
configuration problem. I am guessing that my MacOS gtk3 can't find any fonts 
whatsoever except for this exceptionally unintelligent fallback font it seems 
to be using. Does anyone know where gtk3 is looking for its fonts?


I can't claim to offer anything definitive but the hints are: 
fontconfig and fc-cache. Fontconfig should be responsible for 
providing font information to gtk + pango, and fc-cache is the 
program that establishes the cache on which fontconfig draws. You 
might try doing sudo fc-cache and see if that makes any difference 
to subsequent runs of your gtk program on OS X.


--
Allin Cottrell
Department of Economics
Wake Forest University
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 (GtkTextView) and MacOS

2015-02-25 Thread Roger Davis


Hi all,

So I finally have my problem fully solved for now, and here is a summary 
of the pertinent points. Beware that some of this may only apply to the 
MacPorts install of gtk3, I have no experience with any other type of gtk3 
install on MacOS.


(1) I had to set my XDG_CONFIG_HOME environment variable to a directory of 
my own creation containing the file gtk-3.0/settings.ini. The contents of 
the latter are


[Settings]
gtk-application-prefer-dark-theme = false
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita
gtk-font-name = Cantarell 12

Use the gtk-font-name to specify a font name and size of your choice, but 
the named font must be MacOS-managed, not X11/fontconfig-managed! Meaning, 
if you were to open up the MacOS FontBook app you should see it listed 
there.


You may be able to set XDG_CONFIG_HOME to any gtk3-installed theme 
directory, e.g., /opt/local/share/themes/HighContrast, but whatever font 
is being used by that theme (or by default) must be similarly 
MacOS-managed.


(2) If you want to use a font that is not already managed by MacOS (e.g., 
Cantarell or any other gtk-ish font not already available in native 
MacOS), you must install it in one of two ways. You can use FontBook as 
recommended by many web sources, but I could not find any way to install 
my fonts in that manner so as to be visible to all userIDs. To do the 
latter I had to manually use the Finder to drag the desired .ttf file(s) 
into /Library/Fonts. See http://support.apple.com/en-us/HT201722 for more 
information.


(3 -- Free Bonus!) Unless you are using a direct gtk-on-Quartz 
implementation (in which case, please tell me if that's working well and, 
if so, how you made it so), you will very likely be using the XQuartz X11 
server. I have been having intermittent problems with XQuartz startup when 
invoking various X11 clients, the problem being that occasionally X11 
windows are mapped to the display in an unmanaged state (meaning without 
the MacOS window titlebar and its close/iconify/etc. buttons and with no 
way to move the window anywhere else on the display). This does not happen 
often but it's far from rare. When it does happen, it takes XQuartz a 
*very* long time to start (tens of seconds). This problem has been 
reported by other users but I have never seen any clear fix, and I have 
seen one fix that did not work for me at all (changing a Mission Control 
setting). In my case (and probably all the others), the quartz-wm window 
manager either died or was just never started. Fortunately for me at 
least, however, I have so far been able to fix this problem just by 
manually (re?)starting the window manager with


% quartz-wm 

May my luck continue and yours be as good, because this is a truly 
annoying problem!


I hope others find these tips helpful, and thanks again to the list 
members who helped me grope my way to these solutions!


Roger
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk3 (GtkTextView) and MacOS

2015-02-24 Thread Roger Davis

Hi all,

I have an application suite built on gtk3 which is targeted at both Linux 
(specifically CentOS 6 and 7) and MacOS X (Yosemite). Although the 
software is usable under MacOS I am having an ugly cosmetic problem there 
with my GtkTextView widgets, and other visual details are also not 
consistent with CentOS Linux. I suspect this is due to an incomplete or 
misconfigured gnome3 theme/font installation under Yosemite. (I am using 
the MacPorts gtk3/gnome packages.) I am hoping that someone here can give 
some advice on what gnome3 packages I need to install and configure to at 
least solve my GtkTextView problem.


Under Linux my GtkTextView widgets display text nicely with consistent and 
adequate spacing between successive lines of text. There appears to be a 
very consistent 2 or 3 pixels of white space between the lowest descenders 
of line N and the highest ascenders of line N+1. Under MacOS, however, the 
descenders from line N actually touch the ascenders of line N+1 and the 
text is thus hard to read. Furthermore, line spacing is not always 
consistent -- lines with the unicode sequence \342\206\222 (right-arrow) 
have 2 or 3 pixels of additional inter-line spacing after the preceding 
line. (That spacing is actually perfect, but I want it for *every* line.)


There appear to be no relevant gtk_text_view_XXX() functions controlling 
inter-line spacing, so I assume this problem is all about something that 
is broken with my gnome3 theme and/or font installation under MacOS. Does 
anyone have any idea of what this might be?


I would very much prefer to configure a gnome3 installation under MacOS 
that is as lightweight as possible. No gtk3 apps other than my own are 
running, and I don't want to force users to have to cope with the gnome3 
UI any more than is necessary, although if there was a way for them to 
select their own theme (especially with regard to font sizing within 
GtkTextView and other dialog panel widgets) that would be a big plus. 
Another reason for a lightweight gnome3 environment is that I've so far 
been unable to even install the full MacPorts gnome3 package set (due to a 
problem with the mojs17 port which seems to be a required dependency for 
many of the gnome3 packages), and I've read that many people who did 
manage to install a full-featured gnome3 under MacOS never got it to 
operate.


Following is a list of gtk3- and gnome-related MacPorts packages which are 
now installed on my system, and which are clearly sufficient to build my 
software and run it, albeit with these annoying cosmetic issues:



port list installed | grep gnome

adwaita-icon-theme @3.14.1 gnome/adwaita-icon-theme
at-spi2-atk@2.14.1 gnome/at-spi2-atk
at-spi2-core   @2.14.1 gnome/at-spi2-core
gnome-backgrounds  @3.14.1 gnome/gnome-backgrounds
gnome-icon-theme   @3.12.0 gnome/gnome-icon-theme
gnome-themes-standard  @3.14.0 gnome/gnome-themes-standard
gobject-introspection  @1.42.0 gnome/gobject-introspection
gtk2   @2.24.25gnome/gtk2
gtk3   @3.14.5 gnome/gtk3
hicolor-icon-theme @0.14   gnome/hicolor-icon-theme
icon-naming-utils  @0.8.90 gnome/icon-naming-utils
libcroco   @0.6.8  gnome/libcroco

Can anyone recommend any other packages which are necessary to get my 
GtkTextView objects to display better-looking text? Is there any necessary 
user-environment configuration, e.g., environment variables or config 
files stashed in ~ or elsewhere? (I did try copying the ~/.config 
directory from a CentOS 7 system with a functional full-blown gnome3 
environment, but that didn't make any difference.) Are there any 
gnome3-related system processes which must be running before I start a 
gtk3 app if I want the latter to conform to any particular theme, etc.? I 
am starting my apps simply by invoking them directly from a MacOS 
Terminal, which then implicitly starts XQuartz (2.7.7). I've made no 
effort to specifically launch any gnome3-related system process other than 
the following commands which were recommended by the MacPorts installation 
chatter at gtk3 package installation time:


   % sudo launchctl load -w 
/Library/LaunchDaemons/org.freedesktop.dbus-system.plist
   % launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist


Any ideas? Thanks!

Roger Davis
Univ. of Hawaii
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list