Erster Commit: nativer Linux-Port aus macOS-Bytecode
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>
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"Example of unicode support winfonts based on tfPDF"
|
||||
# http://www.fpdf.org/en/script/script92.php
|
||||
|
||||
#PyFPDF-cover-test:format=PDF
|
||||
#PyFPDF-cover-test:fn=winfonts.pdf
|
||||
#PyFPDF-cover-test:platform=win32
|
||||
#PyFPDF-cover-test:res=HelloWorld.txt
|
||||
|
||||
# This test can't calc hash because TTF fonts can vary on systems
|
||||
|
||||
import common
|
||||
import fpdf
|
||||
|
||||
import os, time
|
||||
|
||||
def dotest(outputname, nostamp):
|
||||
fpdf.set_global('SYSTEM_TTFONTS', "c:\\WINDOWS\\Fonts")
|
||||
|
||||
pdf = fpdf.FPDF()
|
||||
if nostamp:
|
||||
pdf._putinfo = lambda: common.test_putinfo(pdf)
|
||||
|
||||
pdf.add_page()
|
||||
# Add a Windows System font (uses UTF-8)
|
||||
t0 = time.time()
|
||||
pdf.add_font('sysfont','','arial.ttf',uni=True)
|
||||
pdf.set_font('sysfont','',14)
|
||||
t1 = time.time()
|
||||
if not nostamp:
|
||||
common.log("ttf loading time", t1-t0)
|
||||
|
||||
# Load a UTF-8 string from a file and print it
|
||||
txt = open(os.path.join(common.basepath, "HelloWorld.txt"), "rb").\
|
||||
read().decode("UTF-8")
|
||||
pdf.multi_cell(25, 5, txt)
|
||||
|
||||
pdf.text(100, 5, '1234')
|
||||
|
||||
pdf.write(5,'To find out what\'s new in self tutorial, click ')
|
||||
pdf.set_font('','U')
|
||||
link=pdf.add_link()
|
||||
pdf.write(5,'here',link)
|
||||
|
||||
# Select a standard font (uses windows-1252)
|
||||
pdf.set_font('Arial','',14)
|
||||
pdf.ln(10)
|
||||
pdf.write(5, 'The file size of this PDF is only 12 KB.')
|
||||
|
||||
pdf.output(outputname, 'F')
|
||||
|
||||
if __name__ == "__main__":
|
||||
common.testmain(__file__, dotest)
|
||||
|
||||
Reference in New Issue
Block a user