ndv
09/02/2019, 4:25 PMprivate fun copyFonts () {
val fontsFolder = File(javaClass.getResource("../../fonts").file)
val fontsOutput = File(options.fontOutputLocation)
if (!fontsOutput.exists()) fontsOutput.mkdir()
fontsFolder.copyRecursively(fontsOutput, overwrite = true) { file, exception ->
throw IllegalStateException("Could not copy file ${file.absolutePath}. ${exception.message}")
}
}
However, the .otf files seem to get corrupted somehow during the copy. I've tried manually converting each file to a byte array and creating files manually, same problem.
In a nutshell, the files in the original /fonts folder are around 90kB, once they've been copied over they are about 150kB and LaTeX no longer recognizes the file. If I manually copy the original font files over to the output folder, LaTeX compilation goes back to working normally.
I just recently updated from Kotlin 1.3.31 to 1.3.50 - which is when the problem started.
Any suggestions? Thank you!
EDIT:
Just tried by calling robocopy
from inside Kotlin - same problem.
However, calling robocopy from powershell copies the files correctly
Also: my .otf files seem to be the only ones affected by this.ndv
09/02/2019, 5:42 PMndv
09/02/2019, 5:51 PM