This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with truetype fonts caused by not building FreeType module?


Lev S Bishop wrote:

Harold wrote:

Lev S Bishop wrote:

- the resulting module gets statically linked into libXfont.a (rather
than being a loadable module, as it would be in many other X servers,
since we don't do loadable modules on cygwin/x), and from there gets
linked into XWin.exe and xfs.exe (I understand xfs.exe is currently
non-functional, though), and perhaps some other places?

Regarding the static linking, that is not correct. I had noticed recently that XWin.exe was no longer linked to cygfreetype-6.dll (do a 'cygcheck XWin.exe' to find out what DLLs are being linked to) and was wondering what happened.


No, I am sure that I am correct about the static linking, but I was not
very clear what I was saying. There are *two* things called "freetype" under discussion. There is the freetype library (the thing that is
available from www.freetype.org, is independent of X, and is contained in
cygfreetype-6.dll from the package libfreetype26-2.1.5-1) and there is the
freetype module (aka "FreeType" backend, formerly known as xfsft, this is
the thing that's part of the x server). From now on I'll call the former
freetype "the freetype2 library" and the latter "the freetype backend".

Uhh... you could have just called it the freetype backend in the font library. Yes, the font library is always statically linked into the server due to a limitation in the way it was implemented. I don't disagree that there is a freetype portion of the font library and that it was not being built.


The freetype backend deals with making truetype fonts look and feel to the
rest of the x server like all other x core fonts, XLFDs, fonts.dir,
fonts.alias, etc) but to do the actual rendering it calls upon the
freetype2 library. You can think of it as a "wrapper" for the freetype2
library. There is a version of the freetype2 library in the xc source
tree, but we don't want to use it because we prefer to use a seperately
installed (more up to date) version, so we set HasFreeType2 YES (typo in
my earlier email, missed off the 2 on HasFreeType2). The freetype2 library
can be dynamically linked (its cygfreetype6.dll).

Yup.


Now, here's what I was really getting at: the server architecture is such
that certain parts of the X server are loadable modules -- whether or not
they get loaded into the server is configured *at runtime* by looking in
the "Module" section of the config file (xorg.conf), for lines like 'Load
"type1"' to load the type 1 font rasterizer, etc (this is as opposed to
"load time" dynamic linking, which is what cygcheck tells you about). See: http://freedesktop.org/~xorg/X11R6.7.0/doc/xorg.conf.5.html#sect5
However, cygwin/x doesn't support loadable modules like that (we don't set
DoLoadableServer YES, and we don't have a config file to read even if we
did) so the freetype backend gets built statically into libXfont.a, and
libXfont.a is linked into XWin.exe.

Right, I don't dispute that, but your earlier message was really confusing the names of things and we were not talking about the same thing.


Whether or not we use the freetype backend is controlled by the build
switch: BuildFreeType (note capitalization). The freetype2 library is
controlled by the switch HasFreetype2. We already have HasFreetype2 YES,
but we need to add BuildFreeType YES. The switches control the building of
completely orthogonal branches of the source tree.

Right, that is what I said. I said that no longer including xorg.cf some time ago caused the BuildFreeType flag to start defaulting to NO instead of its previous YES. And I also credited you with discovering that the flag doesn't control building the library but instead controls whether the other clients and libraries in the tree use freetype and whether or not any code dependent upon freetype is built. What more do you want? You must not have read the end of my last message very clearly.


Harold: you mentioned something about BuildFontconfig. There is no such switch.

I don't care, you know what I meant. I don't have time to read ten files for each sentence I write in these really long and trying emails. That is why I would prefer that we just converse in IRC about this... it is a lot easier on me.


Harold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]