TTF ->TMP 변환 / TextMeshPro _ Font Asset Creator

32-126,44032-55203,12593-12634

TTF ->TMP 변환하기

Version : Unity 2021.3.5f1


TTF 확장자 폰트는 유니티의 TextMeshPro에서 바로 사용할 수 없다. (또한 TMP 기본 폰트는 한글을 사용 할 수 없음)

일단 마음에 드는 무료 폰트를 받아 줍니다.

아래는 무료 글꼴 추천 사이트입니다.

https://gongu.copyright.or.kr/gongu/bbs/B0000018/list.do?menuNo=20000

https://noonnu.cc/

https://www.kogl.or.kr/index.do

추가할 폰트 파일을 Assets 폴더에 넣어줍니다.

Windows -> TextMeshPro -> Font Asset Creator

Source Font File 에 폰트를 넣어줍니다.

Auto Size 도 좋지만 각 내용을 봐야 할 것 같습니다.

Auto 는 편하지만 나중에 여러 문제가 생겼을 때 원인을 모르면 해결이 안되니까요.

아래는 공식 문서

https://docs.unity3d.com/Packages/com.unity.textmeshpro@4.0/manual/FontAssetsCreator.html

Font Asset Creator Settings:

Property:Function:
Source Font FileSelect a font from which to generate a Text Mesh Pro font Asset.

This font is not included in project builds, unless you use it elsewhere in the project, or put it in a Resources folder.

You can use one of the default TextMesh Pro font assets, or import your own.


Text Mesh Pro 글꼴 자산을 생성할 글꼴을 선택합니다.

Sampling Point SizeSet the font size, in points, used to generate the font texture.


글꼴 텍스처를 생성하는 데 사용되는 글꼴 크기를 포인트 단위로 설정합니다.

Auto SizingUse the largest point size possible while still fitting all characters on the texture.

This is the usual setting for SDF fonts.


텍스처의 모든 문자를 맞추면서 가능한 가장 큰 포인트 크기를 사용하십시오.

이것은 SDF 글꼴의 일반적인 설정입니다.

Custom SizeUse a custom point size. Enter the desired size in the text box.

Use this setting to achieve pixel-accurate control over bitmap-only fonts.

이 설정을 사용하여 비트맵 전용 글꼴을 픽셀 단위로 정확하게 제어합니다.

PaddingSpecify the space, in pixels, between characters in the font texture.

Padding provides the space required to render character separately, and to generate the SDF gradient (See the documentation on Font Assets for details).

The larger the padding, the smoother the transition, which allows for higher-quality rendering and larger effects, like thick outlines.

A padding of 5 is often fine for a 512×512 texture.


글꼴 텍스처에서 문자 사이의 간격(픽셀)을 지정합니다.

Packing MethodSpecify how to fit the characters into the font texture.

문자를 글꼴 질감에 맞추는 방법을 지정합니다.

OptimumFinds the largest possible automatic font size that still fits all characters in the texture.

Use this setting to generate the final font texture.


텍스처의 모든 문자에 맞는 가장 큰 자동 글꼴 크기를 찾습니다.
FastComputes character packing more quickly, but may use a smaller font size than Optimum mode.

Use this setting when testing out font Asset creation settings.

문자 패킹을 더 빠르게 계산하지만 Optimum 모드보다 작은 글꼴 크기를 사용할 수 있습니다.
Atlas ResolutionSet the size width and height of the font texture, in pixels.

A resolution of 512 x 512 is fine for most fonts, as long as you are only including ASCII characters. Fonts with more characters may require larger resolutions, or multiple atlases.

When using an SDF font, a higher resolution produces finer gradients, and therefore higher quality text.

글꼴 텍스처의 크기 너비와 높이를 픽셀 단위로 설정합니다.
Character SetThe characters in a font file aren’t included in the font Asset automatically. You have to specify which ones you need. You can select a predefined character set, provide a list of characters to include, or include all of the characters in an existing font Asset or text Asset.

글꼴 파일의 문자는 글꼴 자산에 자동으로 포함되지 않습니다.
ASCIIIncludes the visible characters in the ASCII character set.
Extended ASCIIIncludes the visible characters in the extended ASCII character set.
ASCII LowercaseIncludes only visible lower-case characters from the ASCII character set.
ASCII UppercaseIncludes only visible upper-case characters from the ASCII character set.
Numbers + SymbolsIncludes only the visible numbers and symbols from the ASCII character set.
Custom RangeIncludes a range of characters that you define.

Enter a sequence of decimal values, or ranges of values, to specify which characters to include.

