gram.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:gram 作者: pgfoster 项目源码 文件源码
def _setTextFamily(self, newVal):
        gm = ['GramTikzStyle._setTextFamily()']
        assert isinstance(newVal, basestring)
        lowVal = string.lower(newVal)
        goodVals = self.goodTextFamilies
        if lowVal not in goodVals:
            gm.append("You can only set property 'textFamily' to one of")
            gm.append("%s" % goodVals)
            gm.append("Got attempt to set to '%s'" % newVal)
            raise GramError(gm)
        if self.font == 'helvetica':
            # if lowVal != 'sffamily':
            #     print gm[0]
            #     print "  Ignoring request to set textFamily to '%s' -- it does not work with helvetica" % newVal
            #     print "does this work?"  # does not work with ttfamily
            self._textFamily = lowVal
        else:
            self._textFamily = lowVal
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号