当前位置:网站首页>Related concepts of TTF, TOF, woff and woff2
Related concepts of TTF, TOF, woff and woff2
2022-06-23 02:43:00 【Programming samadhi】
Preface
In the last article , I introduced it TTF Format font file to solve the problem of inconsistent font performance on various platforms .
But that's not the best solution , Because the font file has more than TTF Format , Common font formats include OTF、WOFF and WOFF2 etc. .
today , Let me summarize some of the most common font formats , It is convenient to make the best choice in the future .
TTF(TrueType Font)
TrueType It is a computer outline font jointly developed by apple and Microsoft ( Curvilinear stroke words ) Type standard .
The extension of this type of font file is .ttf, Type code is tfil.
TrueType Its main strength is that it can provide developers with information about font display 、 Advanced control of pixel level display of different font sizes .
The compatibility is as follows :
OTF(OpenType Font)
OpenType yes Adobe and Microsoft Jointly developed cross platform font file format , Also called Type 2 typeface , Its font format is Unicode code , It is a font format compatible with various languages .
OpenType It is also an outline font , Than TrueType More powerful , It also supports multiple platforms , Support a large character set , And copyright protection . It can be said that it is Type 1 and TrueType Superset .
OpenType The standard defines OpenType The suffix of the file name :
- contain TrueType The font OpenType File suffix
.ttf. - contain PostScript The file suffix of the font is
.OTF. - If it's a series of TrueType Font package file of font , Then the suffix is
.TTC.
OTF The main advantages of :
- Enhanced cross platform functionality ;
- Better support Unicode International character set defined by the standard ;
- Support advanced printing control capability ;
- The resulting file size is smaller ;
- It supports adding digital signatures to character sets , Ensure the integration function of documents .
The same OpenType Font files can be used for Mac OS,Windows and Linux System , This cross platform font is very convenient for users , Users no longer have to worry about configuring word libraries for different systems .
OTF Compatibility and TTF identical .
WOFF(Web Open Font Format)
Web Open Font Format It's a font format standard for web pages . This font format was developed in 2009 year , It is now being developed by the World Wide Web Consortium Web Font working group standardization , In order to become a recommended standard .
This font format can not only effectively use compression to reduce file size , And it does not contain encryption and is not protected DRM( Digital copyright management ) Limit .
WOFF In essence, it is based on sfnt The font of ( Such as TrueType、OpenType Or open font format ), And these fonts have been WOFF Coding tool compression , So that it can be embedded in the web page . This font format uses zlib Compress , The file size is generally larger than TTF Small 40%.
The compatibility is as follows :
WOFF2
WOFF 2 Standard in WOFF1 On the basis of , The volume compression is further optimized , Less bandwidth requirements , At the same time, it can quickly decompress on the mobile device .
And WOFF 1.0 Used in Flate Compared to compression ,WOFF 2.0 It's using Brotli Method , Higher compression , So the file size is smaller .
The compatibility is as follows :
Add concept
In the above concept , There is Type 1 typeface and Type 2 typeface That's what I'm saying , Here I would like to add the related concepts of the two .
Type 1 typeface
Type 1 Font on 1984 Year by year Adobe introduce , With its PostScript Page description language , With the availability PostScript The popularity of desktop publishing software and printers has been widely used .1996 year ,Adobe Product and text development began to focus on more widely used OpenType typeface , Yes Type 1 The attention of .
Type 2 typeface
Open Type The font is also called Type 2 typeface , In fact, this name is also used to correspond to Type 1 Font , Representation ratio Type 1 Further more .
summary
Through the above concept , It can be seen that :
- TTF Better compatibility with , But its font file size is the largest .
- WOFF The font is better than TTF Fonts are smaller and more expressive .
- WOFF 2 The font is right WOFF Font upgrade .
therefore , If compatibility is not considered , Font usage first WOFF 2 , This is what I said at the beginning of the article TTF Not the best solution , You can according to your actual situation , Choose the appropriate font file as appropriate , To achieve the purpose of performance optimization .
~ The end of this paper , Thank you for reading !
边栏推荐
- How to make traditional Chinese medicine labels with pictures
- Delta oscillation in EEG
- what the fuck! If you can't grab it, write it yourself. Use code to realize a Bing Dwen Dwen. It's so beautiful ~!
- An article shows you the difference between high fidelity and low fidelity prototypes
- Essentials of fleet video playback and fleet videoplayer video playback components
- Goframe framework (RK boot): fast implementation of server-side JWT verification
- [data preparation and Feature Engineering] data cleaning
- Function recursion and iteration
- Markdown - mark above / below symbol (typora, latex)
- How to make keyword targeted layout based on search sources?
猜你喜欢

Evolution history of mobile communication

Vulnhub DC-5

Application and challenge of ten billion level map data in Kwai security intelligence

Ansible practice of Nepal graph
What is sitelock? What is the function?

Performance test -- Jenkins environment construction for 15jmeter performance test

Unity official case nightmare shooter development summary < I > realization of the role's attack function

8. greed
![Buuctf misc-[actf freshman competition 2020]outline](/img/a4/ac9d14a69e0759d1e7c65740415bf7.jpg)
Buuctf misc-[actf freshman competition 2020]outline

Deep learning environment configuration (I) installation of CUDA and cudnn
随机推荐
SetTimeout and setinterval execution time
How to make a borrowing card
Why is BeanUtils not recommended?
Supervisor multi process management exception automatic restart visual management
Practice and exploration of vivo live broadcast application technology
Why do I use index, query or slow?
Goframe framework (RK boot): fast implementation of CSRF verification
[data preparation and Feature Engineering] perceived data
Analog Electronic Technology
Cut! 39 year old Ali P9 saved 150million
Troubleshooting and optimization of easynvr version 5.0 Video Square snapshot not displayed
2021-11-11
Golang string comparison
How to make traditional Chinese medicine labels with pictures
Call rest port to implement nailing notification
How to prohibit copying and copying files to the local server remote desktop
C language series - Section 4 - arrays
You must know the type and method of urllib
How to make word notes beautiful
Log a log4j2 vulnerability handling