Commits

Takeshi Komiya  committed e569e91

seqdiag: Fix failure in loading fonts

  • Participants
  • Parent commits f60d4a3

Comments (0)

Files changed (5)

File actdiag/sphinxcontrib/actdiag.py

 from actdiag_sphinxhelper import actdiag, ActdiagDirective
 namedtuple = collections.namedtuple
 
+import blockdiag_sphinxhelper
+detectfont = blockdiag_sphinxhelper.command.detectfont
+
 
 class ActdiagError(SphinxError):
     category = 'Actdiag error'
 
         if fontpath:
             config = namedtuple('Config', 'font')(fontpath)
-            _fontpath = command.detectfont(config)
+            _fontpath = detectfont(config)
             fontmap.set_default_font(_fontpath)
     except:
         attrname = '_actdiag_fontpath_warned'

File nwdiag/sphinxcontrib/nwdiag.py

 from nwdiag_sphinxhelper import nwdiag, NwdiagDirective
 namedtuple = collections.namedtuple
 
+import blockdiag_sphinxhelper
+detectfont = blockdiag_sphinxhelper.command.detectfont
+
 
 class NwdiagError(SphinxError):
     category = 'Nwdiag error'
 
         if fontpath:
             config = namedtuple('Config', 'font')(fontpath)
-            _fontpath = command.detectfont(config)
+            _fontpath = detectfont(config)
             fontmap.set_default_font(_fontpath)
     except:
         attrname = '_nwdiag_fontpath_warned'

File nwdiag/sphinxcontrib/packetdiag.py

 from packetdiag_sphinxhelper import packetdiag, PacketdiagDirective
 namedtuple = collections.namedtuple
 
+import blockdiag_sphinxhelper
+detectfont = blockdiag_sphinxhelper.command.detectfont
+
 
 class PacketdiagError(SphinxError):
     category = 'Packetdiag error'
 
         if fontpath:
             config = namedtuple('Config', 'font')(fontpath)
-            _fontpath = command.detectfont(config)
+            _fontpath = detectfont(config)
             fontmap.set_default_font(_fontpath)
     except:
         attrname = '_packetdiag_fontpath_warned'

File nwdiag/sphinxcontrib/rackdiag.py

 from rackdiag_sphinxhelper import rackdiag, RackdiagDirective
 namedtuple = collections.namedtuple
 
+import blockdiag_sphinxhelper
+detectfont = blockdiag_sphinxhelper.command.detectfont
+
 
 class RackdiagError(SphinxError):
     category = 'Rackdiag error'
 
         if fontpath:
             config = namedtuple('Config', 'font')(fontpath)
-            _fontpath = command.detectfont(config)
+            _fontpath = detectfont(config)
             fontmap.set_default_font(_fontpath)
     except:
         attrname = '_rackdiag_fontpath_warned'

File seqdiag/sphinxcontrib/seqdiag.py

 from seqdiag_sphinxhelper import seqdiag, SeqdiagDirective
 namedtuple = collections.namedtuple
 
+import blockdiag_sphinxhelper
+detectfont = blockdiag_sphinxhelper.command.detectfont
+
 
 class SeqdiagError(SphinxError):
     category = 'Seqdiag error'
 
         if fontpath:
             config = namedtuple('Config', 'font')(fontpath)
-            _fontpath = command.detectfont(config)
+            _fontpath = detectfont(config)
             fontmap.set_default_font(_fontpath)
     except:
         attrname = '_seqdiag_fontpath_warned'