anatoly techtonik avatar anatoly techtonik committed 82ce670

Output more font info in DEBUG mode.

Comments (0)

Files changed (1)

   _font_names.add(lf.lfFaceName)
 
   if DEBUG:
-    # print information about fixed pitch and modern font properties
-    pitch  = lf.lfPitchAndFamily & 0b11
+    info = ''
+ 
+    pitch = lf.lfPitchAndFamily & 0b11
+    if pitch == FIXED_PITCH:
+      info += 'FP '
+    elif pitch == VARIABLE_PITCH: 
+      info += 'VP '
+    else:
+      info += '   '
+
     family = lf.lfPitchAndFamily >> 4
-    if pitch == FIXED_PITCH:
-      if family == FF_MODERN:
-        print(b'           ' + lf.lfFaceName)
-      else:
-        print(b'[FPNM] (%s) %s' % (family, lf.lfFaceName))
+    if family == FF_MODERN:
+      info += 'M  '
     else:
-      if lf.lfPitchAndFamily >> 4 == FF_MODERN:
-        print(b'[VP M] [%s] %s' % (pitch, lf.lfFaceName))
+      info += 'NM '
 
+    style = [' ']*3
+    if lf.lfItalic:
+      style[0] = 'I'
+    if lf.lfUnderline:
+      style[1] = 'U'
+    if lf.lfStrikeOut:
+      style[2] = 'S'
+    info += ''.join(style)
+
+    info += ' %s' % lf.lfWeight
+
+    #if pitch == FIXED_PITCH:
+    if 1:
+      print('%s CHARSET: %3s  %s' % (info, lf.lfCharSet, lf.lfFaceName))
 
   return 1   # non-0 to continue enumeration
 enum_font_names = FONTENUMPROC(_enum_font_names)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.