mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-13 05:37:48 +02:00
fix(core/message_exporter): update font path
This commit is contained in:
@ -205,14 +205,14 @@ class MessageExporter(
|
||||
runCatching {
|
||||
ZipFile(context.bridgeClient.getApplicationApkPath()).use { apkFile ->
|
||||
//export rawinflate.js
|
||||
apkFile.getEntry("assets/web/rawinflate.js").let { entry ->
|
||||
apkFile.getEntry("assets/web/rawinflate.js")?.let { entry ->
|
||||
output.write("<script>".toByteArray())
|
||||
apkFile.getInputStream(entry).copyTo(output)
|
||||
output.write("</script>\n".toByteArray())
|
||||
}
|
||||
|
||||
//export avenir next font
|
||||
apkFile.getEntry("res/font/avenir_next_medium.ttf").let { entry ->
|
||||
apkFile.getEntry("assets/web/avenir_next_medium.ttf")?.let { entry ->
|
||||
val encodedFontData = Base64.Default.encode(apkFile.getInputStream(entry).readBytes())
|
||||
output.write("""
|
||||
<style>
|
||||
@ -226,7 +226,7 @@ class MessageExporter(
|
||||
""".trimIndent().toByteArray())
|
||||
}
|
||||
|
||||
apkFile.getEntry("assets/web/export_template.html").let { entry ->
|
||||
apkFile.getEntry("assets/web/export_template.html")?.let { entry ->
|
||||
apkFile.getInputStream(entry).copyTo(output)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user