turbine-lib 0.1.3__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/PKG-INFO +1 -1
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/pyproject.toml +1 -1
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/datfile.py +3 -1
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/font_convert.py +4 -4
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib.egg-info/PKG-INFO +1 -1
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/README.md +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/setup.cfg +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/__init__.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/binarydata.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/database.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/datexportapi.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/ddssubfile.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/fontsubfile.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/libs/datexport.dll +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/libs/msvcp71.dll +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/libs/msvcp90.dll +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/libs/msvcr71.dll +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/libs/zlib1T.dll +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/subfile.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/subfiledata.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/textsubfile.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/textutils.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib/utils.py +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib.egg-info/SOURCES.txt +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib.egg-info/dependency_links.txt +0 -0
- {turbine_lib-0.1.3 → turbine_lib-0.1.5}/turbine_lib.egg-info/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ from turbine_lib.database import Database
|
|
|
5
5
|
from turbine_lib.datexportapi import DatExportApi
|
|
6
6
|
from turbine_lib.ddssubfile import DDSSubfile
|
|
7
7
|
from turbine_lib.fontsubfile import SubfileFONT
|
|
8
|
-
from turbine_lib.subfile import string_from_file_type, file_type_from_file_contents, FILE_TYPE
|
|
8
|
+
from turbine_lib.subfile import string_from_file_type, file_type_from_file_contents, FILE_TYPE, Subfile
|
|
9
9
|
from turbine_lib.subfiledata import SubfileData
|
|
10
10
|
from turbine_lib.textsubfile import TextSubfile
|
|
11
11
|
|
|
@@ -289,6 +289,8 @@ class DatFile:
|
|
|
289
289
|
elif ext == ".fontbin":
|
|
290
290
|
for_import = SubfileFONT.build_for_import(old_data, outer_data)
|
|
291
291
|
return for_import
|
|
292
|
+
elif ext == ".subfile":
|
|
293
|
+
return outer_data.binary_data
|
|
292
294
|
# Add other file types as needed
|
|
293
295
|
else:
|
|
294
296
|
# Default implementation for unknown types
|
|
@@ -285,8 +285,8 @@ class DestFontInfo:
|
|
|
285
285
|
# self.Charset -= 65536
|
|
286
286
|
self.CharsCount = info.CharsCount
|
|
287
287
|
self.Padding = int(info.Padding.Left) & 0xFF # byte
|
|
288
|
-
self.ScaleW =
|
|
289
|
-
self.ScaleH =
|
|
288
|
+
self.ScaleW = self.FontSize # 新增:用于作为width
|
|
289
|
+
self.ScaleH = self.FontSize # 新增:用于作为height
|
|
290
290
|
|
|
291
291
|
self.Chars = []
|
|
292
292
|
for i in range(self.CharsCount):
|
|
@@ -306,8 +306,8 @@ class DestFontInfo:
|
|
|
306
306
|
with open(path, 'wb') as fs:
|
|
307
307
|
# 写入头部数据 - 根据新格式调整
|
|
308
308
|
fs.write(struct.pack('<I', 0)) # masterFileID
|
|
309
|
-
fs.write(struct.pack('<I', self.
|
|
310
|
-
fs.write(struct.pack('<I', self.
|
|
309
|
+
fs.write(struct.pack('<I', self.FontSize)) # width
|
|
310
|
+
fs.write(struct.pack('<I', self.FontSize)) # height
|
|
311
311
|
fs.write(struct.pack('<I', self.CharsCount)) # CharsCount
|
|
312
312
|
|
|
313
313
|
# 写入字符信息 - 根据新格式调整
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|