Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
307 views
in Technique[技术] by (71.8m points)

c# - Is there a way to update the Segoe UI Emoji font on Windows Server 2019

I have an C# web application that uses the Segoe UI Emoji font to put an emoji in a PDF that is generated. I'm using a RDLC report to generate the PDF. When generating the PDF on my development PC the PDF appears correct, I get the "devil" emoji.

After deploying and running on the server the emoji is the wrong one. I believe I've tracked the problem down to different versions of the font being installed (I was wrong, this doesn't appear to be the issue after the February 2021 updates brought the font version up to 1.29).

Correct example: enter image description here

Incorrect example: enter image description here

On my Windows 10 (20H2) development PC the Segoe UI Emoji font is at version 1.29.

Windows 10 development PC font version

On the Windows Server 2019 (1809) the same font is at version 1.29.

enter image description here

The emoji giving me issues is the smiling face with horns (devil). I'm using 0x1F608 to add the character to my output using the emoji example from here.

How do you convert a single Unicode code point to a string at runtime?

https://emojipedia.org/smiling-face-with-horns/

I've been looking for a way to update the font on the server, but due to it being a protected system font I'm really struggling. I can't delete it or install the newer version by copying the font file from Windows 10 to the server.

I've been researching and trying a few things to deal with protected system fonts, making a registry change to unlock the font and installing/copying the font but then it was promptly overwritten with the old version due to it being stored/cached in the WinSXS folder.

I went down a road trying to replace the file in the WinSXS folder but that turns into a permission nightmare and just feels wrong.

Is there a way to update that font without waiting around for Microsoft to push out an update?

Updated Question Why would I get different results running the application on my Windows 10 development pc versus running it deployed to Windows Server 2019.

question from:https://stackoverflow.com/questions/65895513/is-there-a-way-to-update-the-segoe-ui-emoji-font-on-windows-server-2019

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...