Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the font is garbled when the poster is generated by K8s pod service?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail what to do when the font appears garbled when the poster is generated by K8s pod service. The content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

When using containerized deployment, the basic image uses the

Alpine

If you need to use other fonts when dealing with the system, install it yourself.

Install Microsoft related fonts

FROM alpine:3.7RUN apk-- no-cache add msttcorefonts-installer fontconfig & &\ update-ms-fonts & &\ fc-cache-f

Installation

RUN apk-update add fontconfig ttf-dejavu

Due to the designer's use of Apple PingFang fonts in the poster, the poster has been garbled since it was generated:

The following two fonts are used to try to put them in the container of pod.

When the above two fonts are set up in the program:

It is best to use ttc font to solve the problem.

About the difference between ttf and ttc:

TTC is a combination of several TTF fonts, and you will see more than two fonts in the font list after installation. When most of the words in the two fonts are the same, you can make the two fonts into a TTC file, now the common different fonts in TTC, Chinese characters are generally no different, but the width of English symbols is different, in order to adapt to different layout requirements.

Although they are all font files, .ttc is a new generation of font format standard developed by microsoft, which enables multiple truetype fonts to share the same stroke information, which effectively saves the space occupied by font files and increases sharing. However, some software lacks the recognition of this format font, which makes it difficult to edit ttc fonts.

The O icon of the TTF extension represents the OpenType-TrueType font, using TrueType curves, but supports the advanced features of OpenType.

The T icon of the TTF extension represents the TrueType font, using the TrueType curve and does not support the OpenType feature.

The O icon of the OTF extension represents the OpenType-PostScript font, which uses PostScript curves and supports OpenType advanced features.

Font location on Apple system:

/ System/Library/Fonts

On the K8s pod service generated posters when the font is garbled how to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report