Re: Portable apps and fontconfig

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

 



On Mon, June 23, 2014 14:47, Dan Kegel wrote:
> On Mon, Jun 23, 2014 at 3:45 AM, Akira TAGOH <akira@xxxxxxxxx> wrote:
>>> But it's annoying to have to put
>>> the absolute path to the fonts in fonts.conf.
>>
>> You mean the place to load fonts, i.e. <dir> elements?
>
> Yes.
>
>>> Furthermore, I think at the moment the location of the fonts.conf
>>> file is hard-coded (right?).  It'd be nice if it could be looked for
>>> via a dll-relative path.
>>
>> Well, yes, it is determined at the build time. but can be replaced by
>> FONTCONFIG_FILE env var at the run time.
>
> That's still absolute, one more thing to be fixed up by the installer,
> and I'm trying to get to an app that can be relocated to a different
> directory without an installer.

I think there's special logic in place to support DLL-relative locations
of fonts.conf on Win32, if the DLL is found to be in a subfolder called
bin/ or lib/. Check DllMain in fccfg.c.

About the <dir> elements I'm not sure, I suppose you might have to use a
runtime-generated configuration file for that, although it should
certainly be possible to devise a patch for FcParseDir that adds
DLL-relative variants of the CUSTOMFONTDIR and APPSHAREFONTDIR stuff.. I
suppose we'd have to store the location we get in DllMain somewhere...

Although I'd have to ask, the current APPSHAREFONTDIR value of module-dir
+ "\\..\\share\\fonts" doesn't seem too far off for most use cases, even
if it's exe-relative?

Raimund

-- 
Worringer Str 31 Duesseldorf 40211 DE  home: <rs@xxxxxxxx>
+49-179-2981632 icq 16845346           work: <rs@xxxxxxxxxxxxxxx>

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux