Giter Club home page Giter Club logo

infinality-remix's Introduction

Infinality Remix

⚠️ Deprecation Warning: On new versions of FreeType, the Infinality patches cause various rendering glitches and/or segfaults (see issue #15). Only the fontconfig-infinality-remix package will be updated going forward for a limited time. Please consider alternatives to Infinality as using older versions of freetype can be a security hazard.

If anyone with FreeType experience would like to maintain freetype-infinality-remix please get in-touch!

Background

The Infinality set of patches for the FreeType font rendering infrastructure has provided improved font rendering on Linux based desktops for over a decade. However, over time, porting the patches to the latest libraries has become more and more difficult as the two codebases diverge. Often times entire versions of FreeType are left unpatched, sometimes resulting in broken desktops and a poor user experience.

Until 4K monitors are the norm, good font smoothing should remain an important priority for the Linux desktop.

Project Goals

The Infinality Remix repository has been created to address this problem. This repository is based off the infinality-ultimate-bundle and has the following goals:

  1. Porting, updating, and refactoring the Infinality patch set to remain compatible with upstream FreeType and Fontconfig.

  2. Cleaning up and modularizing the Fontconfig configuration files.

  3. Investigating and finding solutions to font rendering issues to improve the visual quality and consistency of text on Linux.

What's Provided

The following packages are provided:

Package Description Status
freetype2-infinality-remix FreeType with the Infinality patch set. Done
fontconfig-infinality-remix Fontconfig with the Infinality patch set and base configuration. Done
cairo-infinality-remix Cairo with the Infinality patch set applied. Done
infinality-remix-config-base-fonts Infinality Remix Fontconfig tweaks for popular fonts found in the official repositories and AUR. TBD
infinality-remix-config-web-fonts Infinality Remix Fontconfig tweaks for popular Web fonts. TBD

Installation

  1. Remove all previous Infinality FreeType, Fontconfig, and Cairo packages and replace with the stock libraries.

  2. Remove any broken Infinality symlinks in /etc/fonts/conf.d/.

  3. Install the FreeType, Fontconfig, and Cairo packages, in that order:

    • From the AUR:

        yay -S freetype2-infinality-remix fontconfig-infinality-remix cairo-infinality-remix
      
    • From GitHub:

      git clone https://github.com/pdeljanov/infinality-remix.git
      
      cd infinality-remix/freetype2-infinality-remix
      makepkg -sci
      
      cd ../fontconfig-infinality-remix
      makepkg -sci
      
      cd ../cairo-infinality-remix
      makepkg -sci
      
  4. Ensure your desktop environment's font rendering settings are correct:

    • Anti-aliased font rendering is enabled.
    • RGB sub-pixel rendering is enabled.
    • Slight hinting is highly-recommended.
    • Set your DPI correctly. Use a DPI Calculator to calculate a proper DPI for your system. For single monitor systems, you can let the DPI be auto-detected, but for multi-monitor systems you should set the DPI to that of your primary (or most used) monitor.
  5. Logout and back in of your desktop session for changes to take effect immediately.

  6. Verify through Xft that non-DE aware applications will use the recommended rendering settings. Run xrdb -query | grep Xft, and your output should be similar to:

    Xft.antialias:  1
    Xft.autohint:   0
    Xft.dpi:        96
    Xft.hinting:    1
    Xft.hintstyle:  hintslight
    Xft.lcdfilter:  lcddefault
    Xft.rgba:       rgb
    

To change these settings, edit /etc/X11/xinit/xinitrc.d/xft-settings.sh for global changes. These settings will be overwritten by your local ~/.Xresources file, so you must remove it, or make sure the settings are the same. This setting only affects X11 applications.

Recommended Fonts

The following fonts are recommended and should be installed for a good experience:

  • Caladea (ttf-caladea)
  • Carlito (ttf-carlito)
  • DejaVu (ttf-dejavu)
  • Impallari Cantora (aur/ttf-impallari-cantora)
  • Liberation (ttf-liberation)
  • Noto (noto-fonts)
  • Open Sans (ttf-opensans)
  • Overpass (otf-overpass)
  • Roboto (ttf-roboto)
  • TeX Gyre (tex-gyre-fonts)
  • Ubuntu (ttf-ubuntu-font-family)
  • Courier Prime (aur/ttf-courier-prime)
  • Gelasio (aur/ttf-gelasio-ib)
  • Merriweather (aur/ttf-merriweather)
  • Source Sans Pro (aur/ttf-source-sans-pro-ibx)
  • Signika (aur/ttf-signika)

Optional

The following fonts look excellent, but are not under permissive licenses.

  • Consolas
  • San Francisco Pro Display/Text

Customization

For more precise font rendering tweaks, edit /etc/X11/xinit/xinitrc.d/infinality-settings.sh.

  • The INFINALITY_FT variable may be used to set a preset style. Options are listed within infinality-settings.sh. The ultimate3 setting is recommended, but ultimate5 gives a "macOS" look and pairs well with Apple's San Francisco system font.

  • The INFINALITY_FT_* variables may be used to create your own style or tweak the selected preset style.

Changes made here will only apply to new desktop sessions.

Note: It is recommended you test your customizations with a QT or GTK application. See caveats below for more information.

Notable Differences from Infinality Ultimate

  • Stem Darkening for TrueType fonts is enabled by default. Only QT-based applications enabled this option resulting in inconsistency with non-QT applications. It is now enabled by default for the ultimate[1-5] styles, for more consistent rendering across applications.
  • Autohint is force enabled by default in most circumstances.
  • Improved font substitutions using the remix set of FontConfig configuration files. The existing free, ms, and combi sets remain, but remix is the default.

Just Want Infinality?

If you're an Infinality package maintainer and you just want the latest Infinality patch without this remix rubbish, simply apply the 0002-infinality-<VERSION>-<DATE>.patch patch file.

Caveats

  1. Chrome, and Chrome-based browsers ship with their own version of FreeType for web content. Only the browser shell (tab bar, address bar, menu, etc.) is rendered with the system's FreeType library. Therefore, only text in the browser shell will look different when using Infinality Remix.
  2. There are a lot of potential configuration files that affect font selection and rendering. Ideally you should make your settings as global as possible and remove any redundant user-local configuration files, or at the very least make sure they all agree on the same values, and with your DE. The following list are font configuration files going from user-local to global in scope:
    • ~/.config/fontconfig/fonts.conf
    • ~/.config/fontconfig/conf.d/
    • ~/.xsettingsd
    • ~/.Xresources
    • /etc/fonts/conf.d/local.conf
    • /etc/fonts/conf.d/
    • /etc/X11/xinit/xinitrc.d/xft-settings.sh
    • /etc/X11/xinit/xinitrc.d/infinality-settings.sh

Contributing

Contributions are welcome on GitHub.

Acknowledgements

This repository is based off of the work of the original Infinality author and Boohoomil who maintained the infinality-ultimate bundle.

infinality-remix's People

Contributors

htower avatar k-orne avatar lachlanwimsett avatar pdeljanov avatar tam1m avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

infinality-remix's Issues

Breaks Emoji

No emoji fonts will display after installing. I have Noto Color Emoji installed, and use this fontconfig to display it, but switching to infinality-remix has caused all emoji to display as blank. fc-match for any emoji returns Roboto instead.

Use Times New Roman font

I have the Times New Roman font on my system, but due to infinality-remix it always loads the Liberation Serif font instead. Is this the expected behavior? I must prefer the Times New Roman font.

Obsolete yet?

Given that fontconfig itself has changed significantly since the infinality patches started being a thing and that other parts of the stack have changed (e.g. the dropping of full hinting support in Pango), how relevant is it to keep maintaining this? What is actually useful now?

I ask as someone who maintains a bunch of AUR font packages with infinality configs included. Feedback on whether to continue that effort or remove them from the AUR would be appreciated: alerque/aur#8

Chrome/Chromium does not use system FreeType

Chrome and Chromium-based browsers or applications do not use the system FreeType library. Therefore these applications don't get the Infinality improvements. There isn't much that can be done unfortunately other than compiling Chromium using the system FreeType library. This can be accomplished by setting the build flag: use_system_freetype=true.

I will consider adding a Chromium PKGBUILD in here to support this, but compiling Chromium is generally not feasible unless you have an extremely strong computer.

FreeType 2.10.4

A buildable 2.10.4 patch is present in the freetype-2.10.4 branch of this repository. However, it fails to render glyphs at runtime resulting in segfaults for QT apps and broken rendering in GTK apps.

Looking for someone with FreeType experience who can help debug this issue and maybe even track down the root cause in the patched source.

Cant build with makepkg


/home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/src/ftdump.c:20:10: error: #include expects "FILENAME" or 
   20 | #include FT_INTERNAL_DEBUG_H
      |          ^~~~~~~~~~~~~~~~~~~
/home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/src/ftdump.c:24:10: error: #include expects "FILENAME" or 
   24 | #include FT_INTERNAL_OBJECTS_H
      |          ^~~~~~~~~~~~~~~~~~~~~
/home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/src/ftdump.c:25:10: error: #include expects "FILENAME" or 
   25 | #include FT_INTERNAL_DRIVER_H
      |          ^~~~~~~~~~~~~~~~~~~~
/home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/src/ftdump.c: In function ‘Print_Type’:
/home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/src/ftdump.c:162:27: error: invalid use of undefined type ‘struct FT_DriverRec_’
  162 |     module = &face->driver->root;
      |                           ^~
/home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/src/ftdump.c:163:47: error: invalid use of undefined type ‘struct FT_ModuleRec_’
  163 |     printf( "   FreeType driver: %s\n", module->clazz->module_name );
      |                                               ^~
make: *** [Makefile:405: /home/brad/Downloads/freetype2-infinality-remix/src/freetype2-demos/objs/ftdump.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

Lib32

Will lib32 support?

Fontconfig build fails while generating fontconfig-user.pdf

Package fontconfig-infinality-remix fails to build after receiving an error code from pdfTex. Same occurs running makepkg -sci on github repo. (I can't install the package just because the docs are mangled. 🤣 )

# ...

LaTeX Font Warning: Size substitutions with differences
(Font)              up to 0.44003pt have occurred.

 )
(see the transcript file for additional information){/usr/share/texmf-dist/font
s/enc/dvips/base/8r.enc}</usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/c
mmi10.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb></usr
/share/texmf-dist/fonts/type1/urw/courier/ucrb8a.pfb></usr/share/texmf-dist/fon
ts/type1/urw/courier/ucrr8a.pfb></usr/share/texmf-dist/fonts/type1/urw/helvetic
/uhvb8a.pfb></usr/share/texmf-dist/fonts/type1/urw/times/utmr8a.pfb></usr/share
/texmf-dist/fonts/type1/urw/times/utmri8a.pfb>
Output written on fontconfig-user.pdf (18 pages, 121969 bytes).
Transcript written on fontconfig-user.log.
make[3]: *** [Makefile:1351: fontconfig-user.pdf] Error 9
make[3]: *** Waiting for unfinished jobs....
Done.
Done.
Done.
make[3]: Leaving directory '/home/sky/.cache/yay/fontconfig-infinality-remix/src/fontconfig/doc'
make[2]: *** [Makefile:758: all] Error 2

# ...

The referenced log file shows

# ...

[12.0.36]
Overfull \hbox (42.55472pt too wide) in paragraph at lines 4129--4129
 [] $\OML/cmm/m/it/9 <$\T1/pcr/m/n/9 test qual="all" name="family" compare="not
_eq"$\OML/cmm/m/it/9 >$$<$\T1/pcr/m/n/9 string$\OML/cmm/m/it/9 >$\T1/pcr/m/n/9 
sans-serif$\OML/cmm/m/it/9 <$\T1/pcr/m/n/9 /string$\OML/cmm/m/it/9 >$$<$\T1/pcr
/m/n/9 /test$\OML/cmm/m/it/9 >$[] 
 []

# ... 
# and several more like that one 
# ...

[15.0.36] [16.0.36]
! Undefined control sequence.
<recently read> \Hy@colorlink 
                              
l.4680 {DEBUG}}
               Debugging Applications\endLink{}\endNode{} section for more d...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

# ... 
# and several more like that one 

[17.0.36] [18.0.36]
(/home/sky/.cache/yay/fontconfig-infinality-remix/src/fontconfig/doc/fontconfig
-user.aux)

LaTeX Font Warning: Size substitutions with differences
(Font)              up to 0.44003pt have occurred.

# ... misc stats, before presumably exiting with an error code

Ugly fonts, missing characters in game

Hey!
after installing a infinality-remix I get weird results:

image
image
Default Tilix font - Monospace

The CSGO is also missing characters:
image

I use all-repository-fonts + ttf-google-fonts-git.
Gnome and 1x4k-display and 2x1080p displays.

After installing ttf-google-fonts-git, I get:

(2/4) Updating font cache (Infinality Remix)
error: unable to write to pipe (Broken pipe)

Regards,
TheAifam5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.