Search Unity

Creating font asset from file without already existing characters?

Discussion in 'UGUI & TextMesh Pro' started by habitoti, May 24, 2019.

  1. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    Hi,

    love the TextMesh Pro feature to just read a file for font asset generation. What is your best practice to then exclude already otherwise mapped (or knowingly unneeded) characters? So e.g. reading a Japanese text sheet from translation supply will contain lots of meta data that is actually not required for generating the atlas, like all the latin chars in startLabel="ゲーム開始".
    For now I explicitly remove them later on (as they are the much lower values in the beginning) and regenerate from the character list. Having to redo that again and again while the translation files grow seems to be error prone, and for a general case I could imagine rather an additional exclusion setting for unicodes.
    It would also be great if reading from file would be combined with existing fallback chain. That would it make it much easier to distribute characters over multiple fallback textures. So once a unicode is covered in existing chain, it would automagically be ignored for current generation process (could also be just another manually maintained fallback list in font generation editor). Or did I miss some easy process to automatically distribute over multiple textures, say if I want to restrict single textures to 1k * 1k, especially if characters come from file and are not a straight unicode sequence?

    Regards, habitoti
     
    Last edited: May 24, 2019