1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-18 20:10:23 +01:00

1719983: caratteri nazionali non supportati

rimossa l'eccezione se un carattere non rientra fra 32 e 127.
quello che succede è dipendente dall'encoding del file da cui vengono lette le stringhe.

nel test case le óńł occupano due caratteri, che vengono saltati e resta
quanto era stato scritto prima.  forse si potrebbe prevedere una separazione
"lettera"/"accento", però devo trovare il modo di definire l'accento in modo
che sia sovrapponibile alla lettera, mentre quelli che ho ora le
cancellerebbero.

alla fine dell'alfabeto potrei aggiungere gli accenti su trasparenza...
acuto (é) grave (è) tilde (ẽ) circonflesso (ê) breve (ĕ) lungo (ēħ) v (č)
punto (ż) dieresi (ë) coda-destra (ę) coda-sinistra (ç) obliquo (ł) o (å)

resterebbe il problema di caratteri quali ß æ œ ...
This commit is contained in:
mfrasca
2007-05-16 12:53:33 +00:00
parent 0baec49411
commit 39867d1e68

View File

@@ -92,7 +92,9 @@ def addChar(ch, x, y, xOffset, yOffset, width, height):
"""
if not (32 <= ord(ch) <= 127):
raise ValueError, "Unsupported Char: '%s'(%d)" % (ch, ord(ch))
pass
#raise ValueError, "Unsupported Char: '%s'(%d)" % (ch, ord(ch))
# linelength is the amount of bits the character set uses on each row.
linelength = charset_width - (charset_width % char_width)
# pos is the horizontal index of the box containing ch.
@@ -380,8 +382,11 @@ def copyXPMArea(sourceX, sourceY, width, height, targetX, targetY):
pywmgeneral.copyXPMArea(sourceX, sourceY, width, height,
targetX, targetY)
def addMouseRegion(index, left, top, right, bottom):
def addMouseRegion(index, left, top, right=None, bottom=None, width=None, height=None):
"""Add a mouse region in the window."""
if right is bottom is None:
right = left + width
bottom = top + height
pywmgeneral.addMouseRegion(index, left, top, right, bottom)
def checkMouseRegion(x, y):