Created attachment 382170 [details, diff] patch against gx86 version Changes: - added prefixed fontpath as DEFAULT_FONTPATH
man that's ugly ... two things instead of doing: fontpath="${fontpath}:... do: fontpath+=":... is this needed when USE=fontconfig ? because in that case, won't gd use fontconfig to locate fonts and fontconfig knows where to find things ? if so, maybe we should just force USE=fontconfig on prefix systems ?
Created attachment 382192 [details, diff] patch against gx86 version (In reply to SpanKY from comment #1) > man that's ugly ... two things > > instead of doing: > fontpath="${fontpath}:... > do: > fontpath+=":... Done. > > is this needed when USE=fontconfig ? because in that case, won't gd use > fontconfig to locate fonts and fontconfig knows where to find things ? if > so, maybe we should just force USE=fontconfig on prefix systems ? I think, you are right. We could put this block inside use !fontconfig. @grobian: should we force fontconfig on prefix?
I seem to remember sth like this, so makes sense to me!
(In reply to Fabian Groffen from comment #3) > I seem to remember sth like this, so makes sense to me! Do this mean, yea or nay? Yea1: REQUIRED_USE="prefx? ( fontconfig )" or Yea2: package.use.force
(In reply to Christoph Junghans from comment #4) i'm fine with either approach ... leave it up to you guys
(In reply to Christoph Junghans from comment #4) > (In reply to Fabian Groffen from comment #3) > > I seem to remember sth like this, so makes sense to me! > Do this mean, yea or nay? yay (sorry) > Yea1: REQUIRED_USE="prefx? ( fontconfig )" > or > Yea2: package.use.force I'd prefer the first approach
+ 05 Aug 2014; Christoph Junghans <ottxor@gentoo.org> gd-2.0.35-r4.ebuild: + added prefix support (bug #518970) +
Christoph, where is the fontcase statement as was in you patch? It's gone in the ebuild now, which broke font-localising. Was this intentional? Then I misunderstood the implications of this bug :/
(In reply to Fabian Groffen from comment #8) > Christoph, where is the fontcase statement as was in you patch? It's gone > in the ebuild now, which broke font-localising. Was this intentional? Then > I misunderstood the implications of this bug :/ Wasn't the idea that by forcing fontconfig, hard-coded font paths in gd are not necessary anymore?
Ok, well it's not. My fault, didn't get that. I compiled gd with the font paths and now it finds my fonts again. Not sure what it uses fontconfig for then.
To restore functionality, I'd love to commit the case statement as in attachment #1 [details]. If there are no objections, I'll commit this by the end of this week.
(In reply to Fabian Groffen from comment #11) i'd really really prefer to not do that. let's figure out what fontconfig is for as that's the cleaner path (assuming it does what we need -- font loading).
seems like the paths you're adding are just duplicating what's already in the source tree. the only thing you really want to do is add some extra search paths -- namely the corefonts repo. if you really want to pursue that route, you could send a pull request to the github repo to add a new configure option that'd allow control over the font path. do you have a testcase you're looking at to check behavior ? looking at the gd code a bit more, did you call gdFTUseFontConfig(1) first ? if not, it won't look at fontconfig during runtime.
i'm just going to make you guys get this merged upstream :). the good news is that i have commit access up there so i can review/approve your PRs.