Skip to main content
clarify
Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

Looking at the symbols from fontconfig used by Xft:

FcCharSetCopy
FcCharSetCount
FcCharSetDestroy
FcCharSetHasChar
FcConfigGetBlanks
FcConfigSubstitute
FcDefaultSubstitute
FcFontList
FcFontMatch
FcFreeTypeCharIndex
FcFreeTypeCharSet
FcInit
...
FcPatternPrint  
FcPatternVaBuild  
FcStrCmpIgnoreCase
FcUtf16ToUcs4
FcUtf8ToUcs4

and those from freetype:

FT_Done_Face
FT_GlyphSlot_Embolden
FT_Init_FreeType
FT_Library_SetLcdFilter
FT_Load_Glyph
FT_New_Face
FT_Render_Glyph
FT_Set_Char_Size
FT_Set_Transform
FT_Vector_Transform

you can see that Xft uses fontconfig for locating fonts based on patterns, but uses freetype to actually load, display or adjust (scale, etc) a font.

fontconfig uses different calls to freetype to obtain information about a font (the overall size, the number of glyphs, etc):

FT_Done_Face
FT_Done_FreeType
FT_Get_BDF_Property
FT_Get_Char_Index
FT_Get_First_Char
FT_Get_Glyph_Name
FT_Get_Next_Char
FT_Get_PS_Font_Info
FT_Get_Sfnt_Name
FT_Get_Sfnt_Name_Count
FT_Get_Sfnt_Table
FT_Get_X11_Font_Format
FT_Has_PS_Glyph_Names
FT_Init_FreeType
FT_Load_Glyph
FT_Load_Sfnt_Table
FT_New_Face
FT_Select_Charmap
FT_Select_Size

Without freetype, fontconfig hasn't any information: fontconfig organizes information but is not a complete source of information by itself.

Looking at the symbols from fontconfig used by Xft:

FcCharSetCopy
FcCharSetCount
FcCharSetDestroy
FcCharSetHasChar
FcConfigGetBlanks
FcConfigSubstitute
FcDefaultSubstitute
FcFontList
FcFontMatch
FcFreeTypeCharIndex
FcFreeTypeCharSet
FcInit
...
FcPatternPrint  
FcPatternVaBuild  
FcStrCmpIgnoreCase
FcUtf16ToUcs4
FcUtf8ToUcs4

and those from freetype:

FT_Done_Face
FT_GlyphSlot_Embolden
FT_Init_FreeType
FT_Library_SetLcdFilter
FT_Load_Glyph
FT_New_Face
FT_Render_Glyph
FT_Set_Char_Size
FT_Set_Transform
FT_Vector_Transform

you can see that Xft uses fontconfig for locating fonts based on patterns, but uses freetype to actually load, display or adjust (scale, etc) a font.

fontconfig uses different calls to freetype to obtain information about a font (the overall size, the number of glyphs, etc):

FT_Done_Face
FT_Done_FreeType
FT_Get_BDF_Property
FT_Get_Char_Index
FT_Get_First_Char
FT_Get_Glyph_Name
FT_Get_Next_Char
FT_Get_PS_Font_Info
FT_Get_Sfnt_Name
FT_Get_Sfnt_Name_Count
FT_Get_Sfnt_Table
FT_Get_X11_Font_Format
FT_Has_PS_Glyph_Names
FT_Init_FreeType
FT_Load_Glyph
FT_Load_Sfnt_Table
FT_New_Face
FT_Select_Charmap
FT_Select_Size

Without freetype, fontconfig hasn't any information: fontconfig organizes information but is not a complete source of information by itself.

clarify
Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

They're related like this (using ldd):

  • Xft is a library, which depends on (among other things) the fontconfig library and the freetype library.
  • fontconfig is a set of programs, a library and data. Its library depends upon the freetype library.
  • freetype is a library, which does not depend on the other two.

For example:

$ ldd /usr/lib/x86_64-linux-gnu/libXft.so.2.3.1
        linux-vdso.so.1 =>  (0x00007fffb3df7000)
        libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f40ea07a000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f40e9ddb000)
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f40e9bd1000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f40e9896000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f40e9509000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f40e92f2000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f40e90c8000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f40e8ea8000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f40e8ca4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f40ea4c6000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f40e8aa1000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f40e889c000)

Some applications (such as xterm) use Xft, which uses an MIT-license. Others (generally the GPL-licensed ones) use libpango. Besides licensing concerns on pango, it has twice as many library-dependencies as Xft.

They're related like this (using ldd):

  • Xft is a library, which depends on (among other things) the fontconfig library and the freetype library.
  • fontconfig is a set of programs, a library and data. Its library depends upon the freetype library.
  • freetype is a library, which does not depend on the other two.

For example:

$ ldd /usr/lib/x86_64-linux-gnu/libXft.so.2.3.1
        linux-vdso.so.1 =>  (0x00007fffb3df7000)
        libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f40ea07a000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f40e9ddb000)
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f40e9bd1000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f40e9896000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f40e9509000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f40e92f2000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f40e90c8000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f40e8ea8000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f40e8ca4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f40ea4c6000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f40e8aa1000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f40e889c000)

They're related like this (using ldd):

  • Xft is a library, which depends on (among other things) the fontconfig library and the freetype library.
  • fontconfig is a set of programs, a library and data. Its library depends upon the freetype library.
  • freetype is a library, which does not depend on the other two.

For example:

$ ldd /usr/lib/x86_64-linux-gnu/libXft.so.2.3.1
        linux-vdso.so.1 =>  (0x00007fffb3df7000)
        libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f40ea07a000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f40e9ddb000)
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f40e9bd1000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f40e9896000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f40e9509000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f40e92f2000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f40e90c8000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f40e8ea8000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f40e8ca4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f40ea4c6000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f40e8aa1000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f40e889c000)

Some applications (such as xterm) use Xft, which uses an MIT-license. Others (generally the GPL-licensed ones) use libpango. Besides licensing concerns on pango, it has twice as many library-dependencies as Xft.

Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

They're related like this (using ldd):

  • Xft is a library, which depends on (among other things) the fontconfig library and the freetype library.
  • fontconfig is a set of programs, a library and data. Its library depends upon the freetype library.
  • freetype is a library, which does not depend on the other two.

For example:

$ ldd /usr/lib/x86_64-linux-gnu/libXft.so.2.3.1
        linux-vdso.so.1 =>  (0x00007fffb3df7000)
        libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f40ea07a000)
        libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f40e9ddb000)
        libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f40e9bd1000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f40e9896000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f40e9509000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f40e92f2000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f40e90c8000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f40e8ea8000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f40e8ca4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f40ea4c6000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f40e8aa1000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f40e889c000)