找到一个非常华丽的字体,但它没有您想要的格式?在本文中,您将找到大量
免费的字体转换器
它们不需要注册或发送电子邮件。
字体转换器
转换字体格式的常用步骤:从本地机器中选择输入文件,选择输出字体格式,字体转换器将为您生成转换后的字体文件。
经过测试下面8个网站靠不住下面给出ttc to ttf 脚本
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#First released as C++ program by Hiroyuki Tsutsumi as part of the free software suite “Beer”
#I thought porting it to Python could be both a challenge and useful
from sys import argv, exit, getsizeof
from struct import pack_into, unpack_from
def ceil4(n):
"""returns the next integer which is a multiple of 4"""
return (n + 3) & ~3
if len(argv)!=2:
print("Usage: %s FontCollection.ttc" % argv)
exit(2)
filename = argv[1]
in_file = open(filename, "rb")
buf = in_file.read()
in_file.close()
if filename.lower().endswith(".ttc"):
filename = filename[:-4]
if buf[:4] != b"ttcf":
out_filename = "%s.ttf" % filename
out_file = open(out_filename, "wb")
out_file.write(buf)
#end, so we don’t have to close the files or call exit() here
else:
ttf_count = unpack_from("!L", buf, 0x08)[0]
print("Anzahl enthaltener TTF-Dateien: %s" % ttf_count)
ttf_offset_array = unpack_from("!"+ttf_count*"L", buf, 0x0C)
for i in range(ttf_count):
print("Extrahiere TTF #%s:" % (i+1))
table_header_offset = ttf_offset_array[i]
print("\tHeader beginnt bei Byte %s" % table_header_offset)
table_count = unpack_from("!H", buf, table_header_offset+0x04)[0]
header_length = 0x0C + table_count * 0x10
print("\tHeaderlänge: %s Byte" % header_length)
table_length = 0
for j in range(table_count):
length = unpack_from("!L", buf, table_header_offset+0x0C+0x0C+j*0x10)[0]
table_length += ceil4(length)
total_length = header_length + table_length
new_buf = bytearray(total_length)
header = unpack_from(header_length*"c", buf, table_header_offset)
pack_into(header_length*"c", new_buf, 0, *header)
current_offset = header_length
for j in range(table_count):
offset = unpack_from("!L", buf, table_header_offset+0x0C+0x08+j*0x10)[0]
length = unpack_from("!L", buf, table_header_offset+0x0C+0x0C+j*0x10)[0]
pack_into("!L", new_buf, 0x0C+0x08+j*0x10, current_offset)
current_table = unpack_from(length*"c", buf, offset)
pack_into(length*"c", new_buf, current_offset, *current_table)
#table_checksum = sum(unpack_from("!"+("L"*length), new_buf, current_offset))
#pack_into("!L", new_buf, 0x0C+0x04+j*0x10, table_checksum)
current_offset += ceil4(length)
out_file = open("%s%d.ttf"%(filename, i), "wb")
out_file.write(new_buf)
Supported Font Formats:
pfa, pfb, pt3, sfd, ttf, otf, otb, t42, cef, cff, gsf, ttc, svg, ik, mf, dfont, bin, suit, bdf.
Convert To:
ttf, otf, svg, pfa, pfb, bin, mm.pfa, mm.pfb, pt3, t42, cid.t42, cid, cff, cid.cff, sym.ttf, ttf.bin, dfont, otf.dfont.
Supported Font Formats:
ttf, otf, woff, pfa, pfb, pt3, t42, ps, woff
Convert To:
eot, otf, woff, svg, afm, pfa, pfb, ps, pt3, t42, apk
Supported Font Formats:
ttf, otf, pfb, dfont
Convert To:
ttf, otf, pfb, dfont
Supported Font Formats:
ttf, ps, TeX Bitmap Fonts, otb, bdf, fon, fnt, otf, svg, ttc, abf, afm, bdf, dfont
Convert To:
ttf, otf, fon, pfb, dfont, afm
Supported Font Formats:
otf, fon, pfb, font, otb, bdf, fnt, abf, bdf, woff, pfa, ofm, pfa, pfb, cid, ttc, hqx, pcf, sfd, dfont, bin
Convert To:
ttf, otf, bin, svg, pfb, dfont, afm
Font-Face Generators
Font-face generators normally creates a zip file with the 4 converted font files:
ttf, eot, svg, and woff
, a CSS file with
@font-face
code, and a demo in HTML (some generators).
Probably the best and most popular online
@font-face
generator. Font Squirrel provides 3 types of conversions: basic, optimal, and expert. The generated zip file includes a great demo in html format.
Font2Web too includes a demo HTML file in the zip file.
Covert Fonts includes the 4 converted font files and a
@font-face
CSS file, without any demos or extras.
其中:
https://www.files-conversion.com/file-convert/converted.php?nom=pingfang.ttf
最好用对字体文件大小没有限制