Re: [gtk-osx-users] GTK+ macOS: fontconfig



Hi John,

Thank you for your help so far. I managed to build a version of gtk including freetype for the native architecture of my machine (x86_64).

However, I need an i386 build for the distribution, and have encountered linker errors after altering `.jhbuildrc-custom' to:

setup_sdk(target='10.7', sdk_version=None, architectures=['i386'])

The errors are all of the form:

Undefined symbols for architecture i386:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Having read the docs, I believe I have the `setup_sdk' parameterisation correct, but perhaps you can spot my mistake?

On 16 March 2018 at 21:20, Jeffrey Sheen <jeffrey sheen00 alumni imperial ac uk> wrote:
Thank you John. I'll try altering the build parameters as you've suggested.

I take your point about native font management.

The issue is that we've found Win32 native font selection to be erratic, changing fonts between Pango layout objects, despite a static font description. We now bundle fonts with the distributable to assure consistency.

If there is a native way to stream in packaged fonts other than fontconfig, then we will try that.


On 16 Mar 2018 20:52, "John Ralls" <jralls ceridwen us> wrote:


> On Mar 16, 2018, at 1:35 PM, Jeffrey Sheen <jeffrey.sheen00@alumni.imperial.ac.uk> wrote:
>
> Dear list,
>
> I have a project that I am porting to macOS that uses the GTK+ stack, specifically pango+cairo+fontconfig.
>
> The code relies on being able to create `FcConfig' (fontconfig) objects and call `pango_fc_font_map_set_config' to bind them to pango.
>
> After following the build steps on the wiki, I found that the built product did not include the fontconfig libraries or headers, or the interop header files for pango.
>
> I was expecting to find `fontconfig/fontconfig.h' and `pango/pangofc-fontmap.h'.
>
> Is there a build setting that I must alter/add to target fontconfig?
>
> Jeff.
>
> N.B. I had previously asked this question to gtk-osx-devel-list, but was redirected to gtk-osx-users-list.

For code like that there's meta-gtk-osx-freetype. Add that to your module list or make it a dependency of your app's module.

However, if you have commit on the project it would be more portable to *not* use fontconfig objects so that Pango can use the native font backends on platforms other than X11.

Regards,
John Ralls





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]