Skip to content

How do you package a font into p_fa.mpc? #995

Answered by andy013
andy013 asked this question in Q&A
Discussion options

You must be logged in to vote

I spent a little while playing around with this and I figured out how to bundle a font into p_fa.mpc.

Note: This is for developers who want to ship a font with Memoria. If you just want to use a custom font in-game for yourself then follow the steps below by @Tirlititi.

In order to import a font, it must be inside a Unity asset bundle. When you use Unity to generate the font asset it automatically generates a texture and material that are needed too. I couldn't figure out any way to import a font directly and get these to generate during runtime. You can use Font.CreateDynamicFontFromOSFont() but this only works for fonts already installed on the users system.

The p_fa.mpc file is just an…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by andy013
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants