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,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"HTML Renderer for FPDF.py (unicode)"
|
||||
|
||||
__author__ = "Mariano Reingart <reingart@gmail.com>"
|
||||
__copyright__ = "Copyright (C) 2010 Mariano Reingart"
|
||||
__license__ = "LGPL 3.0"
|
||||
|
||||
# Inspired by tuto5.py and several examples from fpdf.org, html2fpdf, etc.
|
||||
|
||||
from fpdf import FPDF, HTMLMixin
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
|
||||
class MyFPDF(FPDF, HTMLMixin): pass
|
||||
|
||||
pdf=MyFPDF()
|
||||
|
||||
# load the unicode font
|
||||
pdf.add_font('DejaVu', '', 'DejaVuSansCondensed.ttf', uni=True)
|
||||
|
||||
pdf.add_page()
|
||||
|
||||
# test the basic fonts
|
||||
pdf.write_html("""<p><font face="Arial"><B>hello</B> <I>world</I></font></p>""")
|
||||
pdf.write_html("""<p><font face="Times"><B>hello</B> <I>world</I></font></p>""")
|
||||
pdf.write_html("""<p><font face="Courier"><B>hello</B> <I>world</I></font></p>""")
|
||||
pdf.write_html("""<p><font face="zapfdingbats"><B>hello</B> <I>world</I></font></p>""")
|
||||
|
||||
# test the unicode (utf8) font:
|
||||
|
||||
# greek
|
||||
pdf.write_html(u"""<p><font face="DejaVu">Γειά σου κόσμος</font></p>""")
|
||||
# russian
|
||||
pdf.write_html(u"""<p><font face="DejaVu">Здравствуй, Мир</font></p>""")
|
||||
|
||||
fn = 'html_unicode.pdf'
|
||||
pdf.output(fn,'F')
|
||||
|
||||
import os
|
||||
try:
|
||||
os.startfile(fn)
|
||||
except:
|
||||
os.system("xdg-open \"%s\"" % fn)
|
||||
Reference in New Issue
Block a user