summaryrefslogtreecommitdiffstats
path: root/testing/freetype-infinality/infinality-settings
blob: f6fca1aac5dc33ceafbf6a090d4b4745cb030feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
##################################################################
# INFINALITY ENVIRONMENT VARIABLES FOR EXTRA RUN-TIME OPTIONS
##################################################################
#
# These environment variables require that their respective patches
# from http://www.infinality.net have been applied to the Freetype
# installation you are using.  They will do abolutely
# nothing otherwise!
#

# This file should be copied to /etc/profile.d/ for system-wide
# effects and/or included in ~/.bashrc or ~/.bash_profile for per-user
# effects:
# 
#   . ~/path/to/this/file/infinality-settings
#
# Of course, the per-user settings will override the system-wide
# settings.  Default values indicated below will be used when the
# environment variables below are not defined.



##################################################################
# INFINALITY_FT_FILTER_PARAMS
#
# This is a modified version of the patch here:
# http://levelsofdetail.kendeeter.com/2008/12/dynamic_fir_filter_patch.html
#
# Allows you to adjust the FIR filter at runtime instead of at
# compile time.  The idea is to have values add up to one, and be
# symmetrical around the middle value.  Here are some samples
# of various filter parameters:
#
# Strong Extra Smooth  "15e-2 20e-2 30e-2 20e-2 15e-2"  (extra smooth, natural weight)
# Extra Smooth      "20e-2 20e-2 30e-2 20e-2 20e-2"  (extra smooth, extra weight)
# Smooth            "15e-2 20e-2 32e-2 20e-2 15e-2"  (smooth, natural weight)
# Stronger Gibson   "11e-2 22e-2 38e-2 22e-2 11e-2"  (smooth, extra weight)
# Gibson            "11e-2 22e-2 33e-2 22e-2 11e-2"  (smooth, natural weight)
# Freetype Light    "00e-2 33e-2 34e-2 33e-2 00e-2"  (sharp, natural weight)
# Freetype Default  "06e-2 25e-2 44e-2 25e-2 06e-2"  (sharp, extra weight)           *default
# Extra Sharp       "00e-2 35e-2 35e-2 35e-2 00e-2"  (extra sharp, extra weight)
#
# Default:     [Freetype's default]
# Recommended: "11e-2 22e-2 38e-2 22e-2 11e-2"
#
# Example 1:  export INFINALITY_FT_FILTER_PARAMS="11e-2 22e-2 38e-2 22e-2 11e-2"
#

export INFINALITY_FT_FILTER_PARAMS="11e-2 22e-2 38e-2 22e-2 11e-2"




##################################################################
# INFINALITY_FT_STEM_ALIGNMENT_TYPE
#
# This performs analysis on each glyph and determines the best
# subpixel orientation for the glyph.  The glyph is not scaled in
# any way, just moved left or right by a subpixel amount.  This
# results in subtley cleaner looking fonts, at the expense of
# proper distances between glyphs.  This is only active for sizes
# 10 px or greater and does not apply to bold or italic fonts.
# 
# Possible values:
# full             - Allows a glyph to be moved to the LEFT or RIGHT by 1 subpixel
#                    Best alignment, Worst positioning
# medium,medium1   - Only allows a glyph to be moved to the LEFT by 1 subpixel
#                    Good alignment, Good positioning
# medium2          - Only allows a glyph to be moved to the RIGHT by 1 subpixel
#                    Good alignment, Good positioning
# slight,slight1   - A stricter version of medium
#                    Minor alignment, Best positioning
# slight2          - A stricter version of medium2
#                    Minor alignment, Best positioning
# infinality       - medium1 when stem < 5 subpixels, full when >= 5 subpixels
# none             - Don't do any alignment
#
# Default:     none
# Recommended: medium

export INFINALITY_FT_STEM_ALIGNMENT_TYPE=medium




##################################################################
# INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT
#
# Cause the height of horizontal stems to snap to integer pixels
# when using light auto-hinting.  (This happens automatically
# when using full auto-hinting)
#
# This produces an effect similar to the way Windows renders fonts
# without requiring the font to contain bytecode instructions.
#
# Possible values:
# true             - enable stem snapping
# false            - do not enable stem snapping
#
# Default:     false
# Recommended: true

export INFINALITY_FT_AUTOFIT_STEM_SNAP_LIGHT=true




##################################################################
# INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT
#
# Embolden particularly light or thin fonts, like DejaVu Sans Light,
# Inconsolata, Freemono, Courier New, etc. up until stem width is
# 1 pixel wide.  This makes these fonts easier to read at lower
# ppems.  Only applies when the autohinter is being used.
#
# Possible values:
# true             - enable emboldening of light fonts
# false            - do not enable emboldening of light fonts
#
# Default:     false
# Recommended: true

export INFINALITY_FT_AUTOFIT_EMBOLDEN_LIGHT=true




##################################################################
# INFINALITY_FT_PSEUDO_GAMMA
#
# This does a weighted gamma correction at the LCD filter phase
# prior to the LCD filter.
#
# The first value indicates a px value, the second indicates a
# "gamma" value.  All sizes < the px value will be corrected
# on a weighted scale based on the second value.
#
# Values .1 < 1.0 will darken the glyph
# Values > 1.0 will lighten the glyph
#
# Example 1:  Darken glyphs that are less than 10 px. With some fonts
#             even 5 or 6px is readable!
# export INFINALITY_FT_PSEUDO_GAMMA="10 6e-1"
#
# Example 2:  Lighten all glyphs (below 100px)
# export INFINALITY_FT_PSEUDO_GAMMA="100 15e-1"
#
# Default:     [No gamma correction]
# Recommended: "9 5e-1"

export INFINALITY_FT_PSEUDO_GAMMA="9 7e-1"




##################################################################
# INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS
#
# This will slightly stretch some glyphs vertically between 9px
# and 14px (inclusive).  Some people may find this more
# aesthetically pleasing.  This only applies to fonts that are
# using autohint.  
#
# Possible values:
# true             - enable height adjustment
# false            - do not enable height adjustment
#
# Default:     false

export INFINALITY_FT_AUTOFIT_ADJUST_HEIGHTS=true




##################################################################
# INFINALITY_FT_ENHANCED_EMBOLDEN
#
# When doing artificial emboldening, only embolden in the X
# direction, skipping the Y direction. Most people will find this
# more aesthetically pleasing than the default behavior.
#
# Possible values:
# true             - enable enhanced emboldening
# false            - no not enable enhanced emboldening
#
# Default:     false
# Recommended: true

export INFINALITY_FT_ENHANCED_EMBOLDEN=true




##################################################################
# INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH
#
# When doing artificial emboldening, don't change the glyph width.
#
# Possible values:
# true             - maintain width
# false            - do not maintain width
#
# Default:     false
# Recommended: true

export INFINALITY_FT_EMBOLDEN_MAINTAIN_WIDTH=true




##################################################################
# INFINALITY_FT_AUTO_AUTOHINT
#
# Automatically use autohint when rendering a font that contains
# no truetype instructions, regardless of what the calling
# program asks for.  The truetype hinter will not do a good job
# on these.
#
# Possible values:
# true             - automatically use autohint
# false            - do not automatically use autohint
#
# Default:     false
# Recommended: true

export INFINALITY_FT_AUTO_AUTOHINT=true