bohoomil / fontconfig-ultimate

freetype2-infinality run-time settings => infinality compatible fontconfig => infinality-bundle
454 stars 38 forks source link

Tehuti #101

Open bjornwsv opened 9 years ago

bjornwsv commented 9 years ago

Problems with Tehuti font alignment

The font doesn't seem to align correctly. Se screenshot.

screenshot from 2015-08-07 11-37-07

To reproduce: Install otf-tehuti-ibx

sudo pacman -S otf-tehuti-ibx

Open Writer, Gedit or similar and change the font to Tehuti

Tested in Writer and Gedit. Arch Linux Gnome 3.14

/etc/X11/xinit/xinitrc.d/infinality-settings.sh

#!/bin/bash

###          freetype2-infinality-ultimate settings          ###
###           rev. 0.4.8.3, for freetype2 v.2.5.x            ###
###                                                          ###
###                Copyright (c) 2014 bohoomil               ###
### The MIT License (MIT) http://opensource.org/licenses/MIT ###
###      part of infinality-bundle  http://bohoomil.com      ###

XFT_SETTINGS="
Xft.antialias:  1
Xft.autohint:   0
Xft.dpi:        96
Xft.hinting:    1
Xft.hintstyle:  hintfull
Xft.lcdfilter:  lcddefault
Xft.rgba:       rgb
"

echo "$XFT_SETTINGS" | xrdb -merge > /dev/null 2>&1

### Available styles:
### 1 <> extra sharp
### 2 <> sharper & lighter ultimate
### 3 <> ultimate: well balanced (default)
### 4 <> darker & smoother
### 5 <> darkest & heaviest ("MacIsh")

USE_STYLE="3"

if [ "$USE_STYLE" = "1" ]; then
  export INFINALITY_FT_FILTER_PARAMS="04 22 38 22 04"
elif [ "$USE_STYLE" = "2" ]; then
  export INFINALITY_FT_FILTER_PARAMS="06 22 36 22 06"
elif [ "$USE_STYLE" = "3" ]; then
  export INFINALITY_FT_FILTER_PARAMS="08 24 36 24 08"
elif [ "$USE_STYLE" = "4" ]; then
  export INFINALITY_FT_FILTER_PARAMS="10 25 37 25 10"
elif [ "$USE_STYLE" = "5" ]; then
  export INFINALITY_FT_FILTER_PARAMS="12 28 42 28 12"
fi

export INFINALITY_FT_FRINGE_FILTER_STRENGTH="25"
export INFINALITY_FT_USE_VARIOUS_TWEAKS="true"
export INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH="25"
export INFINALITY_FT_STEM_ALIGNMENT_STRENGTH="15"
export INFINALITY_FT_STEM_FITTING_STRENGTH="15"

# vim:ft=sh:
bohoomil commented 9 years ago

I'm afraid this has nothing to do with Infinality. Tehuti covers huge number of character sets which may require non-standard width/height ratios in order to be used simultaneously. Take a look:

It includes question and exclamation marks with commas, extra punctuation, extended punctuation and brackets, most currency symbols, including the newest additions, Latin superscripts, subscripts, numerators, and denominators, oldstyle numerals, lining and oldstyle tabular numerals, fractions, upper- and lowercase click consonants, redesigned capital Alpha, velarized, palatalized, and retroflex characters, alternate designs for characters which I’ve always felt were imbalanced when in text, such as the glottal stops, Welsh Ll, Thorn, Yr, Esh, Ezh, the Mayan Tresillo and Quatrillo, alternate stroked b, D, and g, a two-story version of the hooked g, Latin versions of the Greek letters, i.e., Chi, Beta, and Omega, as well as Delta and its Lambda-influenced counterparts, being dh/dl and th/tl, Phi, and the two Thetas, Latin versions of the Cyrillic Soft sign and Yeru, alternate versions of the African D and D with hook, i.e., retroflex D and retroflex D with hook, p with right hook, as well as K with left hook, IPA, UPA, Teuthonista, M and N with right-stemmed hooks for Lithuanian, triple diacritic marks, bilabial trill B’s, alternate T with palatal hook, extended Cyrillic, alternate Cyrillic letters for Bulgarian, Macedonian, and Serbian, an alternate rounded Cyrillic capital Ve, alternate Cyrillic breves and extended titlos, and nine-step tone markers for African orthographies.

IMO, it's probably some sort of fontconfig's limitation that prevents the font from being able to align the text properly. If it's possible for you, please check out whether the font renders properly with stock freetype2/fontconfig.