mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 23:36:36 +00:00
MiRCARTCanvasImportStore.py:importTextFile(): open() w/ encoding="utf-8-sig" due to potentially present BOM.
MiRCARTToPngFile.py:export(): disable PIL font anti-aliasing.
This commit is contained in:
parent
e9a90f5000
commit
a002cb96bb
@ -53,7 +53,7 @@ class MiRCARTCanvasImportStore():
|
|||||||
# }}}
|
# }}}
|
||||||
# {{{ importTextFile(self, pathName): XXX
|
# {{{ importTextFile(self, pathName): XXX
|
||||||
def importTextFile(self, pathName):
|
def importTextFile(self, pathName):
|
||||||
self.inFile = open(pathName, "r", encoding="utf-8")
|
self.inFile = open(pathName, "r", encoding="utf-8-sig")
|
||||||
self.inSize = self.outMap = None;
|
self.inSize = self.outMap = None;
|
||||||
inCurColourSpec = ""; inCurRow = -1;
|
inCurColourSpec = ""; inCurRow = -1;
|
||||||
inLine = self.inFile.readline()
|
inLine = self.inFile.readline()
|
||||||
|
@ -68,6 +68,7 @@ class MiRCARTToPngFile:
|
|||||||
outCurPos = [0, 0]
|
outCurPos = [0, 0]
|
||||||
outImg = Image.new("RGBA", outSize, (*self._ColourMapNormal[1], 255))
|
outImg = Image.new("RGBA", outSize, (*self._ColourMapNormal[1], 255))
|
||||||
outImgDraw = ImageDraw.Draw(outImg)
|
outImgDraw = ImageDraw.Draw(outImg)
|
||||||
|
outImgDraw.fontmode = "1"
|
||||||
for inCurRow in range(len(self.inCanvasMap)):
|
for inCurRow in range(len(self.inCanvasMap)):
|
||||||
for inCurCol in range(len(self.inCanvasMap[inCurRow])):
|
for inCurCol in range(len(self.inCanvasMap[inCurRow])):
|
||||||
inCurCell = self.inCanvasMap[inCurRow][inCurCol]
|
inCurCell = self.inCanvasMap[inCurRow][inCurCol]
|
||||||
|
Loading…
Reference in New Issue
Block a user