TTF font:Related concepts of TTF, TOF, WOFF and WOFF2-Font Tutorial免费ppt模版下载-道格办公

Related concepts of TTF, TOF, WOFF and WOFF2

Also includes TrueType fonts (TTF), OpenType fonts (OTF), WOFF fonts (Web Open Font Format), and WOFF2 fonts (Web Open Font Format 2). TTF fonts and OTF fonts are among the most common font formats. TTF fonts are based on TrueType font technology, while O

Foreword

In the last article, I introduced font files in TTF format to solve the problem of inconsistent font performance on various platforms.

But in fact, that is not the optimal solution, because the font file not only has TTF format, Common font formats include OTF, WOFF, and WOFF2.

Today, let me summarize the concepts related to the most common font formats for future reference You can make the best choice when using it.

TTF (TrueType Font)

TrueType is a computer outline font (curved stroke) type standard jointly developed by Apple and Microsoft.

The extension of this type of font file is.ttf , the type code is tfil.

The main strength of TrueType is that it can provide developers with information about font display, different fonts Advanced control of size, pixel level display and more.

The compatibility is as follows:

OTF (OpenType Font)

OpenType is a cross-platform font file format jointly developed by Adobe and Microsoft, also called Type 2 font. Its font format adopts Unicode encoding and is a font compatible with various languages Format.

OpenType is also an outline font, more powerful than TrueType, and supports more A platform, supports a large character set, and copyright protection. It can be said that it is a superset of Type 1 and TrueType.

The OpenType standard defines a suffix for OpenType file names:

< span style="color: #FF502C; --tt-darkmode-color: #A01B00;">.ttf< /span>.
  • The extension of the file containing the PostScript font is< span style="color: #FF502C; --tt-darkmode-color: #A01B00;">.OTF< /span>.
  • If it is a font package file containing a series of TrueType fonts, then The suffix name is.TTC.
  • The main advantages of OTF are:

    1. Enhanced cross-platform functionality;
    2. better support the international character set defined by the Unicode standard;
    3. Support advanced printing control capabilities;
    4. The generated file size is smaller;< /li>
    5. Support adding digital signatures in character sets to ensure the integration of files.

    Same OpenType font file It can be used in Mac OS, Windows and Linux systems. This cross-platform font library is very convenient for users to use, and users no longer have to worry about configuring font libraries for different systems.

    OTF has the same compatibility as TTF.

    WOFF (Web Open Font Format)

    Web Open Font Format is a font format standard used by web pages. This font format was developed in 2009 and is now being standardized as a Recommendation by the World Wide Web Consortium's Web Fonts Working Group.

    This font format not only effectively uses compression to reduce file size, but also does not include encryption Also free from DRM (Digital Rights Management) restrictions.

    WOFF essentially includes sfnt-based fonts (such as TrueType, OpenType or Open font format), and these fonts are compressed by WOFF's encoding tools for embedding in web pages. This font format uses zlib compression, and the file size is generally 40% smaller than TTF.

    The compatibility is as follows:

    WOFF2

    Based on WOFF1, WOFF 2 standard further optimizes volume compression, requires less bandwidth, and can be quickly decompressed on mobile devices.

    Compared to the Flate compression used in WOFF 1.0, WOFF 2.0 uses the Brotli method The compression performed has a higher compression ratio, so the file size is smaller.

    The compatibility is as follows:

    Supplementary concepts

    In the above concept,Type 1 font and Type 2 font, I will add them here Two related concepts.

    Type 1 font

    Introduced by Adobe in 1984 for use with its PostScript page description language, Type 1 fonts gained widespread use with the proliferation of PostScript-capable desktop publishing software and printers. In 1996, Adobe product and type development began to focus on the more widely used OpenType fonts, with less focus on Type 1.

    Type 2 font

    Open Type fonts are also called Type 2 fonts. This name is actually produced to correspond to Type 1 fonts, which means it is a step further than Type 1.

    Summary

    Through the above concept, we can see:

    • TTF has better compatibility, but its font file size is the largest.
    • WOFF fonts have a smaller size than TTF fonts volume and better performance.
    • WOFF 2 font is an upgrade to WOFF font .

    So, if you don't consider In terms of compatibility, WOFF 2 is the most recommended font. This is why I said at the beginning of the article that using TTF is not the optimal solution. You can choose the appropriate font file according to your actual situation to achieve the purpose of performance optimization.

    ~

    ~ This is the end of this article, thanks for reading!

    ~

    Learn interesting knowledge, meet interesting friends, and shape interesting souls!

    Hello everyone, I am the author of 〖Programming Samadhi〗Hermit Wang, my official account is "Programming Samadhi", welcome to pay attention, I hope you can give me more advice!

    Articles are uploaded by users and are for non-commercial browsing only. Posted by: Lomu, please indicate the source: https://www.daogebangong.com/en/articles/detail/Related%20concepts%20of%20TTF%20TOF%20WOFF%20and%20WOFF2.html

    Like (810)
    Reward 支付宝扫一扫 支付宝扫一扫
    single-end

    Related Suggestion