Läuft die Voice Acoustic VA-Remotecontrol (AllDSP AllControl) nativ unter Linux auf echtem wxGTK 3.0 — ohne Wine und ohne dekompilierten App-Code. Ausgeführt wird das unveränderte Python-2.7-Bytecode aus dem macOS-.app; C-Extensions (wxGTK/numpy/ scipy/PortAudio) kommen nativ aus Debian stretch. Enthält: va/ (Original-.pyc + pure-Python-Libs + Assets + launch.py mit den drei Linux-Fixes), Dockerfile/run.sh/entrypoint.sh, reference/ (dekompilierter Quellcode zum Debuggen) und README/STATUS. img.cache (378 MB, regenerierbar) ist per .gitignore ausgeschlossen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"Basic test of TrueType Unicode font handling"
|
|
|
|
import struct
|
|
from fpdf.ttfonts import TTFontFile
|
|
|
|
|
|
if __name__ == '__main__':
|
|
ttf = TTFontFile()
|
|
ttffile = 'font/DejaVuSansCondensed.ttf';
|
|
ttf.getMetrics(ttffile)
|
|
# test basic metrics:
|
|
assert round(ttf.descent, 0) == -236
|
|
assert round(ttf.capHeight, 0) == 928
|
|
assert ttf.flags == 4
|
|
assert [round(i, 0) for i in ttf.bbox] == [-918, -415, 1513, 1167]
|
|
assert ttf.italicAngle == 0
|
|
assert ttf.stemV == 87
|
|
assert round(ttf.defaultWidth, 0) == 540
|
|
assert round(ttf.underlinePosition, 0) == -63
|
|
assert round(ttf.underlineThickness, 0) == 44
|
|
# test char widths 8(against binary file generated by tfpdf.php):
|
|
data = open("dejavusanscondensed.cw.dat", "rb").read()
|
|
char_widths = struct.unpack(">%dH" % int(len(data) / 2), data)
|
|
assert len(ttf.charWidths) == len(char_widths)
|
|
diff = []
|
|
for i, (x, y) in enumerate(zip(char_widths, ttf.charWidths)):
|
|
if x != y: # compare each char width
|
|
diff.append(i)
|
|
assert not diff
|
|
## assert ttf.charWidths == char_widths
|
|
|