From 0f0ada825ae6b6e83f5ebde3771e7437df4b5c69 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 1 May 2012 14:31:15 +0200 Subject: [PATCH] =?UTF-8?q?Show=20how=20to=20rewrite=20a=CC=85=20as=20?= =?UTF-8?q?=C2=ACa=20before=20calling=20dot,=20if=20needed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because some old version of libpango will render a̅ as a‾, without combining. * wrap/python/ajax/spot.in: Add the code as a comment. --- wrap/python/ajax/spot.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wrap/python/ajax/spot.in b/wrap/python/ajax/spot.in index 791f59c22..03084a16b 100755 --- a/wrap/python/ajax/spot.in +++ b/wrap/python/ajax/spot.in @@ -266,6 +266,12 @@ def render_dot_maybe(dotsrc, dont_run_dot): # option that has no influence). if sys.getdefaultencoding() != 'ascii': dotsrc = dotsrc.encode('utf-8') + # If the text rendering engine (usually Pango) used by dot does + # not draw overlines correctly, uncomment the following two + # lines. Pango 1.28.4 seems not to support combining overline + # while 1.30 does. + #import re + #dotsrc = re.sub(r'(.)(̅|̄)', r'¬\1', dotsrc); autprefix = (imgdir + '/' + hashlib.sha1(dotsrc).hexdigest()) dotname = autprefix + '.txt' if not os.access(dotname, os.F_OK):