Use a hyphen to separate the first and last values of a range. Use commas to separate values and ranges (for example 32-126,160,8230).

You can also choose an existing font Asset to include the characters in that Asset.
Unicode Range (Hex)Includes a range of characters that you define.

Enter a sequence of unicode hexadecimal values, or ranges of values, to specify which characters to include.

Use a hyphen to separate the first and last values of a range. Use commas to separate values and ranges (for example 20-7E,A0,2026).

You can also choose an existing font Asset to include the characters in that Asset.
Custom CharactersIncludes a range of characters that you define.

Enter a sequence of characters to specify which characters to include.

Enter characters one after the other, with no spaces or delimiting characters in between (for example abc123*#%).

You can also choose an existing font Asset to include the characters in that Asset.
Characters from FileIncludes all the characters in a text Asset that you specify.

Use this option when you want to save your character set.
Font StyleApply basic font styling when creating a bitmap-only font Asset.

For SDF fonts, you configure the styling in the shader rather than the font Asset.


비트맵 전용 글꼴 에셋을 만들 때 기본 글꼴 스타일을 적용합니다.
NormalGenerates characters with no styling.

스타일 지정 없이 문자를 생성합니다.
Bold, Italic, Bold_ItalicGenerates the font Asset with bold characters, italicized characters, or both.

With these settings, you can set a strength value that applied to bolding and italicization

볼드체, 이탤릭체 또는 둘 다를 사용하여 글꼴 자산을 생성합니다.
OutlineGenerates the font Asset with outline characters.

아웃라인 문자로 글꼴 자산을 생성합니다.
Bold_SimGenerates the font Asset with ????
Render ModeSpecify the render mode to use when outputting the font atlas.

글꼴 아틀라스를 출력할 때 사용할 렌더링 모드를 지정합니다.
SMOOTHRenders the atlas to an antialiased bitmap.
RASTERRenders the atlas to a non-antialiased bitmap.
SMOOTH_HINTEDRenders the atlas to an antialiased bitmap, and aligns character pixels with texture pixels for a crisper result.
RASTER_HINTEDRenders the atlas to a non-antialiased bitmap and aligns character pixels with texture pixels for a crisper result.
SDFRenders the atlas using a slower, but more accurate SDF generation mode, and no oversampling.
SDFAARenders the atlas using a faster, but less accurate SDF generation mode. It produces font atlases that are sufficient for most situations.
SDFAA_HINTEDRenders the atlas using a faster, but less accurate SDF generation mode, and aligns character pixels with texture pixels for a crisper result.. It produces font atlases that are sufficient for most situations
SDF8Renders the atlas using a slower, but more accurate SDF generation mode, and 8x oversampling.
SDF16Renders the atlas using a slower, but more accurate SDF generation mode, and 16x oversampling.
SDF32Renders the atlas using a slower, but more accurate SDF generation mode, and 32x oversampling. Use this setting for fonts with complex or small characters.
Get Kerning PairsEnable this option to copy the kerning data from the font.

Kerning data is used to adjust the spacing between specific character pairs to produce a more visually pleasing result.

Note: It isn’t always possible to import kerning data. Some fonts store kerning pairs in their glyph positioning (GPOS) table, which is not supported by FreeType, the font engine used by TextMesh Pro. Other fonts do not store kerning pairs at all.


글꼴에서 커닝 데이터를 복사하려면 이 옵션을 활성화합니다.


커닝 데이터는 특정 문자 쌍 사이의 간격을 조정하여 보다 시각적으로 만족스러운 결과를 생성하는 데 사용됩니다.
Generate Font AtlasGenerate the font atlas texture.


글꼴 아틀라스 텍스처를 생성합니다.
SaveSave the current font atlas.

현재 글꼴 아틀라스를 저장합니다.
Save AsSave the current font atlas as a new font Asset.

현재 글꼴 아틀라스를 새 글꼴 자산으로 저장합니다.

일반적인 한글 TMP 생성 설정

Sampling Point Size : Custom Size / 30

Padding : 4

Packing Method : Fast

Atlas Resolution : 4096 / 4096

Character Set : Custom Range

Character Sequence(Decimal) : 32-126[영어], 44032-55203[한글], 12593-12634[한글자모 2]

32-126,44032-55203,12593-12634

파일명이 한글이면 오류난다… 주의!

Generate Font Atlas 를 눌러주고 완료되면 Save 해주자

완료!

https://www.supernovice.org/font/?ckattempt=1 <- 폰트의 출처

댓글 달기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

위로 스크롤