[Fontconfig] PATH of fontconfig configration file in static build on Windows
Raimund Steger
rs at mytum.de
Mon Feb 15 23:00:58 UTC 2016
Hi,
there's code in DllMain (in fccfg.c) that initializes FONTCONFIG_PATH with <DLL location>/../etc/fonts if the DLL is in a "bin" or "lib" subfolder.
If linked statically, DllMain will not be called but all is not lost.
As far as I read FcConfigGetPath, on Win32 a fallback is a directory called "fonts" beneath the GetModuleFileName(NULL,...) result (in this case, the executable directory). See [1]. So you could try putting fonts.conf in there.
Raimund
[1] https://cgit.freedesktop.org/fontconfig/commit/?id=6d65081e35fc1ffae1212f173853b0693645192e
On Tue, 16 Feb 2016 07:39:11 +0900 (JST)
Tatsuro MATSUOKA <tmacchant at yahoo.co.jp> wrote:
> Sorry. Please ignore the previous mail.
>
> For static build
> $ FC_DEBUG=1024 ./fc-list
> FC_DEBUG=1024
> Fontconfig error: Cannot load default config file
>
> For dynamic build
> $ FC_DEBUG=1024 ./fc-list
> FC_DEBUG=1024
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\fonts.conf
> Scanning config dir C:\Programs\gplibs32_gcc492\etc\fonts\conf.d
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/10-scale-bitmap-fonts.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/20-unhint-small-vera.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/30-metric-aliases.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/30-urw-aliases.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/40-nonlatin.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/45-latin.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/49-sansserif.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/50-user.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/51-local.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/60-latin.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/65-fonts-persian.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/65-nonlatin.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/69-unifont.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/80-delicious.conf
> Loading config file C:\Programs\gplibs32_gcc492\etc\fonts\conf.d/90-synthetic.conf
>
>
> Any suggestions?
>
> Tatsuro
>
> ----- Original Message -----
> > From: Tatsuro MATSUOKA
> > To: Akira TAGOH
> > Cc: "fontconfig at fontconfig.org"
> > Subject: Re: [Fontconfig] PATH of fontconfig configration file in static build on Windows
> >
> >T hank you for a reply.
> >
> > From windows prompt
> >
> > C:\Programs\gplibs32_gcc492_static\bin>set FC_DEBUG=1024
> >
> > C:\Programs\gplibs32_gcc492_static\bin>fc-list
> > FC_DEBUG=1024
> >
> > Thus I execute the below from the Msys2 prompt
> >
> > $ FC_DEBUG=1024 fc-list
> >
> > FC_DEBUG=1024
> > Loading config file
> > C:\ProgramData\MiKTeX\2.9\fontconfig\config\fonts.conf
> > Loading config file
> > C:\ProgramData\MiKTeX\2.9/fontconfig/config/localfonts.conf
> > Loading config file
> > C:\ProgramData\MiKTeX\2.9\fontconfig\config\localfonts2.conf
> > FC_DEBUG=1024
> > <sniping file list>
> >
> >
> > For dynamic linked version
> >
> > $ FC_DEBUG=1024 fc-list
> > FC_DEBUG=1024
> > Loading config file
> > C:\ProgramData\MiKTeX\2.9\fontconfig\config\fonts.conf
> > Loading config file
> > C:\ProgramData\MiKTeX\2.9/fontconfig/config/localfonts.conf
> > Loading config file
> > C:\ProgramData\MiKTeX\2.9\fontconfig\config\localfonts2.conf
> > FC_DEBUG=1024
> >
> > Dynamic version also sees config file of MiKTeX.
> > This is not what I expected.
> >
> > Any suggestions?
> >
> > Tatsuro
> >
> >
> >
> >> T hat looks like the installation issue. try FC_DEBUG=1024 fc-list and
> >
> >> see where fc-list is going to read those files from.
> >>
> >> On Sat, Feb 13, 2016 at 2:53 PM, Tatsuro MATSUOKA
> > <tmacchant at yahoo.co.jp>
> >> wrote:
> >>> I have tried static build fontconfig.
> >>>
> >>> Fontconfig version : 2.11.1
> >>> OS: Windows 7 64 bit
> >>> Build system : MinGW-w64 32 bit build tool.
> >>> Link: All dependencies statically are built.
> >>>
> >>> Problem
> >>> Execute fc-list at <install-dir>/bin error occurred with a
> > message
> >>>
> >>> Fontconfig error: Cannot load default config file
> >>>
> >>>
> >>>
> >>> Additional comments.
> >>> If FONTCONFIG_PATH is set, fc-list works.
> >>>
> >>> If fontconfig is dynamically linked, fc-list seems to refer
> >>> <install-dir>/etc/fonts/fonts.conf
> >>>
> >>> and works without FONTCONFIG_PATH setting.
> >>>
> >>> Query:
> >>> Is there way to refer <install-dir>/etc/fonts/fonts.conf in
> > static
> >> linked
> >>> fontconfig application?
> >>>
> >>> Thanks in advance.
> >>>
> >>> Tatsuro
> >>>
> >>> _______________________________________________
> >>> Fontconfig mailing list
> >>> Fontconfig at lists.freedesktop.org
> >>> https://lists.freedesktop.org/mailman/listinfo/fontconfig
> >>
> >>
> >>
> >> --
> >> Akira TAGOH
> >>
> > _______________________________________________
> > Fontconfig mailing list
> > Fontconfig at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/fontconfig
> >
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/fontconfig
--
Worringer Str 31 Duesseldorf 40211 DE home: rs at mytum.de
+49-179-2981632 icq 16845346 work: rs at interface-ag.de
More information about the Fontconfig
mailing list