Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

hglib: add utility function to get font config

Changeset 98eadb00ebff

Parent 4f54bec08a4b

by Yuki KODAMA

Changes to one file · Browse files at 98eadb00ebff Showing diff from parent 4f54bec08a4b Diff from another changeset...

 
127
128
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
131
132
 
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
@@ -127,6 +127,20 @@
  return line   return line[0] + line[1:].expandtabs(_tabwidth)   +_fontconfig = None +def getfontconfig(ui): + global _fontconfig + if _fontconfig is None: + # defaults + _fontconfig = {'fontcomment': 'monospace 10', + 'fontdiff': 'monospace 10', + 'fontlist': 'sans 9'} + # overwrite defaults with configured values + for name, val in ui.configitems('gtools'): + if val and name.startswith('font'): + _fontconfig[name] = val + return _fontconfig +  def uiwrite(u, args):   '''   write args if there are buffers