summaryrefslogtreecommitdiff
path: root/Library/Artifacts/31/3155cba6b5a6876abd5dec7533a10619
blob: 70e5ac8f164561a3ffd019b5635de1e7447e01fe (plain)
ofshex dumpascii
0000 00 00 0f 97 00 01 40 d4 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ......@.............2019.3.6f1..
0020 ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 ...............f..!..5.9.4.Q...B
0040 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 ...............7................
0060 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 ................................
0080 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 ...............E................
00a0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 ...............#................
00c0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 ...............,................
00e0 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 ...........5...a................
0100 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 ...............#................
0120 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 ...............,................
0140 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 ...............r................
0160 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 ...............#................
0180 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 ...............,................
01a0 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 ...........H....................
01c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 ...........1...1............@...
01e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 ................................
0200 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 ...........Q...j................
0220 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 ...............J................
0240 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 ...........1...1................
0260 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 ................................
0280 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 ...............j................
02a0 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 ...........\....................
02c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 ...........H...r................
02e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 ...........1...1............@...
0300 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 ................................
0320 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 ...........Q...j................
0340 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 ...........H...w................
0360 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 ...........1...1............@...
0380 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 ................................
03a0 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 ...........Q...j................
03c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 ...........H....................
03e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 ...........1...1............@...
0400 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 ................................
0420 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 ...........Q...j................
0440 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 ...........y....................
0460 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 ...............#.......!........
0480 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 ...............,......."........
04a0 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 .......................#....@...
04c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 ...........1...1.......$........
04e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 .......................%........
0500 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 ...............j.......&........
0520 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 .......................'........
0540 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 ...........1...1.......(........
0560 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 .......................)........
0580 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 ...............j.......*........
05a0 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 ...........H...........+........
05c0 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 ...........1...1.......,....@...
05e0 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 .......................-........
0600 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 ...........Q...j................
0620 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 ...........y.........../........
0640 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 ...............#.......0........
0660 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 ...............,.......1........
0680 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 .......................2....@...
06a0 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 .......................3....@...
06c0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 ...............#.......4........
06e0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 ...............,.......5........
0700 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 ...........H...........6........
0720 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 ...........1...1.......7....@...
0740 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 .......................8........
0760 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 ...........Q...j.......9........
0780 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 ...........H...........:........
07a0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 ...........1...1.......;....@...
07c0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 .......................<........
07e0 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 ...........Q...j.......=........
0800 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 ...........H...........>........
0820 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 ...........1...1.......?....@...
0840 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 .......................@........
0860 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 ...........Q...j.......A........
0880 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 .......MonoImporter.PPtr<EditorE
08a0 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 xtension>.m_FileID.m_PathID.PPtr
08c0 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 <PrefabInstance>.m_ExternalObjec
08e0 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 ts.SourceAssetIdentifier.type.as
0900 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 sembly.name.m_UsedFileIDs.m_Defa
0920 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f ultReferences.executionOrder.ico
0940 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d n.m_UserData.m_AssetBundleName.m
0960 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 _AssetBundleVariant.....s.......
0980 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 G....Z56.:!@i.J*...............7
09a0 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 ................................
09c0 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 ...............................E
09e0 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a00 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a20 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 ...........................(...a
0a40 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a60 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a80 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 ...............................r
0aa0 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0ac0 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0ae0 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab ...........................H....
0b00 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0b20 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0b40 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0b60 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea ...........................H....
0b80 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0ba0 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0bc0 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0be0 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d ...............................=
0c00 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0c20 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ................................
0c40 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a ...............................j
0c60 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b ...........................H....
0c80 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 ...........................1...1
0ca0 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b ............@...................
0cc0 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a ...........................Q...j
0ce0 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a ...........................y....
0d00 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 ................................
0d20 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f ................................
0d40 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 ...........................y...Q
0d60 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0d80 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0da0 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 ...............................X
0dc0 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 .......!...................H...i
0de0 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ......."...................1...1
0e00 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......#....@...................
0e20 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......$...................Q...j
0e40 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 .......%...................H...u
0e60 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 .......&...................1...1
0e80 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......'....@...................
0ea0 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......(...................Q...j
0ec0 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 .......)...............PPtr<Edit
0ee0 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 orExtension>.m_FileID.m_PathID.P
0f00 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 Ptr<PrefabInstance>.m_DefaultRef
0f20 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 erences.m_Icon.m_ExecutionOrder.
0f40 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 m_ClassName.m_Namespace.........
0f60 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 ............\........y......`...
0f80 74 30 01 00 01 00 00 00 00 00 00 00 01 00 00 00 00 ee 41 e8 82 f1 c3 14 5c 4b ff f5 a8 a5 ef a5 t0................A.....\K......
0fa0 c6 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 .....................y..........
1040 00 00 00 00 01 00 00 00 80 b9 2a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ..........*.....................
1060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1080 00 00 00 00 00 00 00 00 0d 00 00 00 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 00 00 00 fd 2f 01 00 ............TMP_FontAsset..../..
10a0 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 3b using.System;.using.UnityEngine;
10c0 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 53 65 72 69 61 6c 69 7a 61 74 69 6f 6e .using.UnityEngine.Serialization
10e0 3b 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 54 65 78 74 43 6f 72 65 3b 0a 75 73 ;.using.UnityEngine.TextCore;.us
1100 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 54 65 78 74 43 6f 72 65 2e 4c 6f 77 4c 65 76 65 ing.UnityEngine.TextCore.LowLeve
1120 6c 3b 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 50 72 6f 66 69 6c 69 6e 67 3b 0a l;.using.UnityEngine.Profiling;.
1140 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 3b 0a 75 73 69 6e 67 20 using.System.Collections;.using.
1160 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0a 75 73 69 6e System.Collections.Generic;.usin
1180 67 20 53 79 73 74 65 6d 2e 4c 69 6e 71 3b 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 54 4d 50 72 6f g.System.Linq;...namespace.TMPro
11a0 0a 7b 0a 20 20 20 20 70 75 62 6c 69 63 20 65 6e 75 6d 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 .{.....public.enum.AtlasPopulati
11c0 6f 6e 4d 6f 64 65 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 53 74 61 74 69 63 20 3d 20 30 78 onMode.....{.........Static.=.0x
11e0 30 2c 0a 20 20 20 20 20 20 20 20 44 79 6e 61 6d 69 63 20 3d 20 30 78 31 2c 0a 20 20 20 20 7d 0a 0,.........Dynamic.=.0x1,.....}.
1200 0a 0a 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 5d 0a 20 20 20 20 70 75 62 6c 69 63 20 ......[Serializable].....public.
1220 63 6c 61 73 73 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 20 3a 20 54 4d 50 5f 41 73 73 65 74 0a class.TMP_FontAsset.:.TMP_Asset.
1240 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 ....{.........///.<summary>.....
1260 20 20 20 20 2f 2f 2f 20 54 68 65 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 66 6f 6e 74 20 ....///.The.version.of.the.font.
1280 61 73 73 65 74 20 63 6c 61 73 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 56 65 72 73 69 6f 6e asset.class..........///.Version
12a0 20 31 2e 31 2e 30 20 61 64 64 73 20 73 75 70 70 6f 72 74 20 66 6f 72 20 74 68 65 20 6e 65 77 20 .1.1.0.adds.support.for.the.new.
12c0 54 65 78 74 43 6f 72 65 2e 46 6f 6e 74 45 6e 67 69 6e 65 20 61 6e 64 20 44 79 6e 61 6d 69 63 20 TextCore.FontEngine.and.Dynamic.
12e0 53 44 46 20 73 79 73 74 65 6d 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 SDF.system..........///.</summar
1300 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 76 65 72 73 69 6f 6e y>.........public.string.version
1320 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 .........{.............get.{.ret
1340 75 72 6e 20 6d 5f 56 65 72 73 69 6f 6e 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 urn.m_Version;.}.............int
1360 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 56 65 72 73 69 6f 6e 20 3d 20 76 61 6c 75 65 3b 20 7d ernal.set.{.m_Version.=.value;.}
1380 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 .........}.........[SerializeFie
13a0 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 6d 5f 56 65 72 ld].........private.string.m_Ver
13c0 73 69 6f 6e 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 sion;..........///.<summary>....
13e0 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 66 69 65 6c 64 20 69 73 20 73 65 74 20 77 68 65 6e 20 .....///.This.field.is.set.when.
1400 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 69 73 20 66 69 72 73 74 20 63 72 65 61 74 65 64 2e the.font.asset.is.first.created.
1420 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
1440 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 [SerializeField].........interna
1460 6c 20 73 74 72 69 6e 67 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 3b 0a 20 l.string.m_SourceFontFileGUID;..
1480 20 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 ................#if.UNITY_EDITOR
14a0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f .........///.<summary>........./
14c0 2f 2f 20 50 65 72 73 69 73 74 65 6e 74 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 73 //.Persistent.reference.to.the.s
14e0 6f 75 72 63 65 20 66 6f 6e 74 20 66 69 6c 65 20 6d 61 69 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 ource.font.file.maintained.in.th
1500 65 20 65 64 69 74 6f 72 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e e.editor..........///.</summary>
1520 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 .........[SerializeField].......
1540 20 20 69 6e 74 65 72 6e 61 6c 20 46 6f 6e 74 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 ..internal.Font.m_SourceFontFile
1560 5f 45 64 69 74 6f 72 52 65 66 3b 0a 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 20 20 20 _EditorRef;.........#endif......
1580 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 6f ....///.<summary>.........///.So
15a0 75 72 63 65 20 66 6f 6e 74 20 66 69 6c 65 20 77 68 65 6e 20 61 74 6c 61 73 20 70 6f 70 75 6c 61 urce.font.file.when.atlas.popula
15c0 74 69 6f 6e 20 6d 6f 64 65 20 69 73 20 73 65 74 20 74 6f 20 64 79 6e 61 6d 69 63 2e 20 4e 75 6c tion.mode.is.set.to.dynamic..Nul
15e0 6c 20 77 68 65 6e 20 74 68 65 20 61 74 6c 61 73 20 70 6f 70 75 6c 61 74 69 6f 6e 20 6d 6f 64 65 l.when.the.atlas.population.mode
1600 20 69 73 20 73 65 74 20 74 6f 20 73 74 61 74 69 63 2e 20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 .is.set.to.static...........///.
1620 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 46 6f 6e 74 20 73 </summary>.........public.Font.s
1640 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 ourceFontFile.........{.........
1660 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c ....get.{.return.m_SourceFontFil
1680 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 e;.}.............internal.set.{.
16a0 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 m_SourceFontFile.=.value;.}.....
16c0 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 ....}.........[SerializeField]..
16e0 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 46 6f 6e 74 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 .......private.Font.m_SourceFont
1700 46 69 6c 65 3b 0a 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 74 6c 61 73 50 6f 70 75 6c File;..........public.AtlasPopul
1720 61 74 69 6f 6e 4d 6f 64 65 20 61 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 0a 20 20 ationMode.atlasPopulationMode...
1740 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e ......{.............get.{.return
1760 20 6d 5f 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 3b 20 7d 0a 0a 20 20 20 20 20 .m_AtlasPopulationMode;.}.......
1780 20 20 20 20 20 20 20 73 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 .......set.............{........
17a0 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d .........m_AtlasPopulationMode.=
17c0 20 76 61 6c 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 .value;..................#if.UNI
17e0 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f TY_EDITOR.................if.(m_
1800 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c 61 73 50 6f 70 75 AtlasPopulationMode.==.AtlasPopu
1820 6c 61 74 69 6f 6e 4d 6f 64 65 2e 53 74 61 74 69 63 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 lationMode.Static)..............
1840 20 20 20 20 20 20 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 20 3d 20 6e 75 6c 6c 3b 0a .......m_SourceFontFile.=.null;.
1860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 41 74 6c 61 73 ................else.if.(m_Atlas
1880 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f PopulationMode.==.AtlasPopulatio
18a0 6e 4d 6f 64 65 2e 44 79 6e 61 6d 69 63 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nMode.Dynamic)..................
18c0 20 20 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 20 3d 20 6d 5f 53 6f 75 72 63 65 46 6f ...m_SourceFontFile.=.m_SourceFo
18e0 6e 74 46 69 6c 65 5f 45 64 69 74 6f 72 52 65 66 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntFile_EditorRef;...............
1900 20 20 23 65 6e 64 69 66 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d ..#endif.............}.........}
1920 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 .........[SerializeField].......
1940 20 20 70 72 69 76 61 74 65 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 6d 5f ..private.AtlasPopulationMode.m_
1960 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 3b 0a 0a 0a 20 20 20 20 20 20 20 20 2f AtlasPopulationMode;.........../
1980 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 66 6f 72 6d 61 //.<summary>.........///.Informa
19a0 74 69 6f 6e 20 61 62 6f 75 74 20 74 68 65 20 66 6f 6e 74 20 66 61 63 65 2e 0a 20 20 20 20 20 20 tion.about.the.font.face........
19c0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 ..///.</summary>.........public.
19e0 46 61 63 65 49 6e 66 6f 20 66 61 63 65 49 6e 66 6f 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 FaceInfo.faceInfo.........{.....
1a00 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 46 61 63 65 49 6e 66 6f 3b ........get.{.return.m_FaceInfo;
1a20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f .}.............internal.set.{.m_
1a40 46 61 63 65 49 6e 66 6f 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 FaceInfo.=.value;.}.........}...
1a60 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 ......[SerializeField].........p
1a80 72 69 76 61 74 65 20 46 61 63 65 49 6e 66 6f 20 6d 5f 46 61 63 65 49 6e 66 6f 3b 0a 0a 0a 20 20 rivate.FaceInfo.m_FaceInfo;.....
1aa0 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ......///.<summary>.........///.
1ac0 4c 69 73 74 20 6f 66 20 67 6c 79 70 68 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 List.of.glyphs.contained.in.the.
1ae0 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 font.asset..........///.</summar
1b00 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4c 69 73 74 3c 47 6c 79 70 68 3e 20 67 6c y>.........public.List<Glyph>.gl
1b20 79 70 68 54 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 yphTable.........{.............g
1b40 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 3b 20 7d 0a 20 20 20 20 et.{.return.m_GlyphTable;.}.....
1b60 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 47 6c 79 70 68 54 61 ........internal.set.{.m_GlyphTa
1b80 62 6c 65 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 ble.=.value;.}.........}........
1ba0 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 .[SerializeField].........privat
1bc0 65 20 4c 69 73 74 3c 47 6c 79 70 68 3e 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 20 3d 20 6e 65 77 e.List<Glyph>.m_GlyphTable.=.new
1be0 20 4c 69 73 74 3c 47 6c 79 70 68 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 .List<Glyph>();..........///.<su
1c00 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 69 63 74 69 6f 6e 61 72 79 20 75 73 mmary>.........///.Dictionary.us
1c20 65 64 20 74 6f 20 6c 6f 6f 6b 75 70 20 67 6c 79 70 68 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e ed.to.lookup.glyphs.contained.in
1c40 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 62 79 20 74 68 65 69 72 20 69 6e 64 65 78 2e 0a .the.font.asset.by.their.index..
1c60 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 ........///.</summary>.........p
1c80 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 75 69 6e 74 2c 20 47 6c 79 70 68 3e 20 67 6c ublic.Dictionary<uint,.Glyph>.gl
1ca0 79 70 68 4c 6f 6f 6b 75 70 54 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 yphLookupTable.........{........
1cc0 20 20 20 20 20 67 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 .....get.............{..........
1ce0 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 .......if.(m_GlyphLookupDictiona
1d00 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ry.==.null).....................
1d20 52 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 0a 20 20 20 20 ReadFontAssetDefinition();......
1d40 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 ............return.m_GlyphLookup
1d60 44 69 63 74 69 6f 6e 61 72 79 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 Dictionary;.............}.......
1d80 20 20 7d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 44 69 63 74 69 6f 6e 61 72 79 3c 75 ..}.........private.Dictionary<u
1da0 69 6e 74 2c 20 47 6c 79 70 68 3e 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e int,.Glyph>.m_GlyphLookupDiction
1dc0 61 72 79 3b 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 ary;...........///.<summary>....
1de0 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 63 68 61 .....///.List.containing.the.cha
1e00 72 61 63 74 65 72 73 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20 66 6f 6e 74 20 61 73 73 65 74 2e racters.of.the.given.font.asset.
1e20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
1e40 70 75 62 6c 69 63 20 4c 69 73 74 3c 54 4d 50 5f 43 68 61 72 61 63 74 65 72 3e 20 63 68 61 72 61 public.List<TMP_Character>.chara
1e60 63 74 65 72 54 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 cterTable.........{.............
1e80 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 3b 20 7d get.{.return.m_CharacterTable;.}
1ea0 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 43 68 .............internal.set.{.m_Ch
1ec0 61 72 61 63 74 65 72 54 61 62 6c 65 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 aracterTable.=.value;.}.........
1ee0 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 }.........[SerializeField]......
1f00 20 20 20 70 72 69 76 61 74 65 20 4c 69 73 74 3c 54 4d 50 5f 43 68 61 72 61 63 74 65 72 3e 20 6d ...private.List<TMP_Character>.m
1f20 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 20 3d 20 6e 65 77 20 4c 69 73 74 3c 54 4d 50 5f 43 _CharacterTable.=.new.List<TMP_C
1f40 68 61 72 61 63 74 65 72 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 haracter>();..........///.<summa
1f60 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 69 63 74 69 6f 6e 61 72 79 20 75 73 65 64 20 ry>.........///.Dictionary.used.
1f80 74 6f 20 6c 6f 6f 6b 75 70 20 63 68 61 72 61 63 74 65 72 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 to.lookup.characters.contained.i
1fa0 6e 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 62 79 20 74 68 65 69 72 20 75 6e 69 63 6f 64 n.the.font.asset.by.their.unicod
1fc0 65 20 76 61 6c 75 65 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e e.values..........///.</summary>
1fe0 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 69 63 74 69 6f 6e 61 72 79 3c 75 69 6e 74 2c .........public.Dictionary<uint,
2000 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 3e 20 63 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 54 .TMP_Character>.characterLookupT
2020 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0a 20 able.........{.............get..
2040 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ...........{.................if.
2060 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 (m_CharacterLookupDictionary.==.
2080 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 61 64 46 6f null).....................ReadFo
20a0 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 0a 0a 20 20 20 20 20 20 20 20 20 ntAssetDefinition();............
20c0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 .......return.m_CharacterLookupD
20e0 69 63 74 69 6f 6e 61 72 79 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 ictionary;.............}........
2100 20 7d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 44 69 63 74 69 6f 6e 61 72 79 3c 75 69 .}.........private.Dictionary<ui
2120 6e 74 2c 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 3e 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f nt,.TMP_Character>.m_CharacterLo
2140 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 3b 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 okupDictionary;...........///.<s
2160 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 66 6f 6e 74 20 61 74 6c ummary>.........///.The.font.atl
2180 61 73 20 75 73 65 64 20 62 79 20 74 68 69 73 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 as.used.by.this.font.asset......
21a0 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 61 6c 77 61 79 73 20 74 68 65 20 74 65 78 74 75 ....///.This.is.always.the.textu
21c0 72 65 20 61 74 20 69 6e 64 65 78 20 5b 30 5d 20 6f 66 20 74 68 65 20 66 6f 6e 74 41 74 6c 61 73 re.at.index.[0].of.the.fontAtlas
21e0 54 65 78 74 75 72 65 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e Textures..........///.</summary>
2200 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 65 78 74 75 72 65 32 44 20 61 74 6c 61 73 54 .........public.Texture2D.atlasT
2220 65 78 74 75 72 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 exture.........{.............get
2240 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 .............{.................i
2260 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 f.(m_AtlasTexture.==.null)......
2280 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
22a0 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 20 3d 20 61 74 6c 61 73 54 65 78 74 75 72 65 73 5b .m_AtlasTexture.=.atlasTextures[
22c0 30 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 0];.................}...........
22e0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 3b 0a 20 20 .......return.m_AtlasTexture;...
2300 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 70 72 ..........}.........}.........pr
2320 69 76 61 74 65 20 54 65 78 74 75 72 65 32 44 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 3b 0a ivate.Texture2D.m_AtlasTexture;.
2340 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f .........///.<summary>........./
2360 2f 2f 20 41 72 72 61 79 20 6f 66 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 73 20 74 68 61 74 20 //.Array.of.atlas.textures.that.
2380 63 6f 6e 74 61 69 6e 20 74 68 65 20 67 6c 79 70 68 73 20 75 73 65 64 20 62 79 20 74 68 69 73 20 contain.the.glyphs.used.by.this.
23a0 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 font.asset..........///.</summar
23c0 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 65 78 74 75 72 65 32 44 5b 5d 20 61 74 y>.........public.Texture2D[].at
23e0 6c 61 73 54 65 78 74 75 72 65 73 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 lasTextures.........{...........
2400 20 20 67 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..get.............{.............
2420 20 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 20 3d 3d 20 6e 75 6c 6c 29 ....if.(m_AtlasTextures.==.null)
2440 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
2460 20 20 20 20 20 20 20 2f 2f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 .......//.................}.....
2480 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 .............return.m_AtlasTextu
24a0 72 65 73 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 res;.............}..............
24c0 73 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 set.............{...............
24e0 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 20 3d 20 76 61 6c 75 65 3b 0a 20 20 20 20 20 ..m_AtlasTextures.=.value;......
2500 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 .......}.........}.........[Seri
2520 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 54 65 78 74 alizeField].........private.Text
2540 75 72 65 32 44 5b 5d 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 3b 0a 0a 20 20 20 20 20 20 ure2D[].m_AtlasTextures;........
2560 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 64 65 ..///.<summary>.........///.Inde
2580 78 20 6f 66 20 74 68 65 20 66 6f 6e 74 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 74 68 61 74 x.of.the.font.atlas.texture.that
25a0 20 73 74 69 6c 6c 20 68 61 73 20 61 76 61 69 6c 61 62 6c 65 20 73 70 61 63 65 20 74 6f 20 61 64 .still.has.available.space.to.ad
25c0 64 20 6e 65 77 20 67 6c 79 70 68 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d d.new.glyphs..........///.</summ
25e0 61 72 79 3e 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 ary>.........[SerializeField]...
2600 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 69 6e 74 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 ......internal.int.m_AtlasTextur
2620 65 49 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 eIndex;..........///.<summary>..
2640 20 20 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 73 70 61 63 65 73 20 6f 63 63 75 70 69 .......///.List.of.spaces.occupi
2660 65 64 20 62 79 20 67 6c 79 70 68 73 20 69 6e 20 61 20 67 69 76 65 6e 20 74 65 78 74 75 72 65 2e ed.by.glyphs.in.a.given.texture.
2680 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
26a0 69 6e 74 65 72 6e 61 6c 20 4c 69 73 74 3c 47 6c 79 70 68 52 65 63 74 3e 20 75 73 65 64 47 6c 79 internal.List<GlyphRect>.usedGly
26c0 70 68 52 65 63 74 73 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 phRects.........{.............ge
26e0 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 3b 20 7d 0a 20 t.{.return.m_UsedGlyphRects;.}..
2700 20 20 20 20 20 20 20 20 20 20 20 73 65 74 20 7b 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 ...........set.{.m_UsedGlyphRect
2720 73 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b s.=.value;.}.........}.........[
2740 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 SerializeField].........private.
2760 4c 69 73 74 3c 47 6c 79 70 68 52 65 63 74 3e 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 List<GlyphRect>.m_UsedGlyphRects
2780 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 ;..........///.<summary>........
27a0 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 73 70 61 63 65 73 20 61 76 61 69 6c 61 62 6c 65 20 69 6e .///.List.of.spaces.available.in
27c0 20 61 20 67 69 76 65 6e 20 74 65 78 74 75 72 65 20 74 6f 20 61 64 64 20 6e 65 77 20 67 6c 79 70 .a.given.texture.to.add.new.glyp
27e0 68 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 hs..........///.</summary>......
2800 20 20 20 69 6e 74 65 72 6e 61 6c 20 4c 69 73 74 3c 47 6c 79 70 68 52 65 63 74 3e 20 66 72 65 65 ...internal.List<GlyphRect>.free
2820 47 6c 79 70 68 52 65 63 74 73 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 GlyphRects.........{............
2840 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 46 72 65 65 47 6c 79 70 68 52 65 63 74 73 3b 20 .get.{.return.m_FreeGlyphRects;.
2860 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 20 7b 20 6d 5f 46 72 65 65 47 6c 79 70 68 52 }.............set.{.m_FreeGlyphR
2880 65 63 74 73 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 ects.=.value;.}.........}.......
28a0 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 ..[SerializeField].........priva
28c0 74 65 20 4c 69 73 74 3c 47 6c 79 70 68 52 65 63 74 3e 20 6d 5f 46 72 65 65 47 6c 79 70 68 52 65 te.List<GlyphRect>.m_FreeGlyphRe
28e0 63 74 73 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 cts;..........///.<summary>.....
2900 20 20 20 20 2f 2f 2f 20 54 68 65 20 67 65 6e 65 72 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 ....///.The.general.information.
2920 61 62 6f 75 74 20 74 68 65 20 66 6f 6e 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 about.the.font..........///.This
2940 20 70 72 6f 70 65 72 74 79 20 61 6e 64 20 46 61 63 65 49 6e 66 6f 5f 4c 65 67 61 63 79 20 74 79 .property.and.FaceInfo_Legacy.ty
2960 70 65 20 61 72 65 20 6e 6f 74 20 6c 6f 6e 67 65 72 20 75 73 65 64 20 69 6e 20 76 65 72 73 69 6f pe.are.not.longer.used.in.versio
2980 6e 20 31 2e 31 2e 30 20 6f 66 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 n.1.1.0.of.the.font.asset.......
29a0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 09 09 5b 4f 62 73 6f 6c 65 74 65 28 22 54 ...///.</summary>...[Obsolete("T
29c0 68 65 20 66 6f 6e 74 49 6e 66 6f 20 70 72 6f 70 65 72 74 79 20 61 6e 64 20 75 6e 64 65 72 6c 79 he.fontInfo.property.and.underly
29e0 69 6e 67 20 74 79 70 65 20 69 73 20 6e 6f 77 20 6f 62 73 6f 6c 65 74 65 2e 20 50 6c 65 61 73 65 ing.type.is.now.obsolete..Please
2a00 20 75 73 65 20 74 68 65 20 66 61 63 65 49 6e 66 6f 20 70 72 6f 70 65 72 74 79 20 61 6e 64 20 46 .use.the.faceInfo.property.and.F
2a20 61 63 65 49 6e 66 6f 20 74 79 70 65 20 69 6e 73 74 65 61 64 2e 22 29 5d 0a 20 20 20 20 20 20 20 aceInfo.type.instead.")]........
2a40 20 70 75 62 6c 69 63 20 46 61 63 65 49 6e 66 6f 5f 4c 65 67 61 63 79 20 66 6f 6e 74 49 6e 66 6f .public.FaceInfo_Legacy.fontInfo
2a60 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 .........{.............get.{.ret
2a80 75 72 6e 20 6d 5f 66 6f 6e 74 49 6e 66 6f 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 urn.m_fontInfo;.}.........}.....
2aa0 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 .....[SerializeField].........pr
2ac0 69 76 61 74 65 20 46 61 63 65 49 6e 66 6f 5f 4c 65 67 61 63 79 20 6d 5f 66 6f 6e 74 49 6e 66 6f ivate.FaceInfo_Legacy.m_fontInfo
2ae0 20 3d 20 6e 75 6c 6c 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a .=.null;..........///.<summary>.
2b00 20 20 20 20 20 20 20 20 2f 2f 2f 20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ........///..........///.</summa
2b20 72 79 3e 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 ry>.........[SerializeField]....
2b40 20 20 20 20 20 70 75 62 6c 69 63 20 54 65 78 74 75 72 65 32 44 20 61 74 6c 61 73 3b 20 2f 2f 20 .....public.Texture2D.atlas;.//.
2b60 53 68 6f 75 6c 64 20 61 64 64 20 61 20 70 72 6f 70 65 72 74 79 20 74 6f 20 6d 61 6b 65 20 74 68 Should.add.a.property.to.make.th
2b80 69 73 20 72 65 61 64 2d 6f 6e 6c 79 2e 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d is.read-only...........///.<summ
2ba0 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 77 69 64 74 68 20 6f 66 20 74 68 ary>.........///.The.width.of.th
2bc0 65 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 28 73 29 20 75 73 65 64 20 62 79 20 74 68 69 73 20 e.atlas.texture(s).used.by.this.
2be0 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 font.asset..........///.</summar
2c00 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 61 74 6c 61 73 57 69 64 74 68 y>.........public.int.atlasWidth
2c20 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 .........{.............get.{.ret
2c40 75 72 6e 20 6d 5f 41 74 6c 61 73 57 69 64 74 68 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 urn.m_AtlasWidth;.}.............
2c60 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 41 74 6c 61 73 57 69 64 74 68 20 3d 20 76 61 internal.set.{.m_AtlasWidth.=.va
2c80 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c lue;.}.........}.........[Serial
2ca0 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 6d 5f izeField].........private.int.m_
2cc0 41 74 6c 61 73 57 69 64 74 68 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 AtlasWidth;..........///.<summar
2ce0 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 68 65 69 67 68 74 20 6f 66 20 74 68 65 y>.........///.The.height.of.the
2d00 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 28 73 29 20 75 73 65 64 20 62 79 20 74 68 69 73 20 66 .atlas.texture(s).used.by.this.f
2d20 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 ont.asset..........///.</summary
2d40 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 61 74 6c 61 73 48 65 69 67 68 74 >.........public.int.atlasHeight
2d60 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 .........{.............get.{.ret
2d80 75 72 6e 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 urn.m_AtlasHeight;.}............
2da0 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 20 3d 20 .internal.set.{.m_AtlasHeight.=.
2dc0 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 value;.}.........}.........[Seri
2de0 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 alizeField].........private.int.
2e00 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d m_AtlasHeight;..........///.<sum
2e20 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 70 61 64 64 69 6e 67 20 75 73 mary>.........///.The.padding.us
2e40 65 64 20 62 65 74 77 65 65 6e 20 67 6c 79 70 68 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 ed.between.glyphs.contained.in.t
2e60 68 65 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 28 73 29 20 75 73 65 64 20 62 79 20 74 68 69 73 he.atlas.texture(s).used.by.this
2e80 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 .font.asset..........///.</summa
2ea0 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 61 74 6c 61 73 50 61 64 64 ry>.........public.int.atlasPadd
2ec0 69 6e 67 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 ing.........{.............get.{.
2ee0 72 65 74 75 72 6e 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 3b 20 7d 0a 20 20 20 20 20 20 20 return.m_AtlasPadding;.}........
2f00 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 .....internal.set.{.m_AtlasPaddi
2f20 6e 67 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 ng.=.value;.}.........}.........
2f40 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 [SerializeField].........private
2f60 20 69 6e 74 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 3b 0a 0a 20 20 20 20 20 20 20 20 70 75 .int.m_AtlasPadding;..........pu
2f80 62 6c 69 63 20 47 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 20 61 74 6c 61 73 52 65 6e 64 65 72 blic.GlyphRenderMode.atlasRender
2fa0 4d 6f 64 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 7b Mode.........{.............get.{
2fc0 20 72 65 74 75 72 6e 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 3b 20 7d 0a 20 20 20 .return.m_AtlasRenderMode;.}....
2fe0 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 41 74 6c 61 73 52 .........internal.set.{.m_AtlasR
3000 65 6e 64 65 72 4d 6f 64 65 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 enderMode.=.value;.}.........}..
3020 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 .......[SerializeField].........
3040 70 72 69 76 61 74 65 20 47 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 20 6d 5f 41 74 6c 61 73 52 private.GlyphRenderMode.m_AtlasR
3060 65 6e 64 65 72 4d 6f 64 65 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 4c 65 67 61 63 79 20 66 69 enderMode;..........//.Legacy.fi
3080 65 6c 64 20 74 68 61 74 20 77 69 6c 6c 20 65 76 65 6e 74 75 61 6c 6c 79 20 62 65 20 72 65 6d 6f eld.that.will.eventually.be.remo
30a0 76 65 64 2e 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 ved..........[SerializeField]...
30c0 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 4c 69 73 74 3c 54 4d 50 5f 47 6c 79 70 68 3e 20 6d ......internal.List<TMP_Glyph>.m
30e0 5f 67 6c 79 70 68 49 6e 66 6f 4c 69 73 74 3b 0a 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c _glyphInfoList;..........[Serial
3100 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 5b 46 6f 72 6d 65 72 6c 79 53 65 72 69 61 izeField].........[FormerlySeria
3120 6c 69 7a 65 64 41 73 28 22 6d 5f 6b 65 72 6e 69 6e 67 49 6e 66 6f 22 29 5d 0a 20 20 20 20 20 20 lizedAs("m_kerningInfo")].......
3140 20 20 69 6e 74 65 72 6e 61 6c 20 4b 65 72 6e 69 6e 67 54 61 62 6c 65 20 6d 5f 4b 65 72 6e 69 6e ..internal.KerningTable.m_Kernin
3160 67 54 61 62 6c 65 20 3d 20 6e 65 77 20 4b 65 72 6e 69 6e 67 54 61 62 6c 65 28 29 3b 0a 0a 20 20 gTable.=.new.KerningTable();....
3180 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ......///.<summary>.........///.
31a0 54 61 62 6c 65 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 76 61 72 69 6f 75 73 20 66 6f 6e Table.containing.the.various.fon
31c0 74 20 66 65 61 74 75 72 65 73 20 6f 66 20 74 68 69 73 20 66 6f 6e 74 20 61 73 73 65 74 2e 20 0a t.features.of.this.font.asset...
31e0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 ........///.</summary>.........p
3200 75 62 6c 69 63 20 54 4d 50 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 20 66 6f 6e 74 46 ublic.TMP_FontFeatureTable.fontF
3220 65 61 74 75 72 65 54 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 eatureTable.........{...........
3240 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c ..get.{.return.m_FontFeatureTabl
3260 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 e;.}.............internal.set.{.
3280 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 m_FontFeatureTable.=.value;.}...
32a0 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d ......}.........[SerializeField]
32c0 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 54 4d 50 5f 46 6f 6e 74 46 65 61 74 75 72 65 .........private.TMP_FontFeature
32e0 54 61 62 6c 65 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 20 3d 20 6e 65 77 20 54 Table.m_FontFeatureTable.=.new.T
3300 4d 50 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 MP_FontFeatureTable();..........
3320 2f 2f 20 4c 65 67 61 63 79 20 66 69 65 6c 64 20 74 68 61 74 20 77 69 6c 6c 20 65 76 65 6e 74 75 //.Legacy.field.that.will.eventu
3340 61 6c 6c 79 20 62 65 20 72 65 6d 6f 76 65 64 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 ally.be.removed.........[Seriali
3360 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 23 70 72 61 67 6d 61 20 77 61 72 6e 69 6e 67 zeField].........#pragma.warning
3380 20 64 69 73 61 62 6c 65 20 30 36 34 39 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4c 69 .disable.0649.........private.Li
33a0 73 74 3c 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 3e 20 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 st<TMP_FontAsset>.fallbackFontAs
33c0 73 65 74 73 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 sets;..........///.<summary>....
33e0 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 46 61 6c .....///.List.containing.the.Fal
3400 6c 62 61 63 6b 20 66 6f 6e 74 20 61 73 73 65 74 73 20 66 6f 72 20 74 68 69 73 20 66 6f 6e 74 2e lback.font.assets.for.this.font.
3420 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
3440 70 75 62 6c 69 63 20 4c 69 73 74 3c 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 3e 20 66 61 6c 6c 62 public.List<TMP_FontAsset>.fallb
3460 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 ackFontAssetTable.........{.....
3480 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 46 61 6c 6c 62 61 63 6b 46 ........get.{.return.m_FallbackF
34a0 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 ontAssetTable;.}.............set
34c0 20 7b 20 6d 5f 46 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 20 3d 20 76 61 .{.m_FallbackFontAssetTable.=.va
34e0 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c lue;.}.........}.........[Serial
3500 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 4c 69 73 74 3c 54 4d izeField].........public.List<TM
3520 50 5f 46 6f 6e 74 41 73 73 65 74 3e 20 6d 5f 46 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 P_FontAsset>.m_FallbackFontAsset
3540 54 61 62 6c 65 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 Table;..........///.<summary>...
3560 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 73 65 74 74 69 6e 67 73 20 75 73 65 64 20 69 6e 20 74 ......///.The.settings.used.in.t
3580 68 65 20 46 6f 6e 74 20 41 73 73 65 74 20 43 72 65 61 74 6f 72 20 77 68 65 6e 20 74 68 69 73 20 he.Font.Asset.Creator.when.this.
35a0 66 6f 6e 74 20 61 73 73 65 74 20 77 61 73 20 63 72 65 61 74 65 64 20 6f 72 20 65 64 69 74 65 64 font.asset.was.created.or.edited
35c0 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 ..........///.</summary>........
35e0 20 70 75 62 6c 69 63 20 46 6f 6e 74 41 73 73 65 74 43 72 65 61 74 69 6f 6e 53 65 74 74 69 6e 67 .public.FontAssetCreationSetting
3600 73 20 63 72 65 61 74 69 6f 6e 53 65 74 74 69 6e 67 73 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 s.creationSettings.........{....
3620 20 20 20 20 20 20 20 20 20 67 65 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 43 72 65 61 74 69 6f 6e .........get.{.return.m_Creation
3640 53 65 74 74 69 6e 67 73 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 20 7b 20 6d 5f Settings;.}.............set.{.m_
3660 43 72 65 61 74 69 6f 6e 53 65 74 74 69 6e 67 73 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 CreationSettings.=.value;.}.....
3680 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 ....}.........[SerializeField]..
36a0 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 46 6f 6e 74 41 73 73 65 74 43 72 65 61 74 69 6f .......internal.FontAssetCreatio
36c0 6e 53 65 74 74 69 6e 67 73 20 6d 5f 43 72 65 61 74 69 6f 6e 53 65 74 74 69 6e 67 73 3b 0a 0a 20 nSettings.m_CreationSettings;...
36e0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f .......///.<summary>.........///
3700 20 41 72 72 61 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 66 6f 6e 74 20 61 73 73 65 74 73 20 74 6f .Array.containing.font.assets.to
3720 20 62 65 20 75 73 65 64 20 61 73 20 61 6c 74 65 72 6e 61 74 69 76 65 20 74 79 70 65 66 61 63 65 .be.used.as.alternative.typeface
3740 73 20 66 6f 72 20 74 68 65 20 76 61 72 69 6f 75 73 20 70 6f 74 65 6e 74 69 61 6c 20 66 6f 6e 74 s.for.the.various.potential.font
3760 20 77 65 69 67 68 74 73 20 6f 66 20 74 68 69 73 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 .weights.of.this.font.asset.....
3780 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c .....///.</summary>.........publ
37a0 69 63 20 54 4d 50 5f 46 6f 6e 74 57 65 69 67 68 74 50 61 69 72 5b 5d 20 66 6f 6e 74 57 65 69 67 ic.TMP_FontWeightPair[].fontWeig
37c0 68 74 54 61 62 6c 65 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 htTable.........{.............ge
37e0 74 20 7b 20 72 65 74 75 72 6e 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 54 61 62 6c 65 3b 20 7d 0a t.{.return.m_FontWeightTable;.}.
3800 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 65 74 20 7b 20 6d 5f 46 6f 6e ............internal.set.{.m_Fon
3820 74 57 65 69 67 68 74 54 61 62 6c 65 20 3d 20 76 61 6c 75 65 3b 20 7d 0a 20 20 20 20 20 20 20 20 tWeightTable.=.value;.}.........
3840 7d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 20 20 20 20 }.........[SerializeField]......
3860 20 20 20 70 72 69 76 61 74 65 20 54 4d 50 5f 46 6f 6e 74 57 65 69 67 68 74 50 61 69 72 5b 5d 20 ...private.TMP_FontWeightPair[].
3880 6d 5f 46 6f 6e 74 57 65 69 67 68 74 54 61 62 6c 65 20 3d 20 6e 65 77 20 54 4d 50 5f 46 6f 6e 74 m_FontWeightTable.=.new.TMP_Font
38a0 57 65 69 67 68 74 50 61 69 72 5b 31 30 5d 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 46 4f 4e 54 WeightPair[10];..........//.FONT
38c0 20 57 45 49 47 48 54 53 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 .WEIGHTS.........///.<summary>..
38e0 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 6e 74 20 77 65 69 67 68 74 73 20 75 73 65 64 20 62 79 20 .......///.Font.weights.used.by.
3900 66 6f 6e 74 20 61 73 73 65 74 20 70 72 69 6f 72 20 74 6f 20 76 65 72 73 69 6f 6e 20 31 2e 31 2e font.asset.prior.to.version.1.1.
3920 30 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 6c 65 67 61 63 79 20 61 6e 0..........///.This.is.legacy.an
3940 64 20 77 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 64 20 61 74 20 73 6f 6d 65 20 70 6f 69 6e 74 20 d.will.be.removed.at.some.point.
3960 69 6e 20 74 68 65 20 66 75 74 75 72 65 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d in.the.future..........///.</sum
3980 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0a 20 mary>.........[SerializeField]..
39a0 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 54 4d 50 5f 46 6f 6e 74 57 65 69 67 68 74 50 61 69 .......private.TMP_FontWeightPai
39c0 72 5b 5d 20 66 6f 6e 74 57 65 69 67 68 74 73 20 3d 20 6e 75 6c 6c 3b 0a 0a 20 20 20 20 20 20 20 r[].fontWeights.=.null;.........
39e0 20 2f 2f 70 72 69 76 61 74 65 20 69 6e 74 5b 5d 20 6d 5f 63 68 61 72 61 63 74 65 72 53 65 74 3b .//private.int[].m_characterSet;
3a00 20 2f 2f 20 41 72 72 61 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 6c 6c 20 74 68 65 20 63 68 61 .//.Array.containing.all.the.cha
3a20 72 61 63 74 65 72 73 20 69 6e 20 74 68 69 73 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 0a 20 20 20 racters.in.this.font.asset......
3a40 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 .....///.<summary>.........///.D
3a60 65 66 69 6e 65 73 20 74 68 65 20 64 69 6c 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 65 78 74 20 efines.the.dilation.of.the.text.
3a80 77 68 65 6e 20 75 73 69 6e 67 20 72 65 67 75 6c 61 72 20 73 74 79 6c 65 2e 0a 20 20 20 20 20 20 when.using.regular.style........
3aa0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 ..///.</summary>.........public.
3ac0 66 6c 6f 61 74 20 6e 6f 72 6d 61 6c 53 74 79 6c 65 20 3d 20 30 3b 0a 0a 20 20 20 20 20 20 20 20 float.normalStyle.=.0;..........
3ae0 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 73 70 ///.<summary>.........///.The.sp
3b00 61 63 69 6e 67 20 62 65 74 77 65 65 6e 20 63 68 61 72 61 63 74 65 72 73 20 77 68 65 6e 20 75 73 acing.between.characters.when.us
3b20 69 6e 67 20 72 65 67 75 6c 61 72 20 73 74 79 6c 65 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ing.regular.style..........///.<
3b40 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 6e /summary>.........public.float.n
3b60 6f 72 6d 61 6c 53 70 61 63 69 6e 67 4f 66 66 73 65 74 20 3d 20 30 3b 0a 0a 20 20 20 20 20 20 20 ormalSpacingOffset.=.0;.........
3b80 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 66 69 6e .///.<summary>.........///.Defin
3ba0 65 73 20 74 68 65 20 64 69 6c 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 65 78 74 20 77 68 65 6e es.the.dilation.of.the.text.when
3bc0 20 75 73 69 6e 67 20 62 6f 6c 64 20 73 74 79 6c 65 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c .using.bold.style..........///.<
3be0 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 62 /summary>.........public.float.b
3c00 6f 6c 64 53 74 79 6c 65 20 3d 20 30 2e 37 35 66 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c oldStyle.=.0.75f;..........///.<
3c20 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 73 70 61 63 69 6e 67 summary>.........///.The.spacing
3c40 20 62 65 74 77 65 65 6e 20 63 68 61 72 61 63 74 65 72 73 20 77 68 65 6e 20 75 73 69 6e 67 20 72 .between.characters.when.using.r
3c60 65 67 75 6c 61 72 20 73 74 79 6c 65 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d egular.style..........///.</summ
3c80 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 62 6f 6c 64 53 70 ary>.........public.float.boldSp
3ca0 61 63 69 6e 67 20 3d 20 37 66 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 acing.=.7f;..........///.<summar
3cc0 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 66 69 6e 65 73 20 74 68 65 20 73 6c 61 6e 74 y>.........///.Defines.the.slant
3ce0 20 6f 66 20 74 68 65 20 74 65 78 74 20 77 68 65 6e 20 75 73 69 6e 67 20 69 74 61 6c 69 63 20 73 .of.the.text.when.using.italic.s
3d00 74 79 6c 65 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 tyle..........///.</summary>....
3d20 20 20 20 20 20 70 75 62 6c 69 63 20 62 79 74 65 20 69 74 61 6c 69 63 53 74 79 6c 65 20 3d 20 33 .....public.byte.italicStyle.=.3
3d40 35 3b 0a 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 79 74 65 20 74 61 62 53 69 7a 65 20 5;..........public.byte.tabSize.
3d60 3d 20 31 30 3b 0a 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 79 74 65 20 6d 5f 6f 6c =.10;..........private.byte.m_ol
3d80 64 54 61 62 53 69 7a 65 3b 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 62 6f 6f 6c 20 dTabSize;.........internal.bool.
3da0 6d 5f 49 73 46 6f 6e 74 41 73 73 65 74 4c 6f 6f 6b 75 70 54 61 62 6c 65 73 44 69 72 74 79 20 3d m_IsFontAssetLookupTablesDirty.=
3dc0 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 .false;..........///.<summary>..
3de0 20 20 20 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 20 6e 65 77 20 69 6e 73 74 61 6e 63 65 20 6f .......///.Create.new.instance.o
3e00 66 20 61 20 66 6f 6e 74 20 61 73 73 65 74 20 75 73 69 6e 67 20 64 65 66 61 75 6c 74 20 73 65 74 f.a.font.asset.using.default.set
3e20 74 69 6e 67 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 tings..........///.</summary>...
3e40 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 66 6f 6e 74 22 3e 3c 2f 70 ......///.<param.name="font"></p
3e60 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 aram>.........///.<returns></ret
3e80 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 54 4d 50 5f urns>.........public.static.TMP_
3ea0 46 6f 6e 74 41 73 73 65 74 20 43 72 65 61 74 65 46 6f 6e 74 41 73 73 65 74 28 46 6f 6e 74 20 66 FontAsset.CreateFontAsset(Font.f
3ec0 6f 6e 74 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ont).........{.............retur
3ee0 6e 20 43 72 65 61 74 65 46 6f 6e 74 41 73 73 65 74 28 66 6f 6e 74 2c 20 39 30 2c 20 39 2c 20 47 n.CreateFontAsset(font,.90,.9,.G
3f00 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 2e 53 44 46 41 41 2c 20 31 30 32 34 2c 20 31 30 32 34 lyphRenderMode.SDFAA,.1024,.1024
3f20 2c 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 2e 44 79 6e 61 6d 69 63 29 3b 0a ,.AtlasPopulationMode.Dynamic);.
3f40 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ........}..........///.<summary>
3f60 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 72 65 61 74 65 20 6e 65 77 20 69 6e 73 74 61 6e 63 65 .........///.Create.new.instance
3f80 20 6f 66 20 61 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f .of.a.font.asset..........///.</
3fa0 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 summary>.........///.<param.name
3fc0 3d 22 66 6f 6e 74 22 3e 54 68 65 20 73 6f 75 72 63 65 20 66 6f 6e 74 20 66 69 6c 65 2e 3c 2f 70 ="font">The.source.font.file.</p
3fe0 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 aram>.........///.<param.name="s
4000 61 6d 70 6c 69 6e 67 50 6f 69 6e 74 53 69 7a 65 22 3e 54 68 65 20 73 61 6d 70 6c 69 6e 67 20 70 amplingPointSize">The.sampling.p
4020 6f 69 6e 74 20 73 69 7a 65 2e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c oint.size.</param>.........///.<
4040 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 74 6c 61 73 50 61 64 64 69 6e 67 22 3e 54 68 65 20 70 61 param.name="atlasPadding">The.pa
4060 64 64 69 6e 67 20 2f 20 73 70 72 65 61 64 20 62 65 74 77 65 65 6e 20 69 6e 64 69 76 69 64 75 61 dding./.spread.between.individua
4080 6c 20 67 6c 79 70 68 73 20 69 6e 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 3c 2f 70 61 72 l.glyphs.in.the.font.asset.</par
40a0 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 72 65 6e am>.........///.<param.name="ren
40c0 64 65 72 4d 6f 64 65 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 derMode"></param>.........///.<p
40e0 61 72 61 6d 20 6e 61 6d 65 3d 22 61 74 6c 61 73 57 69 64 74 68 22 3e 54 68 65 20 61 74 6c 61 73 aram.name="atlasWidth">The.atlas
4100 20 74 65 78 74 75 72 65 20 77 69 64 74 68 2e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 .texture.width.</param>.........
4120 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 74 6c 61 73 48 65 69 67 68 74 22 3e 54 68 ///.<param.name="atlasHeight">Th
4140 65 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 68 65 69 67 68 74 2e 3c 2f 70 61 72 61 6d 3e 0a e.atlas.texture.height.</param>.
4160 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 61 74 6c 61 73 50 6f ........///.<param.name="atlasPo
4180 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f pulationMode"></param>........./
41a0 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 //.<returns></returns>.........p
41c0 75 62 6c 69 63 20 73 74 61 74 69 63 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 20 43 72 65 61 74 ublic.static.TMP_FontAsset.Creat
41e0 65 46 6f 6e 74 41 73 73 65 74 28 46 6f 6e 74 20 66 6f 6e 74 2c 20 69 6e 74 20 73 61 6d 70 6c 69 eFontAsset(Font.font,.int.sampli
4200 6e 67 50 6f 69 6e 74 53 69 7a 65 2c 20 69 6e 74 20 61 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 47 ngPointSize,.int.atlasPadding,.G
4220 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 20 72 65 6e 64 65 72 4d 6f 64 65 2c 20 69 6e 74 20 61 lyphRenderMode.renderMode,.int.a
4240 74 6c 61 73 57 69 64 74 68 2c 20 69 6e 74 20 61 74 6c 61 73 48 65 69 67 68 74 2c 20 41 74 6c 61 tlasWidth,.int.atlasHeight,.Atla
4260 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 61 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d sPopulationMode.atlasPopulationM
4280 6f 64 65 20 3d 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 2e 44 79 6e 61 6d 69 ode.=.AtlasPopulationMode.Dynami
42a0 63 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 46 6f 6e c).........{.............TMP_Fon
42c0 74 41 73 73 65 74 20 66 6f 6e 74 41 73 73 65 74 20 3d 20 53 63 72 69 70 74 61 62 6c 65 4f 62 6a tAsset.fontAsset.=.ScriptableObj
42e0 65 63 74 2e 43 72 65 61 74 65 49 6e 73 74 61 6e 63 65 3c 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 ect.CreateInstance<TMP_FontAsset
4300 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 6d 5f 56 65 >();..............fontAsset.m_Ve
4320 72 73 69 6f 6e 20 3d 20 22 31 2e 31 2e 30 22 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f rsion.=."1.1.0";..............//
4340 20 53 65 74 20 66 61 63 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 .Set.face.information...........
4360 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 49 6e 69 74 69 61 6c 69 7a 65 46 6f 6e 74 45 6e 67 69 6e ..FontEngine.InitializeFontEngin
4380 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 4c 6f 61 64 e();.............FontEngine.Load
43a0 46 6f 6e 74 46 61 63 65 28 66 6f 6e 74 2c 20 73 61 6d 70 6c 69 6e 67 50 6f 69 6e 74 53 69 7a 65 FontFace(font,.samplingPointSize
43c0 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e );..............fontAsset.faceIn
43e0 66 6f 20 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 46 61 63 65 49 6e 66 6f 28 29 3b 0a 0a fo.=.FontEngine.GetFaceInfo();..
4400 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 66 6f 6e 74 20 72 65 66 65 72 65 6e 63 ............//.Set.font.referenc
4420 65 20 61 6e 64 20 47 55 49 44 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 74 6c 61 73 e.and.GUID.............if.(atlas
4440 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f PopulationMode.==.AtlasPopulatio
4460 6e 4d 6f 64 65 2e 44 79 6e 61 6d 69 63 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 nMode.Dynamic).................f
4480 6f 6e 74 41 73 73 65 74 2e 73 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 20 3d 20 66 6f 6e 74 3b 0a ontAsset.sourceFontFile.=.font;.
44a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 70 65 72 73 69 73 74 65 6e 74 20 72 .............//.Set.persistent.r
44c0 65 66 65 72 65 6e 63 65 20 74 6f 20 73 6f 75 72 63 65 20 66 6f 6e 74 20 66 69 6c 65 20 69 6e 20 eference.to.source.font.file.in.
44e0 74 68 65 20 45 64 69 74 6f 72 20 6f 6e 6c 79 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 the.Editor.only..............#if
4500 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 69 74 79 45 .UNITY_EDITOR.............UnityE
4520 64 69 74 6f 72 2e 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 54 72 79 47 65 74 47 55 49 44 41 6e ditor.AssetDatabase.TryGetGUIDAn
4540 64 4c 6f 63 61 6c 46 69 6c 65 49 64 65 6e 74 69 66 69 65 72 28 66 6f 6e 74 2c 20 6f 75 74 20 73 dLocalFileIdentifier(font,.out.s
4560 74 72 69 6e 67 20 67 75 69 64 2c 20 6f 75 74 20 6c 6f 6e 67 20 6c 6f 63 61 6c 49 44 29 3b 0a 20 tring.guid,.out.long.localID);..
4580 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 6d 5f 53 6f 75 72 63 65 46 6f 6e ...........fontAsset.m_SourceFon
45a0 74 46 69 6c 65 47 55 49 44 20 3d 20 67 75 69 64 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f tFileGUID.=.guid;.............fo
45c0 6e 74 41 73 73 65 74 2e 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 5f 45 64 69 74 6f 72 52 ntAsset.m_SourceFontFile_EditorR
45e0 65 66 20 3d 20 66 6f 6e 74 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 ef.=.font;.............#endif...
4600 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 50 6f 70 75 6c 61 ...........fontAsset.atlasPopula
4620 74 69 6f 6e 4d 6f 64 65 20 3d 20 61 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 3b 0a tionMode.=.atlasPopulationMode;.
4640 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 57 69 64 74 .............fontAsset.atlasWidt
4660 68 20 3d 20 61 74 6c 61 73 57 69 64 74 68 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 h.=.atlasWidth;.............font
4680 41 73 73 65 74 2e 61 74 6c 61 73 48 65 69 67 68 74 20 3d 20 61 74 6c 61 73 48 65 69 67 68 74 3b Asset.atlasHeight.=.atlasHeight;
46a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 50 61 64 64 .............fontAsset.atlasPadd
46c0 69 6e 67 20 3d 20 61 74 6c 61 73 50 61 64 64 69 6e 67 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ing.=.atlasPadding;.............
46e0 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 3d 20 72 65 6e 64 fontAsset.atlasRenderMode.=.rend
4700 65 72 4d 6f 64 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 6c 69 erMode;..............//.Initiali
4720 7a 65 20 61 72 72 61 79 20 66 6f 72 20 74 68 65 20 66 6f 6e 74 20 61 74 6c 61 73 20 74 65 78 74 ze.array.for.the.font.atlas.text
4740 75 72 65 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 ures..............fontAsset.atla
4760 73 54 65 78 74 75 72 65 73 20 3d 20 6e 65 77 20 54 65 78 74 75 72 65 32 44 5b 31 5d 3b 0a 0a 20 sTextures.=.new.Texture2D[1];...
4780 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 61 6e 64 20 61 64 64 20 66 6f 6e ...........//.Create.and.add.fon
47a0 74 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 65 78 t.atlas.texture..............Tex
47c0 74 75 72 65 32 44 20 74 65 78 74 75 72 65 20 3d 20 6e 65 77 20 54 65 78 74 75 72 65 32 44 28 30 ture2D.texture.=.new.Texture2D(0
47e0 2c 20 30 2c 20 54 65 78 74 75 72 65 46 6f 72 6d 61 74 2e 41 6c 70 68 61 38 2c 20 66 61 6c 73 65 ,.0,.TextureFormat.Alpha8,.false
4800 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 74 65 78 74 75 72 65 2e 6e 61 6d 65 20 3d );..............//texture.name.=
4820 20 61 73 73 65 74 4e 61 6d 65 20 2b 20 22 20 41 74 6c 61 73 22 3b 0a 20 20 20 20 20 20 20 20 20 .assetName.+.".Atlas";..........
4840 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 54 65 78 74 75 72 65 73 5b 30 5d 20 3d 20 ...fontAsset.atlasTextures[0].=.
4860 74 65 78 74 75 72 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 66 72 65 texture;..............//.Add.fre
4880 65 20 72 65 63 74 61 6e 67 6c 65 20 6f 66 20 74 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 74 e.rectangle.of.the.size.of.the.t
48a0 65 78 74 75 72 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 70 61 63 6b 69 6e 67 4d exture..............int.packingM
48c0 6f 64 69 66 69 65 72 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 28 47 6c 79 70 68 odifier;.............if.(((Glyph
48e0 52 61 73 74 65 72 4d 6f 64 65 73 29 72 65 6e 64 65 72 4d 6f 64 65 20 26 20 47 6c 79 70 68 52 61 RasterModes)renderMode.&.GlyphRa
4900 73 74 65 72 4d 6f 64 65 73 2e 52 41 53 54 45 52 5f 4d 4f 44 45 5f 42 49 54 4d 41 50 29 20 3d 3d sterModes.RASTER_MODE_BITMAP).==
4920 20 47 6c 79 70 68 52 61 73 74 65 72 4d 6f 64 65 73 2e 52 41 53 54 45 52 5f 4d 4f 44 45 5f 42 49 .GlyphRasterModes.RASTER_MODE_BI
4940 54 4d 41 50 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 TMAP).............{.............
4960 20 20 20 20 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 20 3d 20 30 3b 0a 0a 20 20 20 20 20 20 ....packingModifier.=.0;........
4980 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 70 74 69 6d 69 7a 65 20 62 79 20 61 64 64 69 6e 67 20 ..........//.Optimize.by.adding.
49a0 73 74 61 74 69 63 20 72 65 66 20 74 6f 20 73 68 61 64 65 72 2e 0a 20 20 20 20 20 20 20 20 20 20 static.ref.to.shader............
49c0 20 20 20 20 20 20 4d 61 74 65 72 69 61 6c 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 20 3d 20 6e 65 ......Material.tmp_material.=.ne
49e0 77 20 4d 61 74 65 72 69 61 6c 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 53 68 61 64 65 w.Material(ShaderUtilities.Shade
4a00 72 52 65 66 5f 4d 6f 62 69 6c 65 42 69 74 6d 61 70 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 rRef_MobileBitmap);.............
4a20 20 20 20 20 20 2f 2f 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 6e 61 6d 65 20 3d 20 74 65 78 74 75 .....//tmp_material.name.=.textu
4a40 72 65 2e 6e 61 6d 65 20 2b 20 22 20 4d 61 74 65 72 69 61 6c 22 3b 0a 20 20 20 20 20 20 20 20 20 re.name.+.".Material";..........
4a60 20 20 20 20 20 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 54 65 78 74 75 72 65 28 53 .......tmp_material.SetTexture(S
4a80 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 2c 20 74 65 78 74 75 haderUtilities.ID_MainTex,.textu
4aa0 72 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 re);.................tmp_materia
4ac0 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 54 65 l.SetFloat(ShaderUtilities.ID_Te
4ae0 78 74 75 72 65 57 69 64 74 68 2c 20 61 74 6c 61 73 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 xtureWidth,.atlasWidth);........
4b00 20 20 20 20 20 20 20 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 .........tmp_material.SetFloat(S
4b20 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 54 65 78 74 75 72 65 48 65 69 67 68 74 2c haderUtilities.ID_TextureHeight,
4b40 20 61 74 6c 61 73 48 65 69 67 68 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .atlasHeight);..................
4b60 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 20 3d 20 74 6d 70 5f 6d 61 74 65 72 69 61 fontAsset.material.=.tmp_materia
4b80 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 l;.............}.............els
4ba0 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.............{.................
4bc0 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 20 3d 20 31 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 packingModifier.=.1;............
4be0 20 20 20 20 20 20 2f 2f 20 4f 70 74 69 6d 69 7a 65 20 62 79 20 61 64 64 69 6e 67 20 73 74 61 74 ......//.Optimize.by.adding.stat
4c00 69 63 20 72 65 66 20 74 6f 20 73 68 61 64 65 72 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ic.ref.to.shader................
4c20 20 20 4d 61 74 65 72 69 61 6c 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 20 3d 20 6e 65 77 20 4d 61 ..Material.tmp_material.=.new.Ma
4c40 74 65 72 69 61 6c 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 53 68 61 64 65 72 52 65 66 terial(ShaderUtilities.ShaderRef
4c60 5f 4d 6f 62 69 6c 65 53 44 46 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f _MobileSDF);..................//
4c80 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 6e 61 6d 65 20 3d 20 74 65 78 74 75 72 65 2e 6e 61 6d 65 tmp_material.name.=.texture.name
4ca0 20 2b 20 22 20 4d 61 74 65 72 69 61 6c 22 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .+.".Material";.................
4cc0 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 54 65 78 74 75 72 65 28 53 68 61 64 65 72 55 74 tmp_material.SetTexture(ShaderUt
4ce0 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 2c 20 74 65 78 74 75 72 65 29 3b 0a 20 20 ilities.ID_MainTex,.texture);...
4d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c ..............tmp_material.SetFl
4d20 6f 61 74 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 54 65 78 74 75 72 65 57 69 oat(ShaderUtilities.ID_TextureWi
4d40 64 74 68 2c 20 61 74 6c 61 73 57 69 64 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dth,.atlasWidth);...............
4d60 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 ..tmp_material.SetFloat(ShaderUt
4d80 69 6c 69 74 69 65 73 2e 49 44 5f 54 65 78 74 75 72 65 48 65 69 67 68 74 2c 20 61 74 6c 61 73 48 ilities.ID_TextureHeight,.atlasH
4da0 65 69 67 68 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6d 70 5f 6d 61 74 eight);..................tmp_mat
4dc0 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 erial.SetFloat(ShaderUtilities.I
4de0 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c 65 2c 20 61 74 6c 61 73 50 61 64 64 69 6e 67 20 2b 20 D_GradientScale,.atlasPadding.+.
4e00 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 packingModifier);...............
4e20 20 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 ...tmp_material.SetFloat(ShaderU
4e40 74 69 6c 69 74 69 65 73 2e 49 44 5f 57 65 69 67 68 74 4e 6f 72 6d 61 6c 2c 20 66 6f 6e 74 41 73 tilities.ID_WeightNormal,.fontAs
4e60 73 65 74 2e 6e 6f 72 6d 61 6c 53 74 79 6c 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 set.normalStyle);...............
4e80 20 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 ..tmp_material.SetFloat(ShaderUt
4ea0 69 6c 69 74 69 65 73 2e 49 44 5f 57 65 69 67 68 74 42 6f 6c 64 2c 20 66 6f 6e 74 41 73 73 65 74 ilities.ID_WeightBold,.fontAsset
4ec0 2e 62 6f 6c 64 53 74 79 6c 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f .boldStyle);..................fo
4ee0 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 20 3d 20 74 6d 70 5f 6d 61 74 65 72 69 61 6c 3b ntAsset.material.=.tmp_material;
4f00 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 .............}..............font
4f20 41 73 73 65 74 2e 66 72 65 65 47 6c 79 70 68 52 65 63 74 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c Asset.freeGlyphRects.=.new.List<
4f40 47 6c 79 70 68 52 65 63 74 3e 28 29 20 7b 20 6e 65 77 20 47 6c 79 70 68 52 65 63 74 28 30 2c 20 GlyphRect>().{.new.GlyphRect(0,.
4f60 30 2c 20 61 74 6c 61 73 57 69 64 74 68 20 2d 20 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 2c 0,.atlasWidth.-.packingModifier,
4f80 20 61 74 6c 61 73 48 65 69 67 68 74 20 2d 20 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 29 20 .atlasHeight.-.packingModifier).
4fa0 7d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 6e 74 41 73 73 65 74 2e 75 73 65 64 47 6c 79 };.............fontAsset.usedGly
4fc0 70 68 52 65 63 74 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 47 6c 79 70 68 52 65 63 74 3e 28 29 3b phRects.=.new.List<GlyphRect>();
4fe0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 43 6f 6e 73 69 64 65 72 20 ..............//.TODO:.Consider.
5000 61 64 64 69 6e 67 20 73 75 70 70 6f 72 74 20 66 6f 72 20 65 78 74 72 61 63 74 69 6e 67 20 67 6c adding.support.for.extracting.gl
5020 79 70 68 20 70 6f 73 69 74 69 6f 6e 69 6e 67 20 64 61 74 61 0a 0a 20 20 20 20 20 20 20 20 20 20 yph.positioning.data............
5040 20 20 66 6f 6e 74 41 73 73 65 74 2e 52 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 ..fontAsset.ReadFontAssetDefinit
5060 69 6f 6e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 6f 6e 74 41 ion();..............return.fontA
5080 73 73 65 74 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 41 sset;.........}...........void.A
50a0 77 61 6b 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 wake().........{.............//D
50c0 65 62 75 67 2e 4c 6f 67 28 22 54 4d 50 20 46 6f 6e 74 20 41 73 73 65 74 20 5b 22 20 2b 20 74 68 ebug.Log("TMP.Font.Asset.[".+.th
50e0 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 77 69 74 68 20 56 65 72 73 69 6f 6e 20 23 22 20 2b 20 6d is.name.+."].with.Version.#".+.m
5100 5f 56 65 72 73 69 6f 6e 20 2b 20 22 20 68 61 73 20 62 65 65 6e 20 65 6e 61 62 6c 65 64 21 22 29 _Version.+.".has.been.enabled!")
5120 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 76 65 72 73 69 6f 6e 20 ;..............//.Check.version.
5140 6e 75 6d 62 65 72 20 6f 66 20 66 6f 6e 74 20 61 73 73 65 74 20 74 6f 20 73 65 65 20 69 66 20 69 number.of.font.asset.to.see.if.i
5160 74 20 6e 65 65 64 73 20 74 6f 20 62 65 20 75 70 67 72 61 64 65 64 2e 0a 20 20 20 20 20 20 20 20 t.needs.to.be.upgraded..........
5180 20 20 20 20 69 66 20 28 74 68 69 73 2e 6d 61 74 65 72 69 61 6c 20 21 3d 20 6e 75 6c 6c 20 26 26 ....if.(this.material.!=.null.&&
51a0 20 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6d 5f 56 65 72 73 69 6f 6e 29 .string.IsNullOrEmpty(m_Version)
51c0 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 70 67 72 61 64 65 46 6f 6e 74 41 73 73 ).................UpgradeFontAss
51e0 65 74 28 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 23 69 66 20 55 4e et();.........}...........#if.UN
5200 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 4f 6e 56 61 6c 69 64 61 ITY_EDITOR.........void.OnValida
5220 74 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 te().........{.............//if.
5240 28 6d 5f 6f 6c 64 54 61 62 53 69 7a 65 20 21 3d 20 74 61 62 53 69 7a 65 29 0a 20 20 20 20 20 20 (m_oldTabSize.!=.tabSize).......
5260 20 20 20 20 20 20 2f 2f 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 6d 5f 6f 6c ......//{.............//....m_ol
5280 64 54 61 62 53 69 7a 65 20 3d 20 74 61 62 53 69 7a 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 dTabSize.=.tabSize;.............
52a0 2f 2f 20 20 20 20 52 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b //....ReadFontAssetDefinition();
52c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .............//}..............//
52e0 20 48 61 6e 64 6c 65 20 63 68 61 6e 67 65 73 20 74 6f 20 61 74 6c 61 73 20 70 6f 70 75 6c 61 74 .Handle.changes.to.atlas.populat
5300 69 6f 6e 20 6d 6f 64 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 5f 41 74 6c ion.mode.............//if.(m_Atl
5320 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 asPopulationMode.==.AtlasPopulat
5340 69 6f 6e 4d 6f 64 65 2e 53 74 61 74 69 63 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 ionMode.Static).............//..
5360 20 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 ..m_SourceFontFile.=.null;......
5380 20 20 20 20 20 20 20 2f 2f 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0a 20 20 .......//else.............//{...
53a0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 73 74 72 69 6e 67 20 70 61 74 68 20 3d 20 55 6e ..........//....string.path.=.Un
53c0 69 74 79 45 64 69 74 6f 72 2e 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 47 55 49 44 54 6f 41 73 ityEditor.AssetDatabase.GUIDToAs
53e0 73 65 74 50 61 74 68 28 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 29 3b 0a 0a setPath(m_SourceFontFileGUID);..
5400 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 70 61 74 68 20 21 3d 20 73 74 ............//....if.(path.!=.st
5420 72 69 6e 67 2e 45 6d 70 74 79 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 ring.Empty).............//......
5440 20 20 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 20 3d 20 55 6e 69 74 79 45 64 69 74 6f 72 ..m_SourceFontFile.=.UnityEditor
5460 2e 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 4c 6f 61 64 41 73 73 65 74 41 74 50 61 74 68 3c 46 .AssetDatabase.LoadAssetAtPath<F
5480 6f 6e 74 3e 28 70 61 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d 0a 20 20 20 20 ont>(path);.............//}.....
54a0 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 2f 2f ....}.........#endif..........//
54c0 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 61 64 20 74 68 65 /.<summary>.........///.Read.the
54e0 20 76 61 72 69 6f 75 73 20 64 61 74 61 20 74 61 62 6c 65 73 20 6f 66 20 74 68 65 20 66 6f 6e 74 .various.data.tables.of.the.font
5500 20 61 73 73 65 74 20 74 6f 20 70 6f 70 75 6c 61 74 65 20 69 74 73 20 64 69 66 66 65 72 65 6e 74 .asset.to.populate.its.different
5520 20 64 69 63 74 69 6f 6e 61 72 69 65 73 20 74 6f 20 61 6c 6c 6f 77 20 66 6f 72 20 66 61 73 74 65 .dictionaries.to.allow.for.faste
5540 72 20 6c 6f 6f 6b 75 70 20 6f 66 20 72 65 6c 61 74 65 64 20 66 6f 6e 74 20 61 73 73 65 74 20 64 r.lookup.of.related.font.asset.d
5560 61 74 61 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 ata..........///.</summary>.....
5580 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 49 6e 69 74 69 61 6c 69 7a 65 44 69 63 74 ....internal.void.InitializeDict
55a0 69 6f 6e 61 72 79 4c 6f 6f 6b 75 70 54 61 62 6c 65 73 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 ionaryLookupTables().........{..
55c0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 6e 65 77 20 69 6e 73 74 61 6e 63 ...........//.Create.new.instanc
55e0 65 20 6f 66 20 74 68 65 20 67 6c 79 70 68 20 6c 6f 6f 6b 75 70 20 64 69 63 74 69 6f 6e 61 72 79 e.of.the.glyph.lookup.dictionary
5600 20 6f 72 20 63 6c 65 61 72 20 74 68 65 20 65 78 69 73 74 69 6e 67 20 6f 6e 65 2e 0a 20 20 20 20 .or.clear.the.existing.one......
5620 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e ........if.(m_GlyphLookupDiction
5640 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 ary.==.null).................m_G
5660 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 20 6e 65 77 20 44 69 63 74 69 lyphLookupDictionary.=.new.Dicti
5680 6f 6e 61 72 79 3c 75 69 6e 74 2c 20 47 6c 79 70 68 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 onary<uint,.Glyph>();...........
56a0 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 4c 6f ..else.................m_GlyphLo
56c0 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 okupDictionary.Clear();.........
56e0 20 20 20 20 20 69 6e 74 20 67 6c 79 70 68 43 6f 75 6e 74 20 3d 20 6d 5f 47 6c 79 70 68 54 61 62 .....int.glyphCount.=.m_GlyphTab
5700 6c 65 2e 43 6f 75 6e 74 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 le.Count;..............//.Initia
5720 6c 69 7a 65 20 67 6c 79 70 68 20 69 6e 64 65 78 20 61 72 72 61 79 20 6f 72 20 63 6c 65 61 72 20 lize.glyph.index.array.or.clear.
5740 74 68 65 20 65 78 69 73 74 69 6e 67 20 6f 6e 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 the.existing.one..............if
5760 20 28 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 .(m_GlyphIndexList.==.null).....
5780 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 20 3d 20 6e ............m_GlyphIndexList.=.n
57a0 65 77 20 4c 69 73 74 3c 75 69 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 ew.List<uint>();.............els
57c0 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 e.................m_GlyphIndexLi
57e0 73 74 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 st.Clear();..............//.Add.
5800 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 the.characters.contained.in.the.
5820 63 68 61 72 61 63 74 65 72 20 74 61 62 6c 65 20 69 6e 74 6f 20 74 68 65 20 64 69 63 74 69 6f 6e character.table.into.the.diction
5840 61 72 79 20 66 6f 72 20 66 61 73 74 65 72 20 6c 6f 6f 6b 75 70 2e 0a 20 20 20 20 20 20 20 20 20 ary.for.faster.lookup...........
5860 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 67 6c 79 70 68 43 6f 75 6e ...for.(int.i.=.0;.i.<.glyphCoun
5880 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 t;.i++).............{...........
58a0 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 ......Glyph.glyph.=.m_GlyphTable
58c0 5b 69 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 69 6e 64 65 78 [i];..................uint.index
58e0 20 3d 20 67 6c 79 70 68 2e 69 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.glyph.index;.................
5900 20 2f 2f 20 54 4f 44 4f 3a 20 4e 6f 74 20 73 75 72 65 20 69 74 20 69 73 20 6e 65 63 65 73 73 61 .//.TODO:.Not.sure.it.is.necessa
5920 72 79 20 74 6f 20 63 68 65 63 6b 20 68 65 72 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ry.to.check.here................
5940 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f ..if.(m_GlyphLookupDictionary.Co
5960 6e 74 61 69 6e 73 4b 65 79 28 69 6e 64 65 78 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 ntainsKey(index).==.false)......
5980 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
59a0 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 69 6e 64 .m_GlyphLookupDictionary.Add(ind
59c0 65 78 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ex,.glyph);.....................
59e0 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2e 41 64 64 28 69 6e 64 65 78 29 3b 0a 20 20 20 m_GlyphIndexList.Add(index);....
5a00 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 .............}.............}....
5a20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 6e 65 77 20 69 6e 73 74 61 6e 63 65 ..........//.Create.new.instance
5a40 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 6c 6f 6f 6b 75 70 20 64 69 63 74 69 6f 6e .of.the.character.lookup.diction
5a60 61 72 79 20 6f 72 20 63 6c 65 61 72 20 74 68 65 20 65 78 69 73 74 69 6e 67 20 6f 6e 65 2e 0a 20 ary.or.clear.the.existing.one...
5a80 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 ...........if.(m_CharacterLookup
5aa0 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 Dictionary.==.null).............
5ac0 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 ....m_CharacterLookupDictionary.
5ae0 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 75 69 6e 74 2c 20 54 4d 50 5f 43 68 61 72 61 =.new.Dictionary<uint,.TMP_Chara
5b00 63 74 65 72 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0a 20 20 20 20 20 20 cter>();.............else.......
5b20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 ..........m_CharacterLookupDicti
5b40 6f 6e 61 72 79 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 onary.Clear();..............//.A
5b60 64 64 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 dd.the.characters.contained.in.t
5b80 68 65 20 63 68 61 72 61 63 74 65 72 20 74 61 62 6c 65 20 69 6e 74 6f 20 74 68 65 20 64 69 63 74 he.character.table.into.the.dict
5ba0 69 6f 6e 61 72 79 20 66 6f 72 20 66 61 73 74 65 72 20 6c 6f 6f 6b 75 70 2e 0a 20 20 20 20 20 20 ionary.for.faster.lookup........
5bc0 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 43 68 61 72 ......for.(int.i.=.0;.i.<.m_Char
5be0 61 63 74 65 72 54 61 62 6c 65 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 acterTable.Count;.i++)..........
5c00 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 43 68 61 72 61 63 74 ...{.................TMP_Charact
5c20 65 72 20 63 68 61 72 61 63 74 65 72 20 3d 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 5b er.character.=.m_CharacterTable[
5c40 69 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 75 6e 69 63 6f 64 i];..................uint.unicod
5c60 65 20 3d 20 63 68 61 72 61 63 74 65 72 2e 75 6e 69 63 6f 64 65 3b 0a 20 20 20 20 20 20 20 20 20 e.=.character.unicode;..........
5c80 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 20 3d 20 63 68 61 72 61 63 74 .......uint.glyphIndex.=.charact
5ca0 65 72 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 er.glyphIndex;..................
5cc0 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e if.(m_CharacterLookupDictionary.
5ce0 43 6f 6e 74 61 69 6e 73 4b 65 79 28 75 6e 69 63 6f 64 65 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 ContainsKey(unicode).==.false)..
5d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f ...................m_CharacterLo
5d20 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 68 61 72 okupDictionary.Add(unicode,.char
5d40 61 63 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 acter);..................if.(m_G
5d60 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 lyphLookupDictionary.ContainsKey
5d80 28 67 6c 79 70 68 49 6e 64 65 78 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a (glyphIndex)).................{.
5da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 2e 67 6c ....................character.gl
5dc0 79 70 68 20 3d 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 5b 67 6c yph.=.m_GlyphLookupDictionary[gl
5de0 79 70 68 49 6e 64 65 78 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 yphIndex];.................}....
5e00 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 70 67 72 61 .........}..............//.Upgra
5e20 64 65 20 47 6c 79 70 68 20 41 64 6a 75 73 74 6d 65 6e 74 20 54 61 62 6c 65 20 74 6f 20 74 68 65 de.Glyph.Adjustment.Table.to.the
5e40 20 6e 65 77 20 46 6f 6e 74 20 46 65 61 74 75 72 65 20 74 61 62 6c 65 20 61 6e 64 20 47 6c 79 70 .new.Font.Feature.table.and.Glyp
5e60 68 20 50 61 69 72 20 41 64 6a 75 73 74 6d 65 6e 74 20 52 65 63 6f 72 64 73 0a 20 20 20 20 20 20 h.Pair.Adjustment.Records.......
5e80 20 20 20 20 20 20 69 66 20 28 6d 5f 4b 65 72 6e 69 6e 67 54 61 62 6c 65 20 21 3d 20 6e 75 6c 6c ......if.(m_KerningTable.!=.null
5ea0 20 26 26 20 6d 5f 4b 65 72 6e 69 6e 67 54 61 62 6c 65 2e 6b 65 72 6e 69 6e 67 50 61 69 72 73 20 .&&.m_KerningTable.kerningPairs.
5ec0 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 4b 65 72 6e 69 6e 67 54 61 62 6c 65 2e 6b 65 72 6e 69 6e !=.null.&&.m_KerningTable.kernin
5ee0 67 50 61 69 72 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 gPairs.Count.>.0)...............
5f00 20 20 55 70 67 72 61 64 65 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 54 61 62 6c 65 54 6f 46 ..UpgradeGlyphAdjustmentTableToF
5f20 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ontFeatureTable();..............
5f40 2f 2f 20 52 65 61 64 20 46 6f 6e 74 20 46 65 61 74 75 72 65 73 20 77 68 69 63 68 20 77 69 6c 6c //.Read.Font.Features.which.will
5f60 20 69 6e 63 6c 75 64 65 20 6b 65 72 6e 69 6e 67 20 64 61 74 61 2e 0a 20 20 20 20 20 20 20 20 20 .include.kerning.data...........
5f80 20 20 20 69 66 20 28 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 ...if.(m_FontFeatureTable.m_Glyp
5fa0 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 4c 6f 6f 6b 75 70 44 69 63 74 69 hPairAdjustmentRecordLookupDicti
5fc0 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d onary.==.null).................m
5fe0 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a _FontFeatureTable.m_GlyphPairAdj
6000 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 20 ustmentRecordLookupDictionary.=.
6020 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 6c 6f 6e 67 2c 20 54 4d 50 5f 47 6c 79 70 68 50 61 new.Dictionary<long,.TMP_GlyphPa
6040 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 20 irAdjustmentRecord>();..........
6060 20 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 ...else.................m_FontFe
6080 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 atureTable.m_GlyphPairAdjustment
60a0 52 65 63 6f 72 64 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6c 65 61 72 28 29 3b 0a RecordLookupDictionary.Clear();.
60c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 4c 69 73 74 3c 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 .............List<TMP_GlyphPairA
60e0 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 3e 20 67 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 djustmentRecord>.glyphPairAdjust
6100 6d 65 6e 74 52 65 63 6f 72 64 73 20 3d 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 mentRecords.=.m_FontFeatureTable
6120 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 3b 0a 20 .m_GlyphPairAdjustmentRecords;..
6140 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 ...........if.(glyphPairAdjustme
6160 6e 74 52 65 63 6f 72 64 73 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b ntRecords.!=.null).............{
6180 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b .................for.(int.i.=.0;
61a0 20 69 20 3c 20 67 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 2e .i.<.glyphPairAdjustmentRecords.
61c0 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 Count;.i++).................{...
61e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 ..................TMP_GlyphPairA
6200 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 20 72 65 63 6f 72 64 20 3d 20 67 6c 79 70 68 50 61 djustmentRecord.record.=.glyphPa
6220 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 5b 69 5d 3b 0a 0a 20 20 20 20 20 20 20 irAdjustmentRecords[i];.........
6240 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 6e 67 20 6b 65 79 20 3d 20 6e 65 77 20 47 6c 79 70 .............long.key.=.new.Glyp
6260 68 50 61 69 72 4b 65 79 28 72 65 63 6f 72 64 29 2e 6b 65 79 3b 0a 0a 20 20 20 20 20 20 20 20 20 hPairKey(record).key;...........
6280 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f ...........m_FontFeatureTable.m_
62a0 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 4c 6f 6f 6b 75 70 44 GlyphPairAdjustmentRecordLookupD
62c0 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 6b 65 79 2c 20 72 65 63 6f 72 64 29 3b 0a 20 20 20 20 ictionary.Add(key,.record);.....
62e0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 ............}.............}.....
6300 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 ....}...........///.<summary>...
6320 20 20 20 20 20 20 2f 2f 2f 20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 ......///..........///.</summary
6340 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 52 65 61 64 46 6f 6e 74 41 73 >.........public.void.ReadFontAs
6360 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 setDefinition().........{.......
6380 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 52 65 61 64 69 6e 67 20 46 6f 6e 74 20 ......//Debug.Log("Reading.Font.
63a0 44 65 66 69 6e 69 74 69 6f 6e 20 66 6f 72 20 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 Definition.for.".+.this.name.+."
63c0 2e 22 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 76 65 72 73 69 .");..............//.Check.versi
63e0 6f 6e 20 6e 75 6d 62 65 72 20 6f 66 20 66 6f 6e 74 20 61 73 73 65 74 20 74 6f 20 73 65 65 20 69 on.number.of.font.asset.to.see.i
6400 66 20 69 74 20 6e 65 65 64 73 20 74 6f 20 62 65 20 75 70 67 72 61 64 65 64 2e 0a 20 20 20 20 20 f.it.needs.to.be.upgraded.......
6420 20 20 20 20 20 20 20 69 66 20 28 74 68 69 73 2e 6d 61 74 65 72 69 61 6c 20 21 3d 20 6e 75 6c 6c .......if.(this.material.!=.null
6440 20 26 26 20 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6d 5f 56 65 72 73 69 .&&.string.IsNullOrEmpty(m_Versi
6460 6f 6e 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 70 67 72 61 64 65 46 6f 6e 74 on)).................UpgradeFont
6480 41 73 73 65 74 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 6c Asset();..............//.Initial
64a0 69 7a 65 20 6c 6f 6f 6b 75 70 20 74 61 62 6c 65 73 20 66 6f 72 20 63 68 61 72 61 63 74 65 72 73 ize.lookup.tables.for.characters
64c0 20 61 6e 64 20 67 6c 79 70 68 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 69 74 69 61 6c .and.glyphs..............Initial
64e0 69 7a 65 44 69 63 74 69 6f 6e 61 72 79 4c 6f 6f 6b 75 70 54 61 62 6c 65 73 28 29 3b 0a 0a 20 20 izeDictionaryLookupTables();....
6500 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 54 61 62 20 63 68 61 72 28 39 29 20 74 6f 20 ..........//.Add.Tab.char(9).to.
6520 44 69 63 74 69 6f 6e 61 72 79 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 Dictionary..............if.(m_Ch
6540 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 aracterLookupDictionary.Contains
6560 4b 65 79 28 39 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 Key(9).==.false).............{..
6580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 6e 65 77 ...............Glyph.glyph.=.new
65a0 20 47 6c 79 70 68 28 30 2c 20 6e 65 77 20 47 6c 79 70 68 4d 65 74 72 69 63 73 28 30 2c 20 30 2c .Glyph(0,.new.GlyphMetrics(0,.0,
65c0 20 30 2c 20 30 2c 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 74 61 62 57 69 64 74 68 20 2a 20 74 61 62 .0,.0,.m_FaceInfo.tabWidth.*.tab
65e0 53 69 7a 65 29 2c 20 47 6c 79 70 68 52 65 63 74 2e 7a 65 72 6f 2c 20 31 2e 30 66 2c 20 30 29 3b Size),.GlyphRect.zero,.1.0f,.0);
6600 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b .................m_CharacterLook
6620 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 39 2c 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 upDictionary.Add(9,.new.TMP_Char
6640 61 63 74 65 72 28 39 2c 20 67 6c 79 70 68 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a acter(9,.glyph));.............}.
6660 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 4c 69 6e 65 66 65 65 64 20 4c 46 20 .............//.Add.Linefeed.LF.
6680 63 68 61 72 28 31 30 29 20 61 6e 64 20 43 61 72 72 69 61 67 65 20 52 65 74 75 72 6e 20 43 52 20 char(10).and.Carriage.Return.CR.
66a0 63 68 61 72 28 31 33 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 char(13).............if.(m_Chara
66c0 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 cterLookupDictionary.ContainsKey
66e0 28 31 30 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 (10).==.false).............{....
6700 20 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 6e 65 77 20 47 .............Glyph.glyph.=.new.G
6720 6c 79 70 68 28 30 2c 20 6e 65 77 20 47 6c 79 70 68 4d 65 74 72 69 63 73 28 31 30 2c 20 30 2c 20 lyph(0,.new.GlyphMetrics(10,.0,.
6740 30 2c 20 30 2c 20 30 29 2c 20 47 6c 79 70 68 52 65 63 74 2e 7a 65 72 6f 2c 20 31 2e 30 66 2c 20 0,.0,.0),.GlyphRect.zero,.1.0f,.
6760 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 0);.................m_CharacterL
6780 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 31 30 2c 20 6e 65 77 20 54 4d 50 5f ookupDictionary.Add(10,.new.TMP_
67a0 43 68 61 72 61 63 74 65 72 28 31 30 2c 20 67 6c 79 70 68 29 29 3b 0a 0a 20 20 20 20 20 20 20 20 Character(10,.glyph));..........
67c0 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 ........if.(!m_CharacterLookupDi
67e0 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 31 33 29 29 0a 20 20 20 20 20 20 ctionary.ContainsKey(13)).......
6800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 ..............m_CharacterLookupD
6820 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 31 33 2c 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 ictionary.Add(13,.new.TMP_Charac
6840 74 65 72 28 31 33 2c 20 67 6c 79 70 68 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a ter(13,.glyph));.............}..
6860 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 5a 65 72 6f 20 57 69 64 74 68 20 53 70 ............//.Add.Zero.Width.Sp
6880 61 63 65 20 38 32 30 33 20 28 30 78 32 30 30 42 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 ace.8203.(0x200B).............if
68a0 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f .(m_CharacterLookupDictionary.Co
68c0 6e 74 61 69 6e 73 4b 65 79 28 38 32 30 33 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 ntainsKey(8203).==.false).......
68e0 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c ......{.................Glyph.gl
6900 79 70 68 20 3d 20 6e 65 77 20 47 6c 79 70 68 28 30 2c 20 6e 65 77 20 47 6c 79 70 68 4d 65 74 72 yph.=.new.Glyph(0,.new.GlyphMetr
6920 69 63 73 28 30 2c 20 30 2c 20 30 2c 20 30 2c 20 30 29 2c 20 47 6c 79 70 68 52 65 63 74 2e 7a 65 ics(0,.0,.0,.0,.0),.GlyphRect.ze
6940 72 6f 2c 20 31 2e 30 66 2c 20 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f ro,.1.0f,.0);.................m_
6960 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 38 32 CharacterLookupDictionary.Add(82
6980 30 33 2c 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 28 38 32 30 33 2c 20 67 6c 79 70 03,.new.TMP_Character(8203,.glyp
69a0 68 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 h));.............}..............
69c0 2f 2f 20 41 64 64 20 5a 65 72 6f 20 57 69 64 74 68 20 4e 6f 6e 2d 42 72 65 61 6b 69 6e 67 20 53 //.Add.Zero.Width.Non-Breaking.S
69e0 70 61 63 65 20 38 32 38 38 20 28 30 78 32 30 36 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 pace.8288.(0x2060).............i
6a00 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 f.(m_CharacterLookupDictionary.C
6a20 6f 6e 74 61 69 6e 73 4b 65 79 28 38 32 38 38 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 ontainsKey(8288).==.false)......
6a40 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 .......{.................Glyph.g
6a60 6c 79 70 68 20 3d 20 6e 65 77 20 47 6c 79 70 68 28 30 2c 20 6e 65 77 20 47 6c 79 70 68 4d 65 74 lyph.=.new.Glyph(0,.new.GlyphMet
6a80 72 69 63 73 28 30 2c 20 30 2c 20 30 2c 20 30 2c 20 30 29 2c 20 47 6c 79 70 68 52 65 63 74 2e 7a rics(0,.0,.0,.0,.0),.GlyphRect.z
6aa0 65 72 6f 2c 20 31 2e 30 66 2c 20 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d ero,.1.0f,.0);.................m
6ac0 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 38 _CharacterLookupDictionary.Add(8
6ae0 32 38 38 2c 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 28 38 32 38 38 2c 20 67 6c 79 288,.new.TMP_Character(8288,.gly
6b00 70 68 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ph));.............}.............
6b20 20 2f 2f 20 41 64 64 20 4e 6f 6e 2d 42 72 65 61 6b 69 6e 67 20 48 79 70 68 65 6e 20 38 32 30 39 .//.Add.Non-Breaking.Hyphen.8209
6b40 20 28 30 78 32 30 31 31 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 .(0x2011).............if.(m_Char
6b60 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 acterLookupDictionary.ContainsKe
6b80 79 28 38 32 30 39 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a y(8209).==.false).............{.
6ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c ................if.(m_CharacterL
6bc0 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 54 72 79 47 65 74 56 61 6c 75 65 28 34 35 2c 20 ookupDictionary.TryGetValue(45,.
6be0 6f 75 74 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 29 29 0a 20 20 out.TMP_Character.character))...
6c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f ..................m_CharacterLoo
6c20 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 38 32 30 39 2c 20 6e 65 77 20 54 4d 50 5f kupDictionary.Add(8209,.new.TMP_
6c40 43 68 61 72 61 63 74 65 72 28 38 32 30 39 2c 20 63 68 61 72 61 63 74 65 72 2e 67 6c 79 70 68 29 Character(8209,.character.glyph)
6c60 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f );.............}.............../
6c80 2f 20 53 65 74 20 43 61 70 20 48 65 69 67 68 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 /.Set.Cap.Height.............if.
6ca0 28 6d 5f 46 61 63 65 49 6e 66 6f 2e 63 61 70 4c 69 6e 65 20 3d 3d 20 30 20 26 26 20 6d 5f 43 68 (m_FaceInfo.capLine.==.0.&&.m_Ch
6cc0 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 aracterLookupDictionary.Contains
6ce0 4b 65 79 28 37 32 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 Key(72)).............{..........
6d00 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 20 3d 20 6d 5f 43 68 61 72 61 .......uint.glyphIndex.=.m_Chara
6d20 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 5b 37 32 5d 2e 67 6c 79 70 68 49 6e cterLookupDictionary[72].glyphIn
6d40 64 65 78 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e dex;.................m_FaceInfo.
6d60 63 61 70 4c 69 6e 65 20 3d 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 capLine.=.m_GlyphLookupDictionar
6d80 79 5b 67 6c 79 70 68 49 6e 64 65 78 5d 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c y[glyphIndex].metrics.horizontal
6da0 42 65 61 72 69 6e 67 59 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 BearingY;.............}.........
6dc0 20 20 20 20 20 2f 2f 20 41 64 6a 75 73 74 20 46 6f 6e 74 20 53 63 61 6c 65 20 66 6f 72 20 63 6f .....//.Adjust.Font.Scale.for.co
6de0 6d 70 61 74 69 62 69 6c 69 74 79 20 72 65 61 73 6f 6e 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 mpatibility.reasons.............
6e00 69 66 20 28 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 63 61 6c 65 20 3d 3d 20 30 29 0a 20 20 20 20 20 if.(m_FaceInfo.scale.==.0)......
6e20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 63 61 6c 65 20 3d 20 31 2e ...........m_FaceInfo.scale.=.1.
6e40 30 66 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 53 74 72 69 6b 65 74 68 0f;..............//.Set.Striketh
6e60 72 6f 75 67 68 20 4f 66 66 73 65 74 20 28 69 66 20 6e 65 65 64 65 64 29 0a 20 20 20 20 20 20 20 rough.Offset.(if.needed)........
6e80 20 20 20 20 20 69 66 20 28 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 74 72 69 6b 65 74 68 72 6f 75 67 .....if.(m_FaceInfo.strikethroug
6ea0 68 4f 66 66 73 65 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f hOffset.==.0).................m_
6ec0 46 61 63 65 49 6e 66 6f 2e 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 3d 20 6d FaceInfo.strikethroughOffset.=.m
6ee0 5f 46 61 63 65 49 6e 66 6f 2e 63 61 70 4c 69 6e 65 20 2f 20 32 2e 35 66 3b 0a 0a 20 20 20 20 20 _FaceInfo.capLine./.2.5f;.......
6f00 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 50 61 64 64 69 6e 67 20 76 61 6c 75 65 20 66 6f 72 20 .......//.Set.Padding.value.for.
6f20 6c 65 67 61 63 79 20 66 6f 6e 74 20 61 73 73 65 74 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 legacy.font.assets..............
6f40 69 66 20 28 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 if.(m_AtlasPadding.==.0)........
6f60 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 74 65 72 .....{.................if.(mater
6f80 69 61 6c 2e 48 61 73 50 72 6f 70 65 72 74 79 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e ial.HasProperty(ShaderUtilities.
6fa0 49 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c 65 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ID_GradientScale))..............
6fc0 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 20 3d 20 28 69 6e 74 29 6d 61 74 .......m_AtlasPadding.=.(int)mat
6fe0 65 72 69 61 6c 2e 47 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 erial.GetFloat(ShaderUtilities.I
7000 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c 65 29 20 2d 20 31 3b 0a 20 20 20 20 20 20 20 20 20 20 D_GradientScale).-.1;...........
7020 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 70 75 74 65 20 48 61 73 68 ..}..............//.Compute.Hash
7040 63 6f 64 65 20 66 6f 72 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 6e 61 6d 65 0a 20 20 20 code.for.the.font.asset.name....
7060 20 20 20 20 20 20 20 20 20 68 61 73 68 43 6f 64 65 20 3d 20 54 4d 50 5f 54 65 78 74 55 74 69 6c .........hashCode.=.TMP_TextUtil
7080 69 74 69 65 73 2e 47 65 74 53 69 6d 70 6c 65 48 61 73 68 43 6f 64 65 28 74 68 69 73 2e 6e 61 6d ities.GetSimpleHashCode(this.nam
70a0 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 70 75 74 65 20 48 61 73 68 e);..............//.Compute.Hash
70c0 63 6f 64 65 20 66 6f 72 20 74 68 65 20 6d 61 74 65 72 69 61 6c 20 6e 61 6d 65 0a 20 20 20 20 20 code.for.the.material.name......
70e0 20 20 20 20 20 20 20 6d 61 74 65 72 69 61 6c 48 61 73 68 43 6f 64 65 20 3d 20 54 4d 50 5f 54 65 .......materialHashCode.=.TMP_Te
7100 78 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 53 69 6d 70 6c 65 48 61 73 68 43 6f 64 65 28 6d 61 xtUtilities.GetSimpleHashCode(ma
7120 74 65 72 69 61 6c 2e 6e 61 6d 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 73 46 terial.name);..............m_IsF
7140 6f 6e 74 41 73 73 65 74 4c 6f 6f 6b 75 70 54 61 62 6c 65 73 44 69 72 74 79 20 3d 20 66 61 6c 73 ontAssetLookupTablesDirty.=.fals
7160 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d e;.........}...........///.<summ
7180 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 6f 72 74 20 74 68 65 20 43 68 61 72 61 63 ary>.........///.Sort.the.Charac
71a0 74 65 72 20 74 61 62 6c 65 20 62 79 20 55 6e 69 63 6f 64 65 20 76 61 6c 75 65 73 2e 0a 20 20 20 ter.table.by.Unicode.values.....
71c0 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 69 6e 74 65 .....///.</summary>.........inte
71e0 72 6e 61 6c 20 76 6f 69 64 20 53 6f 72 74 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 28 29 0a 20 rnal.void.SortCharacterTable()..
7200 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 .......{.............if.(m_Chara
7220 63 74 65 72 54 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 43 68 61 72 61 63 74 65 72 cterTable.!=.null.&&.m_Character
7240 54 61 62 6c 65 2e 43 6f 75 6e 74 20 3e 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Table.Count.>.0)................
7260 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 20 3d 20 6d 5f 43 68 61 72 61 63 74 65 72 54 .m_CharacterTable.=.m_CharacterT
7280 61 62 6c 65 2e 4f 72 64 65 72 42 79 28 63 20 3d 3e 20 63 2e 75 6e 69 63 6f 64 65 29 2e 54 6f 4c able.OrderBy(c.=>.c.unicode).ToL
72a0 69 73 74 28 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 ist();.........}..........///.<s
72c0 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 6f 72 74 20 74 68 65 20 47 6c 79 ummary>.........///.Sort.the.Gly
72e0 70 68 20 74 61 62 6c 65 20 62 79 20 69 6e 64 65 78 20 76 61 6c 75 65 73 2e 0a 20 20 20 20 20 20 ph.table.by.index.values........
7300 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 ..///.</summary>.........interna
7320 6c 20 76 6f 69 64 20 53 6f 72 74 47 6c 79 70 68 54 61 62 6c 65 28 29 0a 20 20 20 20 20 20 20 20 l.void.SortGlyphTable().........
7340 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 54 61 62 6c 65 20 21 {.............if.(m_GlyphTable.!
7360 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 2e 43 6f 75 6e 74 20 3e 20 30 =.null.&&.m_GlyphTable.Count.>.0
7380 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 20 3d ).................m_GlyphTable.=
73a0 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 2e 4f 72 64 65 72 42 79 28 63 20 3d 3e 20 63 2e 69 6e 64 .m_GlyphTable.OrderBy(c.=>.c.ind
73c0 65 78 29 2e 54 6f 4c 69 73 74 28 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 ex).ToList();.........}.........
73e0 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 6f 72 74 20 .///.<summary>.........///.Sort.
7400 62 6f 74 68 20 67 6c 79 70 68 20 61 6e 64 20 63 68 61 72 61 63 74 65 72 20 74 61 62 6c 65 73 2e both.glyph.and.character.tables.
7420 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
7440 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 53 6f 72 74 47 6c 79 70 68 41 6e 64 43 68 61 72 61 63 internal.void.SortGlyphAndCharac
7460 74 65 72 54 61 62 6c 65 73 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 terTables().........{...........
7480 20 20 53 6f 72 74 47 6c 79 70 68 54 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..SortGlyphTable();.............
74a0 53 6f 72 74 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a SortCharacterTable();.........}.
74c0 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 ..........///.<summary>.........
74e0 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 63 68 65 63 6b 20 69 66 20 61 20 63 65 72 74 61 ///.Function.to.check.if.a.certa
7500 69 6e 20 63 68 61 72 61 63 74 65 72 20 65 78 69 73 74 73 20 69 6e 20 74 68 65 20 66 6f 6e 74 20 in.character.exists.in.the.font.
7520 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 asset..........///.</summary>...
7540 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 74 65 72 ......///.<param.name="character
7560 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e "></param>.........///.<returns>
7580 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 48 </returns>.........public.bool.H
75a0 61 73 43 68 61 72 61 63 74 65 72 28 69 6e 74 20 63 68 61 72 61 63 74 65 72 29 0a 20 20 20 20 20 asCharacter(int.character)......
75c0 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 ...{.............if.(m_Character
75e0 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 LookupDictionary.==.null).......
7600 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 20 20 20 ..........return.false;.........
7620 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f .....if.(m_CharacterLookupDictio
7640 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 28 75 69 6e 74 29 63 68 61 72 61 63 74 65 72 nary.ContainsKey((uint)character
7660 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a )).................return.true;.
7680 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 .............return.false;......
76a0 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 ...}...........///.<summary>....
76c0 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 63 68 65 63 6b 20 69 66 20 61 20 .....///.Function.to.check.if.a.
76e0 63 65 72 74 61 69 6e 20 63 68 61 72 61 63 74 65 72 20 65 78 69 73 74 73 20 69 6e 20 74 68 65 20 certain.character.exists.in.the.
7700 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 font.asset..........///.</summar
7720 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 y>.........///.<param.name="char
7740 61 63 74 65 72 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 acter"></param>.........///.<ret
7760 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 urns></returns>.........public.b
7780 6f 6f 6c 20 48 61 73 43 68 61 72 61 63 74 65 72 28 63 68 61 72 20 63 68 61 72 61 63 74 65 72 29 ool.HasCharacter(char.character)
77a0 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 .........{.............if.(m_Cha
77c0 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a racterLookupDictionary.==.null).
77e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 0a 20 ................return.false;...
7800 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 ...........if.(m_CharacterLookup
7820 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 63 68 61 72 61 63 74 65 72 Dictionary.ContainsKey(character
7840 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a )).................return.true;.
7860 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 .............return.false;......
7880 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 ...}...........///.<summary>....
78a0 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 63 68 65 63 6b 20 69 66 20 61 20 .....///.Function.to.check.if.a.
78c0 63 68 61 72 61 63 74 65 72 20 69 73 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 66 6f character.is.contained.in.the.fo
78e0 6e 74 20 61 73 73 65 74 20 77 69 74 68 20 74 68 65 20 6f 70 74 69 6f 6e 20 74 6f 20 61 6c 73 6f nt.asset.with.the.option.to.also
7900 20 63 68 65 63 6b 20 74 68 72 6f 75 67 68 20 66 61 6c 6c 62 61 63 6b 20 66 6f 6e 74 20 61 73 73 .check.through.fallback.font.ass
7920 65 74 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 ets..........///.</summary>.....
7940 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 74 65 72 22 3e ....///.<param.name="character">
7960 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 </param>.........///.<param.name
7980 3d 22 73 65 61 72 63 68 46 61 6c 6c 62 61 63 6b 73 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 ="searchFallbacks"></param>.....
79a0 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 ....///.<returns></returns>.....
79c0 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 48 61 73 43 68 61 72 61 63 74 65 72 28 63 68 61 ....public.bool.HasCharacter(cha
79e0 72 20 63 68 61 72 61 63 74 65 72 2c 20 62 6f 6f 6c 20 73 65 61 72 63 68 46 61 6c 6c 62 61 63 6b r.character,.bool.searchFallback
7a00 73 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 61 64 s).........{.............//.Read
7a20 20 66 6f 6e 74 20 61 73 73 65 74 20 64 65 66 69 6e 69 74 69 6f 6e 20 69 66 20 69 74 20 68 61 73 .font.asset.definition.if.it.has
7a40 6e 27 74 20 61 6c 72 65 61 64 79 20 62 65 65 6e 20 64 6f 6e 65 2e 0a 20 20 20 20 20 20 20 20 20 n't.already.been.done...........
7a60 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 ...if.(m_CharacterLookupDictiona
7a80 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 ry.==.null).............{.......
7aa0 20 20 20 20 20 20 20 20 20 20 52 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f ..........ReadFontAssetDefinitio
7ac0 6e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 n();..................if.(m_Char
7ae0 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 acterLookupDictionary.==.null)..
7b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b ...................return.false;
7b20 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 .............}..............//.C
7b40 68 65 63 6b 20 66 6f 6e 74 20 61 73 73 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 heck.font.asset.............if.(
7b60 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 m_CharacterLookupDictionary.Cont
7b80 61 69 6e 73 4b 65 79 28 63 68 61 72 61 63 74 65 72 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 ainsKey(character)).............
7ba0 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f ....return.true;..............//
7bc0 20 43 68 65 63 6b 20 69 66 20 66 6f 6e 74 20 61 73 73 65 74 20 69 73 20 64 79 6e 61 6d 69 63 20 .Check.if.font.asset.is.dynamic.
7be0 61 6e 64 20 69 66 20 73 6f 20 74 72 79 20 74 6f 20 61 64 64 20 74 68 65 20 72 65 71 75 65 73 74 and.if.so.try.to.add.the.request
7c00 65 64 20 63 68 61 72 61 63 74 65 72 20 74 6f 20 69 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 ed.character.to.it..............
7c20 69 66 20 28 6d 5f 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c if.(m_AtlasPopulationMode.==.Atl
7c40 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 2e 44 79 6e 61 6d 69 63 29 0a 20 20 20 20 20 20 asPopulationMode.Dynamic).......
7c60 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 72 79 41 ......{.................if.(TryA
7c80 64 64 43 68 61 72 61 63 74 65 72 49 6e 74 65 72 6e 61 6c 28 63 68 61 72 61 63 74 65 72 2c 20 6f ddCharacterInternal(character,.o
7ca0 75 74 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 74 65 6d 70 29 29 0a 20 20 20 20 20 20 20 20 ut.TMP_Character.temp)).........
7cc0 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 ............return.true;........
7ce0 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 61 72 63 68 46 61 .....}..............if.(searchFa
7d00 6c 6c 62 61 63 6b 73 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 llbacks).............{..........
7d20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 66 6f 6e 74 20 61 73 73 65 74 20 66 61 6c 6c 62 .......//.Check.font.asset.fallb
7d40 61 63 6b 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 61 6c 6c 62 61 63 acks.................if.(fallbac
7d60 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 66 61 6c 6c 62 kFontAssetTable.!=.null.&&.fallb
7d80 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 2e 43 6f 75 6e 74 20 3e 20 30 29 0a 20 20 20 ackFontAssetTable.Count.>.0)....
7da0 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
7dc0 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 66 61 6c 6c 62 61 63 6b 46 ...for.(int.i.=.0;.i.<.fallbackF
7de0 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 2e 43 6f 75 6e 74 20 26 26 20 66 61 6c 6c 62 61 63 6b 46 ontAssetTable.Count.&&.fallbackF
7e00 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b 20 69 2b 2b 29 0a 20 ontAssetTable[i].!=.null;.i++)..
7e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 ...................{............
7e40 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 .............if.(fallbackFontAss
7e60 65 74 54 61 62 6c 65 5b 69 5d 2e 48 61 73 43 68 61 72 61 63 74 65 72 5f 49 6e 74 65 72 6e 61 6c etTable[i].HasCharacter_Internal
7e80 28 63 68 61 72 61 63 74 65 72 2c 20 73 65 61 72 63 68 46 61 6c 6c 62 61 63 6b 73 29 29 0a 20 20 (character,.searchFallbacks))...
7ea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ..........................return
7ec0 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 .true;.....................}....
7ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............}..................
7f00 2f 2f 20 43 68 65 63 6b 20 67 65 6e 65 72 61 6c 20 66 61 6c 6c 62 61 63 6b 20 66 6f 6e 74 20 61 //.Check.general.fallback.font.a
7f20 73 73 65 74 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 ssets..................if.(TMP_S
7f40 65 74 74 69 6e 67 73 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 20 21 3d 20 6e 75 ettings.fallbackFontAssets.!=.nu
7f60 6c 6c 20 26 26 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 ll.&&.TMP_Settings.fallbackFontA
7f80 73 73 65 74 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ssets.Count.>.0)................
7fa0 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 .{.....................for.(int.
7fc0 69 20 3d 20 30 3b 20 69 20 3c 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 66 61 6c 6c 62 61 63 6b i.=.0;.i.<.TMP_Settings.fallback
7fe0 46 6f 6e 74 41 73 73 65 74 73 2e 43 6f 75 6e 74 20 26 26 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 FontAssets.Count.&&.TMP_Settings
8000 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b 20 .fallbackFontAssets[i].!=.null;.
8020 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 i++).....................{......
8040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 ...................if.(TMP_Setti
8060 6e 67 73 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 5b 69 5d 2e 6d 5f 43 68 61 72 ngs.fallbackFontAssets[i].m_Char
8080 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 acterLookupDictionary.==.null)..
80a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 53 ...........................TMP_S
80c0 65 74 74 69 6e 67 73 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 5b 69 5d 2e 52 65 ettings.fallbackFontAssets[i].Re
80e0 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 0a 20 20 20 20 20 20 adFontAssetDefinition();........
8100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 6e ..................if.(TMP_Settin
8120 67 73 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 5b 69 5d 2e 6d 5f 43 68 61 72 61 gs.fallbackFontAssets[i].m_Chara
8140 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 21 3d 20 6e 75 6c 6c 20 26 26 20 cterLookupDictionary.!=.null.&&.
8160 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 5b TMP_Settings.fallbackFontAssets[
8180 69 5d 2e 48 61 73 43 68 61 72 61 63 74 65 72 5f 49 6e 74 65 72 6e 61 6c 28 63 68 61 72 61 63 74 i].HasCharacter_Internal(charact
81a0 65 72 2c 20 73 65 61 72 63 68 46 61 6c 6c 62 61 63 6b 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 er,.searchFallbacks))...........
81c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 ..................return.true;..
81e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 ...................}............
8200 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b .....}..................//.Check
8220 20 54 4d 50 20 53 65 74 74 69 6e 67 73 20 44 65 66 61 75 6c 74 20 46 6f 6e 74 20 41 73 73 65 74 .TMP.Settings.Default.Font.Asset
8240 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 6e 67 .................if.(TMP_Setting
8260 73 2e 64 65 66 61 75 6c 74 46 6f 6e 74 41 73 73 65 74 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 s.defaultFontAsset.!=.null).....
8280 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
82a0 20 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 64 65 66 61 75 6c 74 46 6f 6e 74 41 73 ..if.(TMP_Settings.defaultFontAs
82c0 73 65 74 2e 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 set.m_CharacterLookupDictionary.
82e0 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ==.null)........................
8300 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 64 65 66 61 75 6c 74 46 6f 6e 74 41 73 73 65 74 2e 52 .TMP_Settings.defaultFontAsset.R
8320 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 0a 20 20 20 20 20 eadFontAssetDefinition();.......
8340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e ...............if.(TMP_Settings.
8360 64 65 66 61 75 6c 74 46 6f 6e 74 41 73 73 65 74 2e 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b defaultFontAsset.m_CharacterLook
8380 75 70 44 69 63 74 69 6f 6e 61 72 79 20 21 3d 20 6e 75 6c 6c 20 26 26 20 54 4d 50 5f 53 65 74 74 upDictionary.!=.null.&&.TMP_Sett
83a0 69 6e 67 73 2e 64 65 66 61 75 6c 74 46 6f 6e 74 41 73 73 65 74 2e 48 61 73 43 68 61 72 61 63 74 ings.defaultFontAsset.HasCharact
83c0 65 72 5f 49 6e 74 65 72 6e 61 6c 28 63 68 61 72 61 63 74 65 72 2c 20 73 65 61 72 63 68 46 61 6c er_Internal(character,.searchFal
83e0 6c 62 61 63 6b 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lbacks))........................
8400 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a .return.true;.................}.
8420 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ............}..............retur
8440 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f n.false;.........}...........///
8460 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 .<summary>.........///.Function.
8480 74 6f 20 63 68 65 63 6b 20 69 66 20 61 20 63 68 61 72 61 63 74 65 72 20 69 73 20 63 6f 6e 74 61 to.check.if.a.character.is.conta
84a0 69 6e 65 64 20 69 6e 20 61 20 66 6f 6e 74 20 61 73 73 65 74 20 77 69 74 68 20 74 68 65 20 6f 70 ined.in.a.font.asset.with.the.op
84c0 74 69 6f 6e 20 74 6f 20 61 6c 73 6f 20 63 68 65 63 6b 20 74 68 72 6f 75 67 68 20 66 61 6c 6c 62 tion.to.also.check.through.fallb
84e0 61 63 6b 20 66 6f 6e 74 20 61 73 73 65 74 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 ack.font.assets..........///.Thi
8500 73 20 70 72 69 76 61 74 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 64 6f 65 73 20 6e 6f s.private.implementation.does.no
8520 74 20 73 65 61 72 63 68 20 74 68 65 20 66 61 6c 6c 62 61 63 6b 20 66 6f 6e 74 20 61 73 73 65 74 t.search.the.fallback.font.asset
8540 20 69 6e 20 74 68 65 20 54 4d 50 20 53 65 74 74 69 6e 67 73 20 66 69 6c 65 2e 0a 20 20 20 20 20 .in.the.TMP.Settings.file.......
8560 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 ...///.</summary>.........///.<p
8580 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 74 65 72 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 aram.name="character"></param>..
85a0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 65 61 72 63 68 46 61 .......///.<param.name="searchFa
85c0 6c 6c 62 61 63 6b 73 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 llbacks"></param>.........///.<r
85e0 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 48 eturns></returns>.........bool.H
8600 61 73 43 68 61 72 61 63 74 65 72 5f 49 6e 74 65 72 6e 61 6c 28 63 68 61 72 20 63 68 61 72 61 63 asCharacter_Internal(char.charac
8620 74 65 72 2c 20 62 6f 6f 6c 20 73 65 61 72 63 68 46 61 6c 6c 62 61 63 6b 73 29 0a 20 20 20 20 20 ter,.bool.searchFallbacks)......
8640 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 61 64 20 66 6f 6e 74 20 61 73 ...{.............//.Read.font.as
8660 73 65 74 20 64 65 66 69 6e 69 74 69 6f 6e 20 69 66 20 69 74 20 68 61 73 6e 27 74 20 61 6c 72 65 set.definition.if.it.hasn't.alre
8680 61 64 79 20 62 65 65 6e 20 64 6f 6e 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d ady.been.done..............if.(m
86a0 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 _CharacterLookupDictionary.==.nu
86c0 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ll).............{...............
86e0 20 20 52 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 0a 20 20 ..ReadFontAssetDefinition();....
8700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f ..............if.(m_CharacterLoo
8720 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 kupDictionary.==.null)..........
8740 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 ...........return.false;........
8760 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 66 6f 6e .....}..............//.Check.fon
8780 74 20 61 73 73 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 t.asset.............if.(m_Charac
87a0 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 terLookupDictionary.ContainsKey(
87c0 63 68 61 72 61 63 74 65 72 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 character)).................retu
87e0 72 6e 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 65 61 72 63 68 rn.true;..............if.(search
8800 46 61 6c 6c 62 61 63 6b 73 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 Fallbacks).............{........
8820 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 46 6f 6e 74 20 41 73 73 65 74 20 46 61 6c .........//.Check.Font.Asset.Fal
8840 6c 62 61 63 6b 20 66 6f 6e 74 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 lback.fonts..................if.
8860 28 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 20 (fallbackFontAssetTable.!=.null.
8880 26 26 20 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 2e 43 6f 75 6e 74 20 &&.fallbackFontAssetTable.Count.
88a0 3e 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 >.0).................{..........
88c0 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 66 ...........for.(int.i.=.0;.i.<.f
88e0 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 2e 43 6f 75 6e 74 20 26 26 20 66 allbackFontAssetTable.Count.&&.f
8900 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 5b 69 5d 20 21 3d 20 6e 75 6c 6c allbackFontAssetTable[i].!=.null
8920 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 ;.i++).....................{....
8940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 61 6c 6c 62 61 63 .....................if.(fallbac
8960 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 5b 69 5d 2e 48 61 73 43 68 61 72 61 63 74 65 72 5f kFontAssetTable[i].HasCharacter_
8980 49 6e 74 65 72 6e 61 6c 28 63 68 61 72 61 63 74 65 72 2c 20 73 65 61 72 63 68 46 61 6c 6c 62 61 Internal(character,.searchFallba
89a0 63 6b 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 cks))...........................
89c0 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..return.true;..................
89e0 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 ...}.................}..........
8a00 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a ...}..............return.false;.
8a20 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 ........}...........///.<summary
8a40 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 63 68 65 63 6b 20 >.........///.Function.to.check.
8a60 69 66 20 63 65 72 74 61 69 6e 20 63 68 61 72 61 63 74 65 72 73 20 65 78 69 73 74 73 20 69 6e 20 if.certain.characters.exists.in.
8a80 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 20 46 75 6e 63 74 69 6f 6e 20 72 65 74 75 72 6e 73 the.font.asset..Function.returns
8aa0 20 61 20 6c 69 73 74 20 6f 66 20 6d 69 73 73 69 6e 67 20 63 68 61 72 61 63 74 65 72 73 2e 0a 20 .a.list.of.missing.characters...
8ac0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f .......///.</summary>.........//
8ae0 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 74 65 72 22 3e 3c 2f 70 61 72 61 /.<param.name="character"></para
8b00 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e m>.........///.<returns></return
8b20 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 48 61 73 43 68 61 72 61 63 s>.........public.bool.HasCharac
8b40 74 65 72 73 28 73 74 72 69 6e 67 20 74 65 78 74 2c 20 6f 75 74 20 4c 69 73 74 3c 63 68 61 72 3e ters(string.text,.out.List<char>
8b60 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 .missingCharacters).........{...
8b80 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 ..........if.(m_CharacterLookupD
8ba0 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b ictionary.==.null).............{
8bc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 .................missingCharacte
8be0 72 73 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 rs.=.null;.................retur
8c00 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 n.false;.............}..........
8c20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 20 3d 20 6e 65 77 20 4c 69 73 74 ....missingCharacters.=.new.List
8c40 3c 63 68 61 72 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 <char>();..............for.(int.
8c60 69 20 3d 20 30 3b 20 69 20 3c 20 74 65 78 74 2e 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0a 20 20 20 i.=.0;.i.<.text.Length;.i++)....
8c80 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 .........{.................if.(!
8ca0 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 m_CharacterLookupDictionary.Cont
8cc0 61 69 6e 73 4b 65 79 28 74 65 78 74 5b 69 5d 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ainsKey(text[i]))...............
8ce0 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 2e 41 64 64 28 74 65 78 74 ......missingCharacters.Add(text
8d00 5b 69 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 [i]);.............}.............
8d20 20 69 66 20 28 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 2e 43 6f 75 6e 74 20 3d 3d 20 .if.(missingCharacters.Count.==.
8d40 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 0).................return.true;.
8d60 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 .............return.false;......
8d80 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 ...}...........///.<summary>....
8da0 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20 63 68 65 63 6b 20 69 66 20 63 65 .....///.Function.to.check.if.ce
8dc0 72 74 61 69 6e 20 63 68 61 72 61 63 74 65 72 73 20 65 78 69 73 74 73 20 69 6e 20 74 68 65 20 66 rtain.characters.exists.in.the.f
8de0 6f 6e 74 20 61 73 73 65 74 2e 20 46 75 6e 63 74 69 6f 6e 20 72 65 74 75 72 6e 73 20 66 61 6c 73 ont.asset..Function.returns.fals
8e00 65 20 69 66 20 61 6e 79 20 63 68 61 72 61 63 74 65 72 73 20 61 72 65 20 6d 69 73 73 69 6e 67 2e e.if.any.characters.are.missing.
8e20 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
8e40 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 65 78 74 22 3e 53 74 72 69 6e 67 20 63 6f ///.<param.name="text">String.co
8e60 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 63 68 65 63 6b ntaining.the.characters.to.check
8e80 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f </param>.........///.<returns></
8ea0 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 48 61 73 returns>.........public.bool.Has
8ec0 43 68 61 72 61 63 74 65 72 73 28 73 74 72 69 6e 67 20 74 65 78 74 29 0a 20 20 20 20 20 20 20 20 Characters(string.text).........
8ee0 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f {.............if.(m_CharacterLoo
8f00 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 kupDictionary.==.null)..........
8f20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 .......return.false;............
8f40 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 74 65 78 74 2e 4c 65 6e 67 74 ..for.(int.i.=.0;.i.<.text.Lengt
8f60 68 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 h;.i++).............{...........
8f80 20 20 20 20 20 20 69 66 20 28 21 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 ......if.(!m_CharacterLookupDict
8fa0 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 74 65 78 74 5b 69 5d 29 29 0a 20 20 20 ionary.ContainsKey(text[i]))....
8fc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 .................return.false;..
8fe0 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ...........}..............return
9000 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c .true;.........}...........///.<
9020 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 74 6f summary>.........///.Function.to
9040 20 65 78 74 72 61 63 74 20 61 6c 6c 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66 72 6f 6d .extract.all.the.characters.from
9060 20 61 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d .a.font.asset..........///.</sum
9080 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 66 mary>.........///.<param.name="f
90a0 6f 6e 74 41 73 73 65 74 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ontAsset"></param>.........///.<
90c0 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 returns></returns>.........publi
90e0 63 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 20 47 65 74 43 68 61 72 61 63 74 65 72 73 28 54 4d c.static.string.GetCharacters(TM
9100 50 5f 46 6f 6e 74 41 73 73 65 74 20 66 6f 6e 74 41 73 73 65 74 29 0a 20 20 20 20 20 20 20 20 7b P_FontAsset.fontAsset).........{
9120 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 63 68 61 72 61 63 74 65 72 73 20 3d .............string.characters.=
9140 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 .string.Empty;..............for.
9160 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 66 6f 6e 74 41 73 73 65 74 2e 63 68 61 72 61 63 (int.i.=.0;.i.<.fontAsset.charac
9180 74 65 72 54 61 62 6c 65 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 terTable.Count;.i++)............
91a0 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 73 20 2b 3d .{.................characters.+=
91c0 20 28 63 68 61 72 29 66 6f 6e 74 41 73 73 65 74 2e 63 68 61 72 61 63 74 65 72 54 61 62 6c 65 5b .(char)fontAsset.characterTable[
91e0 69 5d 2e 75 6e 69 63 6f 64 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 i].unicode;.............}.......
9200 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 68 61 72 61 63 74 65 72 73 3b 0a 20 20 20 20 20 20 .......return.characters;.......
9220 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 ..}...........///.<summary>.....
9240 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 77 68 69 63 68 20 72 65 74 75 72 6e 73 20 61 ....///.Function.which.returns.a
9260 6e 20 61 72 72 61 79 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 61 6c 6c 20 74 68 65 20 63 68 n.array.that.contains.all.the.ch
9280 61 72 61 63 74 65 72 73 20 66 72 6f 6d 20 61 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 aracters.from.a.font.asset......
92a0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ....///.</summary>.........///.<
92c0 70 61 72 61 6d 20 6e 61 6d 65 3d 22 66 6f 6e 74 41 73 73 65 74 22 3e 3c 2f 70 61 72 61 6d 3e 0a param.name="fontAsset"></param>.
92e0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a ........///.<returns></returns>.
9300 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 69 6e 74 5b 5d 20 47 65 74 43 ........public.static.int[].GetC
9320 68 61 72 61 63 74 65 72 73 41 72 72 61 79 28 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 20 66 6f 6e haractersArray(TMP_FontAsset.fon
9340 74 41 73 73 65 74 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e tAsset).........{.............in
9360 74 5b 5d 20 63 68 61 72 61 63 74 65 72 73 20 3d 20 6e 65 77 20 69 6e 74 5b 66 6f 6e 74 41 73 73 t[].characters.=.new.int[fontAss
9380 65 74 2e 63 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 43 6f 75 6e 74 5d 3b 0a 0a 20 20 20 20 20 et.characterTable.Count];.......
93a0 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 66 6f 6e 74 41 .......for.(int.i.=.0;.i.<.fontA
93c0 73 73 65 74 2e 63 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a sset.characterTable.Count;.i++).
93e0 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 ............{.................ch
9400 61 72 61 63 74 65 72 73 5b 69 5d 20 3d 20 28 69 6e 74 29 66 6f 6e 74 41 73 73 65 74 2e 63 68 61 aracters[i].=.(int)fontAsset.cha
9420 72 61 63 74 65 72 54 61 62 6c 65 5b 69 5d 2e 75 6e 69 63 6f 64 65 3b 0a 20 20 20 20 20 20 20 20 racterTable[i].unicode;.........
9440 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 63 68 61 72 61 63 ....}..............return.charac
9460 74 65 72 73 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 3d 3d 3d ters;.........}...........//.===
9480 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================================
94a0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================================
94c0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 20 20 20 20 20 20 20 20 2f 2f 20 50 72 6f 70 65 72 74 =============.........//.Propert
94e0 69 65 73 20 61 6e 64 20 66 75 6e 63 74 69 6f 6e 73 20 72 65 6c 61 74 65 64 20 74 6f 20 63 68 61 ies.and.functions.related.to.cha
9500 72 61 63 74 65 72 20 61 6e 64 20 67 6c 79 70 68 20 61 64 64 69 74 69 6f 6e 73 20 61 73 20 77 65 racter.and.glyph.additions.as.we
9520 6c 6c 20 61 73 0a 20 20 20 20 20 20 20 20 2f 2f 20 74 61 63 6b 69 6e 67 20 67 6c 79 70 68 73 20 ll.as.........//.tacking.glyphs.
9540 74 68 61 74 20 6e 65 65 64 20 74 6f 20 62 65 20 61 64 64 65 64 20 74 6f 20 76 61 72 69 6f 75 73 that.need.to.be.added.to.various
9560 20 66 6f 6e 74 20 61 73 73 65 74 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 73 2e 0a 20 20 20 20 .font.asset.atlas.textures......
9580 20 20 20 20 2f 2f 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ....//.=========================
95a0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d ================================
95c0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 0a 20 20 20 20 20 20 20 =======================.........
95e0 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 74 65 72 .///.<summary>.........///.Deter
9600 6d 69 6e 65 73 20 69 66 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 69 73 20 61 6c 72 65 61 mines.if.the.font.asset.is.alrea
9620 64 79 20 72 65 67 69 73 74 65 72 65 64 20 74 6f 20 62 65 20 75 70 64 61 74 65 64 2e 0a 20 20 20 dy.registered.to.be.updated.....
9640 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 .....///.</summary>.........//pr
9660 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 49 73 41 6c 72 65 61 64 79 52 65 67 69 73 74 65 72 65 64 ivate.bool.m_IsAlreadyRegistered
9680 46 6f 72 55 70 64 61 74 65 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 ForUpdate;..........///.<summary
96a0 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 67 6c 79 70 68 73 20 74 68 61 >.........///.List.of.glyphs.tha
96c0 74 20 6e 65 65 64 20 74 6f 20 62 65 20 61 64 64 65 64 20 2f 20 70 61 63 6b 65 64 20 69 6e 20 61 t.need.to.be.added./.packed.in.a
96e0 74 6c 61 73 20 74 65 78 74 75 72 65 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d tlas.texture..........///.</summ
9700 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4c 69 73 74 3c 47 6c 79 70 68 3e ary>.........private.List<Glyph>
9720 20 6d 5f 47 6c 79 70 68 73 54 6f 50 61 63 6b 20 3d 20 6e 65 77 20 4c 69 73 74 3c 47 6c 79 70 68 .m_GlyphsToPack.=.new.List<Glyph
9740 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 >();..........///.<summary>.....
9760 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 67 6c 79 70 68 73 20 74 68 61 74 20 68 61 76 65 ....///.List.of.glyphs.that.have
9780 20 62 65 65 6e 20 70 61 63 6b 65 64 20 69 6e 20 74 68 65 20 61 74 6c 61 73 20 74 65 78 74 75 72 .been.packed.in.the.atlas.textur
97a0 65 20 61 6e 64 20 72 65 61 64 79 20 74 6f 20 62 65 20 72 65 6e 64 65 72 65 64 2e 0a 20 20 20 20 e.and.ready.to.be.rendered......
97c0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 ....///.</summary>.........priva
97e0 74 65 20 4c 69 73 74 3c 47 6c 79 70 68 3e 20 6d 5f 47 6c 79 70 68 73 50 61 63 6b 65 64 20 3d 20 te.List<Glyph>.m_GlyphsPacked.=.
9800 6e 65 77 20 4c 69 73 74 3c 47 6c 79 70 68 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 new.List<Glyph>();..........///.
9820 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 0a 20 20 20 20 20 20 20 20 2f <summary>.........///........../
9840 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4c 69 //.</summary>.........private.Li
9860 73 74 3c 47 6c 79 70 68 3e 20 6d 5f 47 6c 79 70 68 73 54 6f 52 65 6e 64 65 72 20 3d 20 6e 65 77 st<Glyph>.m_GlyphsToRender.=.new
9880 20 4c 69 73 74 3c 47 6c 79 70 68 3e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 .List<Glyph>();..........///.<su
98a0 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 75 73 65 64 20 69 6e 20 mmary>.........///.List.used.in.
98c0 74 68 65 20 70 72 6f 63 65 73 73 20 6f 66 20 61 64 64 69 6e 67 20 6e 65 77 20 67 6c 79 70 68 73 the.process.of.adding.new.glyphs
98e0 20 74 6f 20 74 68 65 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 0a 20 20 20 20 20 20 20 20 2f .to.the.atlas.texture........../
9900 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4c 69 //.</summary>.........private.Li
9920 73 74 3c 75 69 6e 74 3e 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 20 3d 20 6e 65 77 20 st<uint>.m_GlyphIndexList.=.new.
9940 4c 69 73 74 3c 75 69 6e 74 3e 28 29 3b 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4c 69 List<uint>();.........private.Li
9960 73 74 3c 54 4d 50 5f 43 68 61 72 61 63 74 65 72 3e 20 6d 5f 43 68 61 72 61 63 74 65 72 73 54 6f st<TMP_Character>.m_CharactersTo
9980 41 64 64 20 3d 20 6e 65 77 20 4c 69 73 74 3c 54 4d 50 5f 43 68 61 72 61 63 74 65 72 3e 28 29 3b Add.=.new.List<TMP_Character>();
99a0 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 ..........///.<summary>.........
99c0 2f 2f 2f 20 49 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 61 72 72 61 79 20 75 73 65 64 20 74 ///.Internal.static.array.used.t
99e0 6f 20 61 76 6f 69 64 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 20 77 68 65 6e 20 75 73 69 6e 67 20 74 o.avoid.allocations.when.using.t
9a00 68 65 20 47 65 74 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 54 61 62 6c 65 28 29 he.GetGlyphPairAdjustmentTable()
9a20 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 ..........///.</summary>........
9a40 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 75 69 6e 74 5b 5d 20 73 5f 47 6c 79 70 68 49 .internal.static.uint[].s_GlyphI
9a60 6e 64 65 78 41 72 72 61 79 20 3d 20 6e 65 77 20 75 69 6e 74 5b 31 36 5d 3b 0a 0a 20 20 20 20 20 ndexArray.=.new.uint[16];.......
9a80 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 74 ...///.<summary>.........///.Int
9aa0 65 72 6e 61 6c 20 73 74 61 74 69 63 20 6c 69 73 74 20 75 73 65 64 20 74 6f 20 74 72 61 63 6b 20 ernal.static.list.used.to.track.
9ac0 63 68 61 72 61 63 74 65 72 73 20 74 68 61 74 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 61 64 64 characters.that.could.not.be.add
9ae0 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f ed.to.the.font.asset..........//
9b00 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 /.</summary>.........internal.st
9b20 61 74 69 63 20 4c 69 73 74 3c 75 69 6e 74 3e 20 73 5f 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 atic.List<uint>.s_MissingCharact
9b40 65 72 4c 69 73 74 20 3d 20 6e 65 77 20 4c 69 73 74 3c 75 69 6e 74 3e 28 31 36 29 3b 0a 0a 20 20 erList.=.new.List<uint>(16);....
9b60 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ......///.<summary>.........///.
9b80 54 72 79 20 61 64 64 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66 72 6f 6d 20 74 Try.adding.the.characters.from.t
9ba0 68 65 20 70 72 6f 76 69 64 65 64 20 73 74 72 69 6e 67 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 he.provided.string.to.the.font.a
9bc0 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 sset..........///.</summary>....
9be0 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 75 6e 69 63 6f 64 65 73 22 3e .....///.<param.name="unicodes">
9c00 41 72 72 61 79 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 63 68 61 72 61 63 74 65 Array.that.contains.the.characte
9c20 72 73 20 74 6f 20 61 64 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 3c 2f 70 61 rs.to.add.to.the.font.asset.</pa
9c40 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e ram>.........///.<returns>Return
9c60 73 20 74 72 75 65 20 69 66 20 61 6c 6c 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 77 65 72 s.true.if.all.the.characters.wer
9c80 65 20 73 75 63 63 65 73 73 66 75 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 e.successfully.added.to.the.font
9ca0 20 61 73 73 65 74 2e 20 52 65 74 75 72 6e 20 66 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 3c .asset..Return.false.otherwise.<
9cc0 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 /returns>.........public.bool.Tr
9ce0 79 41 64 64 43 68 61 72 61 63 74 65 72 73 28 75 69 6e 74 5b 5d 20 75 6e 69 63 6f 64 65 73 29 0a yAddCharacters(uint[].unicodes).
9d00 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 79 ........{.............return.Try
9d20 41 64 64 43 68 61 72 61 63 74 65 72 73 28 75 6e 69 63 6f 64 65 73 2c 20 6f 75 74 20 75 69 6e 74 AddCharacters(unicodes,.out.uint
9d40 5b 5d 20 6d 69 73 73 69 6e 67 55 6e 69 63 6f 64 65 73 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a [].missingUnicodes);.........}..
9d60 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f ........///.<summary>.........//
9d80 2f 20 54 72 79 20 61 64 64 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66 72 6f 6d /.Try.adding.the.characters.from
9da0 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 73 74 72 69 6e 67 20 74 6f 20 74 68 65 20 66 6f 6e 74 .the.provided.string.to.the.font
9dc0 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 .asset..........///.</summary>..
9de0 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 75 6e 69 63 6f 64 65 73 .......///.<param.name="unicodes
9e00 22 3e 41 72 72 61 79 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 63 68 61 72 61 63 ">Array.that.contains.the.charac
9e20 74 65 72 73 20 74 6f 20 61 64 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 3c 2f ters.to.add.to.the.font.asset.</
9e40 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 param>.........///.<param.name="
9e60 6d 69 73 73 69 6e 67 55 6e 69 63 6f 64 65 73 22 3e 41 72 72 61 79 20 63 6f 6e 74 61 69 6e 69 6e missingUnicodes">Array.containin
9e80 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 74 68 61 74 20 63 6f 75 6c 64 20 6e 6f 74 20 g.the.characters.that.could.not.
9ea0 62 65 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 3c 2f 70 61 72 be.added.to.the.font.asset.</par
9ec0 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e 73 am>.........///.<returns>Returns
9ee0 20 74 72 75 65 20 69 66 20 61 6c 6c 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 77 65 72 65 .true.if.all.the.characters.were
9f00 20 73 75 63 63 65 73 73 66 75 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 .successfully.added.to.the.font.
9f20 61 73 73 65 74 2e 20 52 65 74 75 72 6e 20 66 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f asset..Return.false.otherwise.</
9f40 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 returns>.........public.bool.Try
9f60 41 64 64 43 68 61 72 61 63 74 65 72 73 28 75 69 6e 74 5b 5d 20 75 6e 69 63 6f 64 65 73 2c 20 6f AddCharacters(uint[].unicodes,.o
9f80 75 74 20 75 69 6e 74 5b 5d 20 6d 69 73 73 69 6e 67 55 6e 69 63 6f 64 65 73 29 0a 20 20 20 20 20 ut.uint[].missingUnicodes)......
9fa0 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 4d 69 73 73 69 6e 67 43 68 61 72 61 63 ...{.............s_MissingCharac
9fc0 74 65 72 4c 69 73 74 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f terList.Clear();..............//
9fe0 20 4d 61 6b 65 20 73 75 72 65 20 66 6f 6e 74 20 61 73 73 65 74 20 69 73 20 73 65 74 20 74 6f 20 .Make.sure.font.asset.is.set.to.
a000 64 79 6e 61 6d 69 63 20 61 6e 64 20 74 68 61 74 20 77 65 20 68 61 76 65 20 61 20 76 61 6c 69 64 dynamic.and.that.we.have.a.valid
a020 20 6c 69 73 74 20 6f 66 20 63 68 61 72 61 63 74 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 .list.of.characters.............
a040 20 69 66 20 28 75 6e 69 63 6f 64 65 73 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 75 6e 69 63 6f 64 65 .if.(unicodes.==.null.||.unicode
a060 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 s.Length.==.0.||.m_AtlasPopulati
a080 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 2e 53 74 onMode.==.AtlasPopulationMode.St
a0a0 61 74 69 63 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 atic).............{.............
a0c0 20 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d ....if.(m_AtlasPopulationMode.==
a0e0 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 2e 53 74 61 74 69 63 29 0a 20 20 20 .AtlasPopulationMode.Static)....
a100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e .................Debug.LogWarnin
a120 67 28 22 55 6e 61 62 6c 65 20 74 6f 20 61 64 64 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 66 g("Unable.to.add.characters.to.f
a140 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 62 65 ont.asset.[".+.this.name.+."].be
a160 63 61 75 73 65 20 69 74 73 20 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 69 73 cause.its.AtlasPopulationMode.is
a180 20 73 65 74 20 74 6f 20 53 74 61 74 69 63 2e 22 2c 20 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 .set.to.Static.",.this);........
a1a0 20 20 20 20 20 20 20 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a .........else.................{.
a1c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 57 61 72 ....................Debug.LogWar
a1e0 6e 69 6e 67 28 22 55 6e 61 62 6c 65 20 74 6f 20 61 64 64 20 63 68 61 72 61 63 74 65 72 73 20 74 ning("Unable.to.add.characters.t
a200 6f 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d o.font.asset.[".+.this.name.+."]
a220 20 62 65 63 61 75 73 65 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 55 6e 69 63 6f 64 65 20 6c 69 .because.the.provided.Unicode.li
a240 73 74 20 69 73 20 4e 75 6c 6c 20 6f 72 20 45 6d 70 74 79 2e 22 2c 20 74 68 69 73 29 3b 0a 20 20 st.is.Null.or.Empty.",.this);...
a260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
a280 20 6d 69 73 73 69 6e 67 55 6e 69 63 6f 64 65 73 20 3d 20 75 6e 69 63 6f 64 65 73 2e 54 6f 41 72 .missingUnicodes.=.unicodes.ToAr
a2a0 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 ray();.................return.fa
a2c0 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 lse;.............}..............
a2e0 50 72 6f 66 69 6c 65 72 2e 42 65 67 69 6e 53 61 6d 70 6c 65 28 22 54 4d 50 2e 54 72 79 41 64 64 Profiler.BeginSample("TMP.TryAdd
a300 43 68 61 72 61 63 74 65 72 22 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 61 Character");..............//.Loa
a320 64 20 66 6f 6e 74 20 66 61 63 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 46 6f 6e d.font.face..............if.(Fon
a340 74 45 6e 67 69 6e 65 2e 4c 6f 61 64 46 6f 6e 74 46 61 63 65 28 6d 5f 53 6f 75 72 63 65 46 6f 6e tEngine.LoadFontFace(m_SourceFon
a360 74 46 69 6c 65 2c 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 70 6f 69 6e 74 53 69 7a 65 29 20 21 3d 20 tFile,.m_FaceInfo.pointSize).!=.
a380 46 6f 6e 74 45 6e 67 69 6e 65 45 72 72 6f 72 2e 53 75 63 63 65 73 73 29 0a 20 20 20 20 20 20 20 FontEngineError.Success)........
a3a0 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e .....{.................Profiler.
a3c0 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 EndSample();..................mi
a3e0 73 73 69 6e 67 55 6e 69 63 6f 64 65 73 20 3d 20 75 6e 69 63 6f 64 65 73 2e 54 6f 41 72 72 61 79 ssingUnicodes.=.unicodes.ToArray
a400 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 ();.................return.false
a420 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ;.............}..............//.
a440 43 6c 65 61 72 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65 73 20 75 73 65 64 20 74 6f 20 74 72 Clear.data.structures.used.to.tr
a460 61 63 6b 20 77 68 69 63 68 20 67 6c 79 70 68 20 6e 65 65 64 73 20 74 6f 20 62 65 20 61 64 64 65 ack.which.glyph.needs.to.be.adde
a480 64 20 74 6f 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 d.to.atlas.texture..............
a4a0 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2e 43 6c 65 61 72 28 29 3b 0a 20 20 20 20 20 20 m_GlyphIndexList.Clear();.......
a4c0 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 73 54 6f 41 64 64 2e 43 6c 65 61 72 28 29 3b ......m_CharactersToAdd.Clear();
a4e0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 4d 69 73 73 69 6e 67 43 68 61 72 ..............bool.isMissingChar
a500 61 63 74 65 72 73 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 acters.=.false;.............int.
a520 75 6e 69 63 6f 64 65 43 6f 75 6e 74 20 3d 20 75 6e 69 63 6f 64 65 73 2e 4c 65 6e 67 74 68 3b 0a unicodeCount.=.unicodes.Length;.
a540 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c .............for.(int.i.=.0;.i.<
a560 20 75 6e 69 63 6f 64 65 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 .unicodeCount;.i++).............
a580 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 75 6e 69 63 6f 64 65 20 3d {.................uint.unicode.=
a5a0 20 75 6e 69 63 6f 64 65 73 5b 69 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f .unicodes[i];................../
a5c0 2f 20 43 68 65 63 6b 20 69 66 20 63 68 61 72 61 63 74 65 72 20 69 73 20 61 6c 72 65 61 64 79 20 /.Check.if.character.is.already.
a5e0 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 74 61 62 6c 65 contained.in.the.character.table
a600 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 ..................if.(m_Characte
a620 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 75 6e rLookupDictionary.ContainsKey(un
a640 69 63 6f 64 65 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 icode)).....................cont
a660 69 6e 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 74 68 inue;..................//.Get.th
a680 65 20 69 6e 64 65 78 20 6f 66 20 74 68 65 20 67 6c 79 70 68 20 66 6f 72 20 74 68 69 73 20 75 6e e.index.of.the.glyph.for.this.un
a6a0 69 63 6f 64 65 20 76 61 6c 75 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e icode.value..................uin
a6c0 74 20 67 6c 79 70 68 49 6e 64 65 78 20 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 t.glyphIndex.=.FontEngine.GetGly
a6e0 70 68 49 6e 64 65 78 28 75 6e 69 63 6f 64 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 phIndex(unicode);...............
a700 20 20 20 69 66 20 28 67 6c 79 70 68 49 6e 64 65 78 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 ...if.(glyphIndex.==.0).........
a720 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 ........{.....................is
a740 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 20 3d 20 74 72 75 65 3b 0a 20 20 20 20 20 20 MissingCharacters.=.true;.......
a760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 20 20 20 20 20 20 20 20 ..............continue;.........
a780 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 43 ........}..................TMP_C
a7a0 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 77 20 54 4d 50 5f 43 68 61 haracter.character.=.new.TMP_Cha
a7c0 72 61 63 74 65 72 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 49 6e 64 65 78 29 3b 0a 0a 20 20 racter(unicode,.glyphIndex);....
a7e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 67 6c 79 70 68 20 ..............//.Check.if.glyph.
a800 69 73 20 61 6c 72 65 61 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 66 6f 6e 74 is.already.contained.in.the.font
a820 20 61 73 73 65 74 20 61 73 20 74 68 65 20 73 61 6d 65 20 67 6c 79 70 68 20 6d 69 67 68 74 20 62 .asset.as.the.same.glyph.might.b
a840 65 20 72 65 66 65 72 65 6e 63 65 64 20 62 79 20 6d 75 6c 74 69 70 6c 65 20 63 68 61 72 61 63 74 e.referenced.by.multiple.charact
a860 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 ers..................if.(m_Glyph
a880 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 67 6c 79 LookupDictionary.ContainsKey(gly
a8a0 70 68 49 6e 64 65 78 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 phIndex)).................{.....
a8c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 2e 67 6c 79 70 68 20 ................character.glyph.
a8e0 3d 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 5b 67 6c 79 70 68 49 =.m_GlyphLookupDictionary[glyphI
a900 6e 64 65 78 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 ndex];.....................m_Cha
a920 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 20 racterTable.Add(character);.....
a940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 ................m_CharacterLooku
a960 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 68 61 72 61 63 74 pDictionary.Add(unicode,.charact
a980 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e er);......................contin
a9a0 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 ue;.................}...........
a9c0 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2e 41 64 64 28 67 6c 79 70 .......m_GlyphIndexList.Add(glyp
a9e0 68 49 6e 64 65 78 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 hIndex);.................m_Chara
aa00 63 74 65 72 73 54 6f 41 64 64 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 20 20 ctersToAdd.Add(character);......
aa20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 .......}..............if.(m_Glyp
aa40 68 49 6e 64 65 78 4c 69 73 74 2e 43 6f 75 6e 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 hIndexList.Count.==.0)..........
aa60 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 ...{.................//Debug.Log
aa80 57 61 72 6e 69 6e 67 28 22 4e 6f 20 63 68 61 72 61 63 74 65 72 73 20 77 69 6c 6c 20 62 65 20 61 Warning("No.characters.will.be.a
aaa0 64 64 65 64 20 74 6f 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d dded.to.font.asset.[".+.this.nam
aac0 65 20 2b 20 22 5d 20 65 69 74 68 65 72 20 62 65 63 61 75 73 65 20 74 68 65 79 20 61 72 65 20 61 e.+."].either.because.they.are.a
aae0 6c 72 65 61 64 79 20 70 72 65 73 65 6e 74 20 69 6e 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 lready.present.in.the.font.asset
ab00 20 6f 72 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 66 6f 6e 74 20 66 69 6c 65 2e 22 .or.missing.from.the.font.file."
ab20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 );.................Profiler.EndS
ab40 61 6d 70 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e ample();..................missin
ab60 67 55 6e 69 63 6f 64 65 73 20 3d 20 75 6e 69 63 6f 64 65 73 2e 54 6f 41 72 72 61 79 28 29 3b 0a gUnicodes.=.unicodes.ToArray();.
ab80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 ................return.false;...
aba0 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 69 ..........}..............//.Resi
abc0 7a 65 20 74 68 65 20 41 74 6c 61 73 20 54 65 78 74 75 72 65 20 74 6f 20 74 68 65 20 61 70 70 72 ze.the.Atlas.Texture.to.the.appr
abe0 6f 70 72 69 61 74 65 20 73 69 7a 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 opriate.size.............if.(m_A
ac00 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 tlasTextures[m_AtlasTextureIndex
ac20 5d 2e 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b ].width.==.0.||.m_AtlasTextures[
ac40 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 68 65 69 67 68 74 20 3d 3d 20 30 m_AtlasTextureIndex].height.==.0
ac60 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ).............{.................
ac80 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 53 65 74 74 69 6e 67 20 69 6e 69 74 69 61 6c 20 73 69 7a //Debug.Log("Setting.initial.siz
aca0 65 20 6f 66 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 75 73 65 64 20 62 79 20 66 6f 6e 74 20 e.of.atlas.texture.used.by.font.
acc0 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 2e 22 29 3b 0a 20 20 asset.[".+.this.name.+."].");...
ace0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f ..............m_AtlasTextures[m_
ad00 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 52 65 73 69 7a 65 28 6d 5f 41 74 6c 61 AtlasTextureIndex].Resize(m_Atla
ad20 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 sWidth,.m_AtlasHeight);.........
ad40 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 52 65 73 65 74 41 74 6c 61 73 54 65 78 ........FontEngine.ResetAtlasTex
ad60 74 75 72 65 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 ture(m_AtlasTextures[m_AtlasText
ad80 75 72 65 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 ureIndex]);.............}.......
ada0 20 20 20 20 20 20 20 62 6f 6f 6c 20 61 6c 6c 43 68 61 72 61 63 74 65 72 73 41 64 64 65 64 20 3d .......bool.allCharactersAdded.=
adc0 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 54 72 79 41 64 64 47 6c 79 70 68 73 54 6f 54 65 78 74 75 72 .FontEngine.TryAddGlyphsToTextur
ade0 65 28 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2c 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 e(m_GlyphIndexList,.m_AtlasPaddi
ae00 6e 67 2c 20 47 6c 79 70 68 50 61 63 6b 69 6e 67 4d 6f 64 65 2e 42 65 73 74 53 68 6f 72 74 53 69 ng,.GlyphPackingMode.BestShortSi
ae20 64 65 46 69 74 2c 20 6d 5f 46 72 65 65 47 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 55 73 65 64 47 deFit,.m_FreeGlyphRects,.m_UsedG
ae40 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 2c 20 6d 5f lyphRects,.m_AtlasRenderMode,.m_
ae60 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 AtlasTextures[m_AtlasTextureInde
ae80 78 5d 2c 20 6f 75 74 20 47 6c 79 70 68 5b 5d 20 67 6c 79 70 68 73 29 3b 0a 0a 20 20 20 20 20 20 x],.out.Glyph[].glyphs);........
aea0 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 67 6c 79 70 68 73 20 74 6f 20 72 65 6c 65 76 ......//.Add.new.glyphs.to.relev
aec0 61 6e 74 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 ant.data.structures.............
aee0 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 67 6c 79 70 68 73 2e 4c 65 6e 67 .for.(int.i.=.0;.i.<.glyphs.Leng
af00 74 68 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 th;.i++).............{..........
af20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 67 6c 79 70 68 73 5b 69 5d 3b 0a .......Glyph.glyph.=.glyphs[i];.
af40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 20 ................uint.glyphIndex.
af60 3d 20 67 6c 79 70 68 2e 69 6e 64 65 78 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a =.glyph.index;..................
af80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 67 6c 79 70 68 ................//.Add.new.glyph
afa0 20 74 6f 20 67 6c 79 70 68 20 74 61 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .to.glyph.table.................
afc0 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 .m_GlyphTable.Add(glyph);.......
afe0 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 ..........m_GlyphLookupDictionar
b000 79 2e 41 64 64 28 67 6c 79 70 68 49 6e 64 65 78 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 y.Add(glyphIndex,.glyph);.......
b020 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 ......}..............//.Add.new.
b040 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 72 65 6c 65 76 61 6e 74 20 64 61 74 61 20 73 74 72 75 characters.to.relevant.data.stru
b060 63 74 75 72 65 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d ctures..............for.(int.i.=
b080 20 30 3b 20 69 20 3c 20 6d 5f 43 68 61 72 61 63 74 65 72 73 54 6f 41 64 64 2e 43 6f 75 6e 74 3b .0;.i.<.m_CharactersToAdd.Count;
b0a0 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 .i++).............{.............
b0c0 20 20 20 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 20 3d 20 6d 5f ....TMP_Character.character.=.m_
b0e0 43 68 61 72 61 63 74 65 72 73 54 6f 41 64 64 5b 69 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 CharactersToAdd[i];.............
b100 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e ....if.(m_GlyphLookupDictionary.
b120 54 72 79 47 65 74 56 61 6c 75 65 28 63 68 61 72 61 63 74 65 72 2e 67 6c 79 70 68 49 6e 64 65 78 TryGetValue(character.glyphIndex
b140 2c 20 6f 75 74 20 47 6c 79 70 68 20 67 6c 79 70 68 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 ,.out.Glyph.glyph).==.false)....
b160 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
b180 20 20 20 73 5f 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 4c 69 73 74 2e 41 64 64 28 63 68 ...s_MissingCharacterList.Add(ch
b1a0 61 72 61 63 74 65 72 2e 75 6e 69 63 6f 64 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aracter.unicode);...............
b1c0 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......continue;.................
b1e0 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 2e 67 6c 79 }..................character.gly
b200 70 68 20 3d 20 67 6c 79 70 68 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 ph.=.glyph;.................m_Ch
b220 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 aracterTable.Add(character);....
b240 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 .............m_CharacterLookupDi
b260 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 2e 75 6e 69 63 6f 64 65 2c 20 ctionary.Add(character.unicode,.
b280 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 character);.............}.......
b2a0 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 .......#if.UNITY_EDITOR.........
b2c0 20 20 20 20 2f 2f 20 4d 61 6b 65 73 20 74 68 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 ....//.Makes.the.changes.to.the.
b2e0 66 6f 6e 74 20 61 73 73 65 74 20 70 65 72 73 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 font.asset.persistent...........
b300 20 20 20 69 66 20 28 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 ...if.(UnityEditor.EditorUtility
b320 2e 49 73 50 65 72 73 69 73 74 65 6e 74 28 74 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 .IsPersistent(this))............
b340 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 .{.................TMP_EditorRes
b360 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 ourceManager.RegisterResourceFor
b380 55 70 64 61 74 65 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 Update(this);.............}.....
b3a0 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 ........#endif..............Prof
b3c0 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d iler.EndSample();..............m
b3e0 69 73 73 69 6e 67 55 6e 69 63 6f 64 65 73 20 3d 20 6e 75 6c 6c 3b 0a 0a 20 20 20 20 20 20 20 20 issingUnicodes.=.null;..........
b400 20 20 20 20 69 66 20 28 73 5f 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 4c 69 73 74 2e 43 ....if.(s_MissingCharacterList.C
b420 6f 75 6e 74 20 3e 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e ount.>.0).................missin
b440 67 55 6e 69 63 6f 64 65 73 20 3d 20 73 5f 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 4c 69 gUnicodes.=.s_MissingCharacterLi
b460 73 74 2e 54 6f 41 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 st.ToArray();..............retur
b480 6e 20 61 6c 6c 43 68 61 72 61 63 74 65 72 73 41 64 64 65 64 20 26 26 20 21 69 73 4d 69 73 73 69 n.allCharactersAdded.&&.!isMissi
b4a0 6e 67 43 68 61 72 61 63 74 65 72 73 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 ngCharacters;.........}.........
b4c0 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 72 79 20 61 .///.<summary>.........///.Try.a
b4e0 64 64 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66 72 6f 6d 20 74 68 65 20 70 72 dding.the.characters.from.the.pr
b500 6f 76 69 64 65 64 20 73 74 72 69 6e 67 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e ovided.string.to.the.font.asset.
b520 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 .........///.</summary>.........
b540 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 74 65 72 73 22 3e 53 74 72 ///.<param.name="characters">Str
b560 69 6e 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 74 6f ing.containing.the.characters.to
b580 20 61 64 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 3c 2f 70 61 72 61 6d 3e 0a .add.to.the.font.asset.</param>.
b5a0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e 73 20 74 72 75 ........///.<returns>Returns.tru
b5c0 65 20 69 66 20 61 6c 6c 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 77 65 72 65 20 73 75 63 e.if.all.the.characters.were.suc
b5e0 63 65 73 73 66 75 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 cessfully.added.to.the.font.asse
b600 74 2e 20 52 65 74 75 72 6e 20 66 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 72 65 74 75 t..Return.false.otherwise.</retu
b620 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 54 72 79 41 64 64 43 rns>.........public.bool.TryAddC
b640 68 61 72 61 63 74 65 72 73 28 73 74 72 69 6e 67 20 63 68 61 72 61 63 74 65 72 73 29 0a 20 20 20 haracters(string.characters)....
b660 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 54 72 79 41 64 64 .....{.............return.TryAdd
b680 43 68 61 72 61 63 74 65 72 73 28 63 68 61 72 61 63 74 65 72 73 2c 20 6f 75 74 20 73 74 72 69 6e Characters(characters,.out.strin
b6a0 67 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a g.missingCharacters);.........}.
b6c0 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 ..........///.<summary>.........
b6e0 2f 2f 2f 20 54 72 79 20 61 64 64 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 66 72 ///.Try.adding.the.characters.fr
b700 6f 6d 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 73 74 72 69 6e 67 20 74 6f 20 74 68 65 20 66 6f om.the.provided.string.to.the.fo
b720 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e nt.asset..........///.</summary>
b740 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 .........///.<param.name="charac
b760 74 65 72 73 22 3e 53 74 72 69 6e 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 63 68 61 72 ters">String.containing.the.char
b780 61 63 74 65 72 73 20 74 6f 20 61 64 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e acters.to.add.to.the.font.asset.
b7a0 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 </param>.........///.<param.name
b7c0 3d 22 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 22 3e 53 74 72 69 6e 67 20 63 6f 6e 74 ="missingCharacters">String.cont
b7e0 61 69 6e 69 6e 67 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 20 74 68 61 74 20 63 6f 75 6c 64 aining.the.characters.that.could
b800 20 6e 6f 74 20 62 65 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e .not.be.added.to.the.font.asset.
b820 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 </param>.........///.<returns>Re
b840 74 75 72 6e 73 20 74 72 75 65 20 69 66 20 61 6c 6c 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 turns.true.if.all.the.characters
b860 20 77 65 72 65 20 73 75 63 63 65 73 73 66 75 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 .were.successfully.added.to.the.
b880 66 6f 6e 74 20 61 73 73 65 74 2e 20 52 65 74 75 72 6e 20 66 61 6c 73 65 20 6f 74 68 65 72 77 69 font.asset..Return.false.otherwi
b8a0 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f se.</returns>.........public.boo
b8c0 6c 20 54 72 79 41 64 64 43 68 61 72 61 63 74 65 72 73 28 73 74 72 69 6e 67 20 63 68 61 72 61 63 l.TryAddCharacters(string.charac
b8e0 74 65 72 73 2c 20 6f 75 74 20 73 74 72 69 6e 67 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 ters,.out.string.missingCharacte
b900 72 73 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b rs).........{.............//.Mak
b920 65 20 73 75 72 65 20 66 6f 6e 74 20 61 73 73 65 74 20 69 73 20 73 65 74 20 74 6f 20 64 79 6e 61 e.sure.font.asset.is.set.to.dyna
b940 6d 69 63 20 61 6e 64 20 74 68 61 74 20 77 65 20 68 61 76 65 20 61 20 76 61 6c 69 64 20 6c 69 73 mic.and.that.we.have.a.valid.lis
b960 74 20 6f 66 20 63 68 61 72 61 63 74 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 t.of.characters..............if.
b980 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 63 68 61 72 61 63 74 65 72 73 (string.IsNullOrEmpty(characters
b9a0 29 20 7c 7c 20 6d 5f 41 74 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 ).||.m_AtlasPopulationMode.==.At
b9c0 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 2e 53 74 61 74 69 63 29 0a 20 20 20 20 20 20 lasPopulationMode.Static).......
b9e0 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 74 ......{.................if.(m_At
ba00 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 3d 3d 20 41 74 6c 61 73 50 6f 70 75 6c 61 lasPopulationMode.==.AtlasPopula
ba20 74 69 6f 6e 4d 6f 64 65 2e 53 74 61 74 69 63 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tionMode.Static)................
ba40 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 55 6e 61 62 6c 65 20 74 6f .....Debug.LogWarning("Unable.to
ba60 20 61 64 64 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 .add.characters.to.font.asset.["
ba80 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 62 65 63 61 75 73 65 20 69 74 73 20 41 74 .+.this.name.+."].because.its.At
baa0 6c 61 73 50 6f 70 75 6c 61 74 69 6f 6e 4d 6f 64 65 20 69 73 20 73 65 74 20 74 6f 20 53 74 61 74 lasPopulationMode.is.set.to.Stat
bac0 69 63 2e 22 2c 20 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 ic.",.this);.................els
bae0 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 e.................{.............
bb00 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 55 6e 61 62 6c 65 ........Debug.LogWarning("Unable
bb20 20 74 6f 20 61 64 64 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 66 6f 6e 74 20 61 73 73 65 74 .to.add.characters.to.font.asset
bb40 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 62 65 63 61 75 73 65 20 74 68 65 .[".+.this.name.+."].because.the
bb60 20 70 72 6f 76 69 64 65 64 20 63 68 61 72 61 63 74 65 72 20 6c 69 73 74 20 69 73 20 4e 75 6c 6c .provided.character.list.is.Null
bb80 20 6f 72 20 45 6d 70 74 79 2e 22 2c 20 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 .or.Empty.",.this);.............
bba0 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 ....}..................missingCh
bbc0 61 72 61 63 74 65 72 73 20 3d 20 63 68 61 72 61 63 74 65 72 73 3b 0a 20 20 20 20 20 20 20 20 20 aracters.=.characters;..........
bbe0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 .......return.false;............
bc00 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 61 64 20 66 6f 6e 74 20 66 61 63 .}..............//.Load.font.fac
bc20 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 46 6f 6e 74 45 6e 67 69 6e 65 2e 4c 6f e..............if.(FontEngine.Lo
bc40 61 64 46 6f 6e 74 46 61 63 65 28 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 2c 20 6d 5f 46 adFontFace(m_SourceFontFile,.m_F
bc60 61 63 65 49 6e 66 6f 2e 70 6f 69 6e 74 53 69 7a 65 29 20 21 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 aceInfo.pointSize).!=.FontEngine
bc80 45 72 72 6f 72 2e 53 75 63 63 65 73 73 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 Error.Success).............{....
bca0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 20 3d .............missingCharacters.=
bcc0 20 63 68 61 72 61 63 74 65 72 73 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 .characters;.................ret
bce0 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 urn.false;.............}........
bd00 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65 73 20 75 ......//.Clear.data.structures.u
bd20 73 65 64 20 74 6f 20 74 72 61 63 6b 20 77 68 69 63 68 20 67 6c 79 70 68 20 6e 65 65 64 73 20 74 sed.to.track.which.glyph.needs.t
bd40 6f 20 62 65 20 61 64 64 65 64 20 74 6f 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 0a 20 20 20 o.be.added.to.atlas.texture.....
bd60 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2e 43 6c 65 61 72 28 .........m_GlyphIndexList.Clear(
bd80 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 73 54 6f 41 64 64 );.............m_CharactersToAdd
bda0 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 4d 69 .Clear();..............bool.isMi
bdc0 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 ssingCharacters.=.false;........
bde0 20 20 20 20 20 69 6e 74 20 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 63 68 61 72 61 63 .....int.characterCount.=.charac
be00 74 65 72 73 2e 4c 65 6e 67 74 68 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 74 65 ters.Length;..............//.Ite
be20 72 61 74 65 20 6f 76 65 72 20 65 61 63 68 20 6f 66 20 74 68 65 20 72 65 71 75 65 73 74 65 64 20 rate.over.each.of.the.requested.
be40 63 68 61 72 61 63 74 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 characters..............for.(int
be60 20 69 20 3d 20 30 3b 20 69 20 3c 20 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 20 69 2b 2b 29 .i.=.0;.i.<.characterCount;.i++)
be80 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 .............{.................u
bea0 69 6e 74 20 75 6e 69 63 6f 64 65 20 3d 20 63 68 61 72 61 63 74 65 72 73 5b 69 5d 3b 0a 0a 20 20 int.unicode.=.characters[i];....
bec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 63 68 61 72 61 63 ..............//.Check.if.charac
bee0 74 65 72 20 69 73 20 61 6c 72 65 61 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 ter.is.already.contained.in.the.
bf00 63 68 61 72 61 63 74 65 72 20 74 61 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 character.table.................
bf20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 .if.(m_CharacterLookupDictionary
bf40 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 75 6e 69 63 6f 64 65 29 29 0a 20 20 20 20 20 20 20 20 20 .ContainsKey(unicode))..........
bf60 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 ...........continue;............
bf80 20 20 20 20 20 20 2f 2f 20 47 65 74 20 74 68 65 20 69 6e 64 65 78 20 6f 66 20 74 68 65 20 67 6c ......//.Get.the.index.of.the.gl
bfa0 79 70 68 20 66 6f 72 20 74 68 69 73 20 75 6e 69 63 6f 64 65 20 76 61 6c 75 65 2e 0a 20 20 20 20 yph.for.this.unicode.value......
bfc0 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 20 3d 20 46 6f ............uint.glyphIndex.=.Fo
bfe0 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 70 68 49 6e 64 65 78 28 75 6e 69 63 6f 64 65 29 3b ntEngine.GetGlyphIndex(unicode);
c000 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6b 69 70 20 6d 69 73 73 69 6e ..................//.Skip.missin
c020 67 20 67 6c 79 70 68 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 6c 79 g.glyphs.................if.(gly
c040 70 68 49 6e 64 65 78 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a phIndex.==.0).................{.
c060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 69 67 68 74 20 77 61 6e ....................//.Might.wan
c080 74 20 74 6f 20 6b 65 65 70 20 74 72 61 63 6b 20 61 6e 64 20 72 65 70 6f 72 74 20 74 68 65 20 6d t.to.keep.track.and.report.the.m
c0a0 69 73 73 69 6e 67 20 63 68 61 72 61 63 74 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 issing.characters...............
c0c0 20 20 20 20 20 20 20 69 73 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 20 3d 20 74 72 75 .......isMissingCharacters.=.tru
c0e0 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b e;.....................continue;
c100 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
c120 20 20 20 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 ....TMP_Character.character.=.ne
c140 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 49 6e w.TMP_Character(unicode,.glyphIn
c160 64 65 78 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 dex);..................//.Check.
c180 69 66 20 67 6c 79 70 68 20 69 73 20 61 6c 72 65 61 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e if.glyph.is.already.contained.in
c1a0 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 61 73 20 74 68 65 20 73 61 6d 65 20 67 6c 79 70 .the.font.asset.as.the.same.glyp
c1c0 68 20 6d 69 67 68 74 20 62 65 20 72 65 66 65 72 65 6e 63 65 64 20 62 79 20 6d 75 6c 74 69 70 6c h.might.be.referenced.by.multipl
c1e0 65 20 63 68 61 72 61 63 74 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 e.characters..................if
c200 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 .(m_GlyphLookupDictionary.Contai
c220 6e 73 4b 65 79 28 67 6c 79 70 68 49 6e 64 65 78 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nsKey(glyphIndex))..............
c240 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 ...{.....................charact
c260 65 72 2e 67 6c 79 70 68 20 3d 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 er.glyph.=.m_GlyphLookupDictiona
c280 72 79 5b 67 6c 79 70 68 49 6e 64 65 78 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ry[glyphIndex];.................
c2a0 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 ....m_CharacterTable.Add(charact
c2c0 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 er);.....................m_Chara
c2e0 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 cterLookupDictionary.Add(unicode
c300 2c 20 63 68 61 72 61 63 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ,.character);...................
c320 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a ...continue;.................}..
c340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 67 6c 79 70 68 20 74 6f 20 ................//.Add.glyph.to.
c360 6c 69 73 74 20 6f 66 20 67 6c 79 70 68 73 20 74 6f 20 61 64 64 20 61 6e 64 20 67 6c 79 70 68 20 list.of.glyphs.to.add.and.glyph.
c380 6c 6f 6f 6b 75 70 20 6d 61 70 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c lookup.map..................m_Gl
c3a0 79 70 68 49 6e 64 65 78 4c 69 73 74 2e 41 64 64 28 67 6c 79 70 68 49 6e 64 65 78 29 3b 0a 20 20 yphIndexList.Add(glyphIndex);...
c3c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 73 54 6f 41 64 64 2e ..............m_CharactersToAdd.
c3e0 41 64 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 Add(character);.............}...
c400 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2e ...........if.(m_GlyphIndexList.
c420 43 6f 75 6e 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 Count.==.0).............{.......
c440 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 20 3d 20 63 68 ..........missingCharacters.=.ch
c460 61 72 61 63 74 65 72 73 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e aracters;.................return
c480 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 .false;.............}...........
c4a0 20 20 20 2f 2f 20 52 65 73 69 7a 65 20 74 68 65 20 41 74 6c 61 73 20 54 65 78 74 75 72 65 20 74 ...//.Resize.the.Atlas.Texture.t
c4c0 6f 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 69 7a 65 0a 20 20 20 20 20 20 20 20 20 o.the.appropriate.size..........
c4e0 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 ...if.(m_AtlasTextures[m_AtlasTe
c500 78 74 75 72 65 49 6e 64 65 78 5d 2e 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 41 74 6c 61 xtureIndex].width.==.0.||.m_Atla
c520 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 68 sTextures[m_AtlasTextureIndex].h
c540 65 69 67 68 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 eight.==.0).............{.......
c560 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 53 65 74 74 69 6e 67 20 69 ..........//Debug.Log("Setting.i
c580 6e 69 74 69 61 6c 20 73 69 7a 65 20 6f 66 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 75 73 65 nitial.size.of.atlas.texture.use
c5a0 64 20 62 79 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b d.by.font.asset.[".+.this.name.+
c5c0 20 22 5d 2e 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 ."].");.................m_AtlasT
c5e0 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 52 65 73 extures[m_AtlasTextureIndex].Res
c600 69 7a 65 28 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 29 ize(m_AtlasWidth,.m_AtlasHeight)
c620 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 52 65 73 ;.................FontEngine.Res
c640 65 74 41 74 6c 61 73 54 65 78 74 75 72 65 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d etAtlasTexture(m_AtlasTextures[m
c660 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 _AtlasTextureIndex]);...........
c680 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 61 6c 6c 43 68 61 72 61 63 74 ..}..............bool.allCharact
c6a0 65 72 73 41 64 64 65 64 20 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 54 72 79 41 64 64 47 6c 79 70 ersAdded.=.FontEngine.TryAddGlyp
c6c0 68 73 54 6f 54 65 78 74 75 72 65 28 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2c 20 6d 5f hsToTexture(m_GlyphIndexList,.m_
c6e0 41 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 47 6c 79 70 68 50 61 63 6b 69 6e 67 4d 6f 64 65 2e 42 AtlasPadding,.GlyphPackingMode.B
c700 65 73 74 53 68 6f 72 74 53 69 64 65 46 69 74 2c 20 6d 5f 46 72 65 65 47 6c 79 70 68 52 65 63 74 estShortSideFit,.m_FreeGlyphRect
c720 73 2c 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 41 74 6c 61 73 52 65 6e 64 s,.m_UsedGlyphRects,.m_AtlasRend
c740 65 72 4d 6f 64 65 2c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 erMode,.m_AtlasTextures[m_AtlasT
c760 65 78 74 75 72 65 49 6e 64 65 78 5d 2c 20 6f 75 74 20 47 6c 79 70 68 5b 5d 20 67 6c 79 70 68 73 extureIndex],.out.Glyph[].glyphs
c780 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 );..............for.(int.i.=.0;.
c7a0 69 20 3c 20 67 6c 79 70 68 73 2e 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 i.<.glyphs.Length;.i++).........
c7c0 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 ....{.................Glyph.glyp
c7e0 68 20 3d 20 67 6c 79 70 68 73 5b 69 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 h.=.glyphs[i];.................u
c800 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 20 3d 20 67 6c 79 70 68 2e 69 6e 64 65 78 3b 0a 0a 20 int.glyphIndex.=.glyph.index;...
c820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 67 6c 79 70 68 20 ...............//.Add.new.glyph.
c840 74 6f 20 67 6c 79 70 68 20 74 61 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 to.glyph.table..................
c860 6d 5f 47 6c 79 70 68 54 61 62 6c 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 m_GlyphTable.Add(glyph);........
c880 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 .........m_GlyphLookupDictionary
c8a0 2e 41 64 64 28 67 6c 79 70 68 49 6e 64 65 78 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 .Add(glyphIndex,.glyph);........
c8c0 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 61 .....}..............missingChara
c8e0 63 74 65 72 73 20 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0a 0a 20 20 20 20 20 20 20 20 20 cters.=.string.Empty;...........
c900 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 72 65 6c 65 ...//.Add.new.characters.to.rele
c920 76 61 6e 74 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65 73 2e 0a 20 20 20 20 20 20 20 20 20 20 vant.data.structures............
c940 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 43 68 61 72 61 63 74 65 ..for.(int.i.=.0;.i.<.m_Characte
c960 72 73 54 6f 41 64 64 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 rsToAdd.Count;.i++).............
c980 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 {.................TMP_Character.
c9a0 63 68 61 72 61 63 74 65 72 20 3d 20 6d 5f 43 68 61 72 61 63 74 65 72 73 54 6f 41 64 64 5b 69 5d character.=.m_CharactersToAdd[i]
c9c0 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f ;..................if.(m_GlyphLo
c9e0 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 54 72 79 47 65 74 56 61 6c 75 65 28 63 68 61 72 61 okupDictionary.TryGetValue(chara
ca00 63 74 65 72 2e 67 6c 79 70 68 49 6e 64 65 78 2c 20 6f 75 74 20 47 6c 79 70 68 20 67 6c 79 70 68 cter.glyphIndex,.out.Glyph.glyph
ca20 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 ).==.false).................{...
ca40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 52 65 76 69 73 ..................//.TODO:.Revis
ca60 65 20 74 6f 20 61 76 6f 69 64 20 73 74 72 69 6e 67 20 63 6f 6e 63 61 74 65 6e 61 74 69 6f 6e 2e e.to.avoid.string.concatenation.
ca80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 73 73 69 6e 67 43 68 61 72 .....................missingChar
caa0 61 63 74 65 72 73 20 2b 3d 20 28 63 68 61 72 29 63 68 61 72 61 63 74 65 72 2e 75 6e 69 63 6f 64 acters.+=.(char)character.unicod
cac0 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b e;.....................continue;
cae0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
cb00 20 20 20 20 63 68 61 72 61 63 74 65 72 2e 67 6c 79 70 68 20 3d 20 67 6c 79 70 68 3b 0a 20 20 20 ....character.glyph.=.glyph;....
cb20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 .............m_CharacterTable.Ad
cb40 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f d(character);.................m_
cb60 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 63 68 CharacterLookupDictionary.Add(ch
cb80 61 72 61 63 74 65 72 2e 75 6e 69 63 6f 64 65 2c 20 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 aracter.unicode,.character);....
cba0 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 .........}..............#if.UNIT
cbc0 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 73 20 74 68 Y_EDITOR.............//.Makes.th
cbe0 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 70 65 72 73 e.changes.to.the.font.asset.pers
cc00 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 55 6e 69 74 79 45 64 69 istent..............if.(UnityEdi
cc20 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 49 73 50 65 72 73 69 73 74 65 6e 74 28 74 tor.EditorUtility.IsPersistent(t
cc40 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 his)).............{.............
cc60 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 52 65 ....TMP_EditorResourceManager.Re
cc80 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 55 70 64 61 74 65 28 74 68 69 73 29 3b 0a 20 gisterResourceForUpdate(this);..
cca0 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a ...........}.............#endif.
ccc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 6c 6c 43 68 61 72 61 63 74 65 72 .............return.allCharacter
cce0 73 41 64 64 65 64 20 26 26 20 21 69 73 4d 69 73 73 69 6e 67 43 68 61 72 61 63 74 65 72 73 3b 0a sAdded.&&.!isMissingCharacters;.
cd00 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 ........}...........///.<summary
cd20 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 4f 54 20 55 53 45 44 20 43 55 52 52 45 4e 54 4c 59 >.........///.NOT.USED.CURRENTLY
cd40 20 2d 20 54 72 79 20 61 64 64 69 6e 67 20 63 68 61 72 61 63 74 65 72 20 75 73 69 6e 67 20 55 6e .-.Try.adding.character.using.Un
cd60 69 63 6f 64 65 20 76 61 6c 75 65 20 74 6f 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 icode.value.to.font.asset.......
cd80 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 ...///.</summary>.........///.<p
cda0 61 72 61 6d 20 6e 61 6d 65 3d 22 75 6e 69 63 6f 64 65 22 3e 54 68 65 20 55 6e 69 63 6f 64 65 20 aram.name="unicode">The.Unicode.
cdc0 76 61 6c 75 65 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 2e 3c 2f 70 61 72 61 6d 3e 0a value.of.the.character.</param>.
cde0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 61 72 61 63 74 ........///.<param.name="charact
ce00 65 72 22 3e 54 68 65 20 63 68 61 72 61 63 74 65 72 20 64 61 74 61 20 69 66 20 73 75 63 63 65 73 er">The.character.data.if.succes
ce20 73 66 75 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 20 sfully.added.to.the.font.asset..
ce40 4e 75 6c 6c 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 Null.otherwise.</param>.........
ce60 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e 73 20 74 72 75 65 20 69 66 20 74 68 65 ///.<returns>Returns.true.if.the
ce80 20 63 68 61 72 61 63 74 65 72 20 68 61 73 20 62 65 65 6e 20 61 64 64 65 64 2e 20 46 61 6c 73 65 .character.has.been.added..False
cea0 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 20 20 20 69 6e .otherwise.</returns>.........in
cec0 74 65 72 6e 61 6c 20 62 6f 6f 6c 20 54 72 79 41 64 64 43 68 61 72 61 63 74 65 72 5f 49 6e 74 65 ternal.bool.TryAddCharacter_Inte
cee0 72 6e 61 6c 28 75 69 6e 74 20 75 6e 69 63 6f 64 65 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 rnal(uint.unicode).........{....
cf00 20 20 20 20 20 20 20 20 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 .........TMP_Character.character
cf20 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 20 20 .=.null;........................
cf40 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 63 68 61 72 61 63 74 65 72 20 69 73 20 61 6c 72 65 61 ..//.Check.if.character.is.alrea
cf60 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 74 61 dy.contained.in.the.character.ta
cf80 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 ble..............if.(m_Character
cfa0 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 75 6e 69 LookupDictionary.ContainsKey(uni
cfc0 63 6f 64 65 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 code)).................return.tr
cfe0 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 ue;..............uint.glyphIndex
d000 20 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 70 68 49 6e 64 65 78 28 75 6e 69 63 .=.FontEngine.GetGlyphIndex(unic
d020 6f 64 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 6c 79 70 68 49 6e 64 65 78 ode);.............if.(glyphIndex
d040 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 .==.0).................return.fa
d060 6c 73 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 67 6c lse;..............//.Check.if.gl
d080 79 70 68 20 69 73 20 61 6c 72 65 61 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 yph.is.already.contained.in.the.
d0a0 66 6f 6e 74 20 61 73 73 65 74 20 61 73 20 74 68 65 20 73 61 6d 65 20 67 6c 79 70 68 20 6d 69 67 font.asset.as.the.same.glyph.mig
d0c0 68 74 20 62 65 20 72 65 66 65 72 65 6e 63 65 64 20 62 79 20 6d 75 6c 74 69 70 6c 65 20 63 68 61 ht.be.referenced.by.multiple.cha
d0e0 72 61 63 74 65 72 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 racters..............if.(m_Glyph
d100 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 67 6c 79 LookupDictionary.ContainsKey(gly
d120 70 68 49 6e 64 65 78 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 phIndex)).............{.........
d140 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 ........character.=.new.TMP_Char
d160 61 63 74 65 72 28 75 6e 69 63 6f 64 65 2c 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 acter(unicode,.m_GlyphLookupDict
d180 69 6f 6e 61 72 79 5b 67 6c 79 70 68 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 ionary[glyphIndex]);............
d1a0 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 .....m_CharacterTable.Add(charac
d1c0 74 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 ter);.................m_Characte
d1e0 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 rLookupDictionary.Add(unicode,.c
d200 68 61 72 61 63 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 69 haracter);..................//#i
d220 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f f.UNITY_EDITOR................./
d240 2f 20 4d 61 6b 65 73 20 74 68 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 /.Makes.the.changes.to.the.font.
d260 61 73 73 65 74 20 70 65 72 73 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 asset.persistent................
d280 20 20 2f 2f 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 3a 20 54 68 69 73 20 63 6f 75 6c 64 20 62 65 ..//.OPTIMIZATION:.This.could.be
d2a0 20 68 61 6e 64 6c 65 64 20 77 68 65 6e 20 65 78 69 74 69 6e 67 20 50 6c 61 79 20 6d 6f 64 65 20 .handled.when.exiting.Play.mode.
d2c0 69 66 20 77 65 20 61 64 64 65 64 20 61 6e 79 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 73 20 74 if.we.added.any.new.characters.t
d2e0 6f 20 74 68 65 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 o.the.asset..................//.
d300 43 6f 75 6c 64 20 61 6c 73 6f 20 61 64 64 20 73 6f 6d 65 20 75 70 64 61 74 65 20 72 65 67 69 73 Could.also.add.some.update.regis
d320 74 72 79 20 74 6f 20 68 61 6e 64 6c 65 20 74 68 69 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 try.to.handle.this..............
d340 20 20 20 20 2f 2f 53 6f 72 74 47 6c 79 70 68 54 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 ....//SortGlyphTable();.........
d360 20 20 20 20 20 20 20 20 2f 2f 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c ........//UnityEditor.EditorUtil
d380 69 74 79 2e 53 65 74 44 69 72 74 79 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ity.SetDirty(this);.............
d3a0 20 20 20 20 2f 2f 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 ....//#endif..................re
d3c0 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 turn.true;.............}........
d3e0 20 20 20 20 20 20 2f 2f 20 52 65 73 69 7a 65 20 74 68 65 20 41 74 6c 61 73 20 54 65 78 74 75 72 ......//.Resize.the.Atlas.Textur
d400 65 20 74 6f 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 69 7a 65 0a 20 20 20 20 20 20 e.to.the.appropriate.size.......
d420 20 20 20 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 ......if.(m_AtlasTextures[m_Atla
d440 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 41 sTextureIndex].width.==.0.||.m_A
d460 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 tlasTextures[m_AtlasTextureIndex
d480 5d 2e 68 65 69 67 68 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 ].height.==.0).............{....
d4a0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 53 65 74 74 69 6e .............//Debug.Log("Settin
d4c0 67 20 69 6e 69 74 69 61 6c 20 73 69 7a 65 20 6f 66 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 g.initial.size.of.atlas.texture.
d4e0 75 73 65 64 20 62 79 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d used.by.font.asset.[".+.this.nam
d500 65 20 2b 20 22 5d 2e 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c e.+."].");.................m_Atl
d520 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e asTextures[m_AtlasTextureIndex].
d540 52 65 73 69 7a 65 28 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 Resize(m_AtlasWidth,.m_AtlasHeig
d560 68 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e ht);.................FontEngine.
d580 52 65 73 65 74 41 74 6c 61 73 54 65 78 74 75 72 65 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 ResetAtlasTexture(m_AtlasTexture
d5a0 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 s[m_AtlasTextureIndex]);........
d5c0 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 46 6f 6e 74 45 6e 67 69 .....}..............if.(FontEngi
d5e0 6e 65 2e 54 72 79 41 64 64 47 6c 79 70 68 54 6f 54 65 78 74 75 72 65 28 67 6c 79 70 68 49 6e 64 ne.TryAddGlyphToTexture(glyphInd
d600 65 78 2c 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 47 6c 79 70 68 50 61 63 6b 69 6e 67 ex,.m_AtlasPadding,.GlyphPacking
d620 4d 6f 64 65 2e 42 65 73 74 53 68 6f 72 74 53 69 64 65 46 69 74 2c 20 6d 5f 46 72 65 65 47 6c 79 Mode.BestShortSideFit,.m_FreeGly
d640 70 68 52 65 63 74 73 2c 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 41 74 6c phRects,.m_UsedGlyphRects,.m_Atl
d660 61 73 52 65 6e 64 65 72 4d 6f 64 65 2c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f asRenderMode,.m_AtlasTextures[m_
d680 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2c 20 6f 75 74 20 47 6c 79 70 68 20 67 6c AtlasTextureIndex],.out.Glyph.gl
d6a0 79 70 68 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 yph)).............{.............
d6c0 20 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 67 6c 79 70 68 20 74 6f 20 67 6c 79 70 68 20 74 61 ....//.Add.new.glyph.to.glyph.ta
d6e0 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 54 61 62 6c ble..................m_GlyphTabl
d700 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f e.Add(glyph);.................m_
d720 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 67 6c 79 70 68 49 GlyphLookupDictionary.Add(glyphI
d740 6e 64 65 78 2c 20 67 6c 79 70 68 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ndex,.glyph);................../
d760 2f 20 41 64 64 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 /.Add.new.character.............
d780 20 20 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 ....character.=.new.TMP_Characte
d7a0 72 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 r(unicode,.glyph);..............
d7c0 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 65 ...m_CharacterTable.Add(characte
d7e0 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c r);.................m_CharacterL
d800 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 68 61 ookupDictionary.Add(unicode,.cha
d820 72 61 63 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 69 66 20 racter);..................//#if.
d840 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 UNITY_EDITOR.................//.
d860 4d 61 6b 65 73 20 74 68 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 Makes.the.changes.to.the.font.as
d880 73 65 74 20 70 65 72 73 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 set.persistent..................
d8a0 2f 2f 20 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 3a 20 54 68 69 73 20 63 6f 75 6c 64 20 62 65 20 68 //.OPTIMIZATION:.This.could.be.h
d8c0 61 6e 64 6c 65 64 20 77 68 65 6e 20 65 78 69 74 69 6e 67 20 50 6c 61 79 20 6d 6f 64 65 20 69 66 andled.when.exiting.Play.mode.if
d8e0 20 77 65 20 61 64 64 65 64 20 61 6e 79 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 .we.added.any.new.characters.to.
d900 74 68 65 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f the.asset..................//.Co
d920 75 6c 64 20 61 6c 73 6f 20 61 64 64 20 73 6f 6d 65 20 75 70 64 61 74 65 20 72 65 67 69 73 74 72 uld.also.add.some.update.registr
d940 79 20 74 6f 20 68 61 6e 64 6c 65 20 74 68 69 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 y.to.handle.this................
d960 20 20 2f 2f 53 6f 72 74 47 6c 79 70 68 54 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 ..//SortGlyphTable();...........
d980 20 20 20 20 20 20 2f 2f 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 ......//UnityEditor.EditorUtilit
d9a0 79 2e 53 65 74 44 69 72 74 79 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 y.SetDirty(this);...............
d9c0 20 20 2f 2f 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 ..//#endif..................retu
d9e0 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 rn.true;.............}..........
da00 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 ....return.false;.........}.....
da20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ......///.<summary>.........///.
da40 54 6f 20 62 65 20 72 65 6d 6f 76 65 64 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d To.be.removed..........///.</sum
da60 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 75 mary>.........///.<param.name="u
da80 6e 69 63 6f 64 65 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 nicode"></param>.........///.<pa
daa0 72 61 6d 20 6e 61 6d 65 3d 22 67 6c 79 70 68 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 ram.name="glyph"></param>.......
dac0 20 20 69 6e 74 65 72 6e 61 6c 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 41 64 64 43 68 61 72 ..internal.TMP_Character.AddChar
dae0 61 63 74 65 72 5f 49 6e 74 65 72 6e 61 6c 28 75 69 6e 74 20 75 6e 69 63 6f 64 65 2c 20 47 6c 79 acter_Internal(uint.unicode,.Gly
db00 70 68 20 67 6c 79 70 68 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ph.glyph).........{.............
db20 2f 2f 20 43 68 65 63 6b 20 69 66 20 63 68 61 72 61 63 74 65 72 20 69 73 20 61 6c 72 65 61 64 79 //.Check.if.character.is.already
db40 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 74 61 62 6c .contained.in.the.character.tabl
db60 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f e..............if.(m_CharacterLo
db80 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 75 6e 69 63 6f okupDictionary.ContainsKey(unico
dba0 64 65 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 43 68 de)).................return.m_Ch
dbc0 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 5b 75 6e 69 63 6f 64 65 5d aracterLookupDictionary[unicode]
dbe0 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 20 3d ;..............uint.glyphIndex.=
dc00 20 67 6c 79 70 68 2e 69 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 .glyph.index;..............//.Re
dc20 73 69 7a 65 20 74 68 65 20 41 74 6c 61 73 20 54 65 78 74 75 72 65 20 74 6f 20 74 68 65 20 61 70 size.the.Atlas.Texture.to.the.ap
dc40 70 72 6f 70 72 69 61 74 65 20 73 69 7a 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d propriate.size.............if.(m
dc60 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 _AtlasTextures[m_AtlasTextureInd
dc80 65 78 5d 2e 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 ex].width.==.0.||.m_AtlasTexture
dca0 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 68 65 69 67 68 74 20 3d 3d s[m_AtlasTextureIndex].height.==
dcc0 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .0).............{...............
dce0 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 53 65 74 74 69 6e 67 20 69 6e 69 74 69 61 6c 20 73 ..//Debug.Log("Setting.initial.s
dd00 69 7a 65 20 6f 66 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 75 73 65 64 20 62 79 20 66 6f 6e ize.of.atlas.texture.used.by.fon
dd20 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 2e 22 29 3b 0a t.asset.[".+.this.name.+."].");.
dd40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b ................m_AtlasTextures[
dd60 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 52 65 73 69 7a 65 28 6d 5f 41 74 m_AtlasTextureIndex].Resize(m_At
dd80 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 lasWidth,.m_AtlasHeight);.......
dda0 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 52 65 73 65 74 41 74 6c 61 73 54 ..........FontEngine.ResetAtlasT
ddc0 65 78 74 75 72 65 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 exture(m_AtlasTextures[m_AtlasTe
dde0 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 xtureIndex]);.............}.....
de00 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 67 6c 79 70 68 20 69 73 20 61 6c .........//.Check.if.glyph.is.al
de20 72 65 61 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 67 6c 79 70 68 20 74 61 62 ready.contained.in.the.glyph.tab
de40 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 le..............if.(m_GlyphLooku
de60 70 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 67 6c 79 70 68 49 6e 64 pDictionary.ContainsKey(glyphInd
de80 65 78 29 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 ex).==.false).............{.....
dea0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 6c 79 70 68 2e 67 6c 79 70 68 52 65 63 74 2e ............if.(glyph.glyphRect.
dec0 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c 20 67 6c 79 70 68 2e 67 6c 79 70 68 52 65 63 74 2e 77 69 width.==.0.||.glyph.glyphRect.wi
dee0 64 74 68 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 dth.==.0).................{.....
df00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 6c 79 70 68 73 20 77 69 74 68 20 7a ................//.Glyphs.with.z
df20 65 72 6f 20 77 69 64 74 68 20 61 6e 64 20 2f 20 6f 72 20 68 65 69 67 68 74 20 63 61 6e 20 62 65 ero.width.and./.or.height.can.be
df40 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 66 6f 6e 74 20 61 73 73 .automatically.added.to.font.ass
df60 65 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 54 et......................m_GlyphT
df80 61 62 6c 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 able.Add(glyph);................
dfa0 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 .}.................else.........
dfc0 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f ........{.....................//
dfe0 20 54 72 79 20 70 61 63 6b 69 6e 67 20 6e 65 77 20 67 6c 79 70 68 20 0a 20 20 20 20 20 20 20 20 .Try.packing.new.glyph..........
e000 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 46 6f 6e 74 45 6e 67 69 6e 65 2e 54 72 79 50 61 ............if.(FontEngine.TryPa
e020 63 6b 47 6c 79 70 68 49 6e 41 74 6c 61 73 28 67 6c 79 70 68 2c 20 6d 5f 41 74 6c 61 73 50 61 64 ckGlyphInAtlas(glyph,.m_AtlasPad
e040 64 69 6e 67 2c 20 47 6c 79 70 68 50 61 63 6b 69 6e 67 4d 6f 64 65 2e 43 6f 6e 74 61 63 74 50 6f ding,.GlyphPackingMode.ContactPo
e060 69 6e 74 52 75 6c 65 2c 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 2c 20 6d 5f 41 74 intRule,.m_AtlasRenderMode,.m_At
e080 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 2c 20 6d 5f 46 72 65 65 47 lasWidth,.m_AtlasHeight,.m_FreeG
e0a0 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 29 20 3d 3d 20 lyphRects,.m_UsedGlyphRects).==.
e0c0 66 61 6c 73 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 false).....................{....
e0e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 41 64 .....................//.TODO:.Ad
e100 64 20 68 61 6e 64 6c 69 6e 67 20 74 6f 20 63 72 65 61 74 65 20 6e 65 77 20 61 74 6c 61 73 20 74 d.handling.to.create.new.atlas.t
e120 65 78 74 75 72 65 20 74 6f 20 66 69 74 20 67 6c 79 70 68 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 exture.to.fit.glyph.............
e140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 ..............return.null;......
e160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
e180 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 73 54 6f 52 65 6e 64 65 72 2e 41 64 64 28 67 6c 79 70 68 ......m_GlyphsToRender.Add(glyph
e1a0 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 );.................}............
e1c0 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 68 61 72 61 63 74 65 72 .}..............//.Add.character
e1e0 20 74 6f 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f .to.font.asset..............TMP_
e200 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 77 20 54 4d 50 5f 43 68 Character.character.=.new.TMP_Ch
e220 61 72 61 63 74 65 72 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 aracter(unicode,.glyph);........
e240 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 .....m_CharacterTable.Add(charac
e260 74 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f ter);.............m_CharacterLoo
e280 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 68 61 72 61 kupDictionary.Add(unicode,.chara
e2a0 63 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 cter);..............//Debug.Log(
e2c0 22 41 64 64 69 6e 67 20 63 68 61 72 61 63 74 65 72 20 5b 22 20 2b 20 28 63 68 61 72 29 75 6e 69 "Adding.character.[".+.(char)uni
e2e0 63 6f 64 65 20 2b 20 22 5d 20 77 69 74 68 20 55 6e 69 63 6f 64 65 20 28 22 20 2b 20 75 6e 69 63 code.+."].with.Unicode.(".+.unic
e300 6f 64 65 20 2b 20 22 29 20 74 6f 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 ode.+.").to.[".+.this.name.+."].
e320 66 6f 6e 74 20 61 73 73 65 74 2e 22 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 font.asset.");..............//.S
e340 63 68 65 64 75 6c 65 20 67 6c 79 70 68 20 74 6f 20 62 65 20 61 64 64 65 64 20 74 6f 20 74 68 65 chedule.glyph.to.be.added.to.the
e360 20 66 6f 6e 74 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 .font.atlas.texture.............
e380 2f 2f 54 4d 5f 46 6f 6e 74 41 73 73 65 74 55 70 64 61 74 65 4d 61 6e 61 67 65 72 2e 52 65 67 69 //TM_FontAssetUpdateManager.Regi
e3a0 73 74 65 72 46 6f 6e 74 41 73 73 65 74 46 6f 72 55 70 64 61 74 65 28 74 68 69 73 29 3b 0a 20 20 sterFontAssetForUpdate(this);...
e3c0 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 41 74 6c 61 73 54 65 78 74 75 72 65 28 29 3b 20 ..........UpdateAtlasTexture();.
e3e0 2f 2f 20 54 65 6d 70 6f 72 61 72 79 20 75 6e 74 69 6c 20 63 61 6c 6c 62 61 63 6b 20 73 79 73 74 //.Temporary.until.callback.syst
e400 65 6d 20 69 73 20 72 65 76 69 73 65 64 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 69 em.is.revised...............//#i
e420 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 f.UNITY_EDITOR.............//.Ma
e440 6b 65 73 20 74 68 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 kes.the.changes.to.the.font.asse
e460 74 20 70 65 72 73 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 50 54 t.persistent..............//.OPT
e480 49 4d 49 5a 41 54 49 4f 4e 3a 20 54 68 69 73 20 63 6f 75 6c 64 20 62 65 20 68 61 6e 64 6c 65 64 IMIZATION:.This.could.be.handled
e4a0 20 77 68 65 6e 20 65 78 69 74 69 6e 67 20 50 6c 61 79 20 6d 6f 64 65 20 69 66 20 77 65 20 61 64 .when.exiting.Play.mode.if.we.ad
e4c0 64 65 64 20 61 6e 79 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 74 68 65 20 61 73 ded.any.new.characters.to.the.as
e4e0 73 65 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 75 6c 64 20 61 6c 73 6f 20 61 set..............//.Could.also.a
e500 64 64 20 73 6f 6d 65 20 75 70 64 61 74 65 20 72 65 67 69 73 74 72 79 20 74 6f 20 68 61 6e 64 6c dd.some.update.registry.to.handl
e520 65 20 74 68 69 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 53 6f 72 74 47 6c 79 70 68 54 e.this..............//SortGlyphT
e540 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 55 6e 69 74 79 45 64 69 74 6f able();.............//UnityEdito
e560 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 53 65 74 44 69 72 74 79 28 74 68 69 73 29 3b 0a r.EditorUtility.SetDirty(this);.
e580 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 ............//#endif............
e5a0 20 20 72 65 74 75 72 6e 20 63 68 61 72 61 63 74 65 72 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a ..return.character;.........}...
e5c0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f ........///.<summary>.........//
e5e0 2f 20 54 72 79 20 61 64 64 69 6e 67 20 63 68 61 72 61 63 74 65 72 20 75 73 69 6e 67 20 55 6e 69 /.Try.adding.character.using.Uni
e600 63 6f 64 65 20 76 61 6c 75 65 20 74 6f 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 code.value.to.font.asset........
e620 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 61 73 73 75 6d 65 73 20 69 6e 74 65 72 6e 61 6c 20 ..///.Function.assumes.internal.
e640 75 73 65 72 20 68 61 73 20 61 6c 72 65 61 64 79 20 63 68 65 63 6b 65 64 20 74 6f 20 6d 61 6b 65 user.has.already.checked.to.make
e660 20 73 75 72 65 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 69 73 20 6e 6f 74 20 61 6c 72 65 61 .sure.the.character.is.not.alrea
e680 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a dy.contained.in.the.font.asset..
e6a0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f ........///.</summary>........./
e6c0 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 75 6e 69 63 6f 64 65 22 3e 54 68 65 20 55 6e 69 //.<param.name="unicode">The.Uni
e6e0 63 6f 64 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 2e 3c 2f 70 61 code.value.of.the.character.</pa
e700 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 68 ram>.........///.<param.name="ch
e720 61 72 61 63 74 65 72 22 3e 54 68 65 20 63 68 61 72 61 63 74 65 72 20 64 61 74 61 20 69 66 20 73 aracter">The.character.data.if.s
e740 75 63 63 65 73 73 66 75 6c 6c 79 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 uccessfully.added.to.the.font.as
e760 73 65 74 2e 20 4e 75 6c 6c 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 set..Null.otherwise.</param>....
e780 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 52 65 74 75 72 6e 73 20 74 72 75 65 20 69 .....///.<returns>Returns.true.i
e7a0 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 68 61 73 20 62 65 65 6e 20 61 64 64 65 64 2e 20 f.the.character.has.been.added..
e7c0 46 61 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 False.otherwise.</returns>......
e7e0 20 20 20 69 6e 74 65 72 6e 61 6c 20 62 6f 6f 6c 20 54 72 79 41 64 64 43 68 61 72 61 63 74 65 72 ...internal.bool.TryAddCharacter
e800 49 6e 74 65 72 6e 61 6c 28 75 69 6e 74 20 75 6e 69 63 6f 64 65 2c 20 6f 75 74 20 54 4d 50 5f 43 Internal(uint.unicode,.out.TMP_C
e820 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 haracter.character).........{...
e840 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 75 6c 6c 3b 0a 0a 20 20 20 ..........character.=.null;.....
e860 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 61 64 20 66 6f 6e 74 20 66 61 63 65 2e 0a 20 20 20 20 .........//.Load.font.face......
e880 20 20 20 20 20 20 20 20 69 66 20 28 46 6f 6e 74 45 6e 67 69 6e 65 2e 4c 6f 61 64 46 6f 6e 74 46 ........if.(FontEngine.LoadFontF
e8a0 61 63 65 28 73 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 2c 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 70 ace(sourceFontFile,.m_FaceInfo.p
e8c0 6f 69 6e 74 53 69 7a 65 29 20 21 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 45 72 72 6f 72 2e 53 75 63 ointSize).!=.FontEngineError.Suc
e8e0 63 65 73 73 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c cess).................return.fal
e900 73 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 se;..............uint.glyphIndex
e920 20 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 70 68 49 6e 64 65 78 28 75 6e 69 63 .=.FontEngine.GetGlyphIndex(unic
e940 6f 64 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 6c 79 70 68 49 6e 64 65 78 ode);.............if.(glyphIndex
e960 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 .==.0).................return.fa
e980 6c 73 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 42 65 67 69 6e lse;..............Profiler.Begin
e9a0 53 61 6d 70 6c 65 28 22 54 4d 50 2e 54 72 79 41 64 64 43 68 61 72 61 63 74 65 72 22 29 3b 0a 0a Sample("TMP.TryAddCharacter");..
e9c0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 67 6c 79 70 68 20 69 73 ............//.Check.if.glyph.is
e9e0 20 61 6c 72 65 61 64 79 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 66 6f 6e 74 20 61 .already.contained.in.the.font.a
ea00 73 73 65 74 20 61 73 20 74 68 65 20 73 61 6d 65 20 67 6c 79 70 68 20 6d 69 67 68 74 20 62 65 20 sset.as.the.same.glyph.might.be.
ea20 72 65 66 65 72 65 6e 63 65 64 20 62 79 20 6d 75 6c 74 69 70 6c 65 20 63 68 61 72 61 63 74 65 72 referenced.by.multiple.character
ea40 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 s..............if.(m_GlyphLookup
ea60 44 69 63 74 69 6f 6e 61 72 79 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 67 6c 79 70 68 49 6e 64 65 Dictionary.ContainsKey(glyphInde
ea80 78 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 x)).............{...............
eaa0 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 28 ..character.=.new.TMP_Character(
eac0 75 6e 69 63 6f 64 65 2c 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 unicode,.m_GlyphLookupDictionary
eae0 5b 67 6c 79 70 68 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d [glyphIndex]);.................m
eb00 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a _CharacterTable.Add(character);.
eb20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 ................m_CharacterLooku
eb40 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 68 61 72 61 63 74 pDictionary.Add(unicode,.charact
eb60 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 65 er);..................if.(TMP_Se
eb80 74 74 69 6e 67 73 2e 67 65 74 46 6f 6e 74 46 65 61 74 75 72 65 73 41 74 52 75 6e 74 69 6d 65 29 ttings.getFontFeaturesAtRuntime)
eba0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 47 6c 79 70 68 .....................UpdateGlyph
ebc0 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 AdjustmentRecords(unicode,.glyph
ebe0 49 6e 64 65 78 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 Index);..................#if.UNI
ec00 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b TY_EDITOR.................//.Mak
ec20 65 73 20 74 68 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 es.the.changes.to.the.font.asset
ec40 20 70 65 72 73 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 .persistent..................//.
ec60 4f 50 54 49 4d 49 5a 41 54 49 4f 4e 3a 20 54 68 69 73 20 63 6f 75 6c 64 20 62 65 20 68 61 6e 64 OPTIMIZATION:.This.could.be.hand
ec80 6c 65 64 20 77 68 65 6e 20 65 78 69 74 69 6e 67 20 50 6c 61 79 20 6d 6f 64 65 20 69 66 20 77 65 led.when.exiting.Play.mode.if.we
eca0 20 61 64 64 65 64 20 61 6e 79 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 74 68 65 .added.any.new.characters.to.the
ecc0 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 75 6c 64 .asset..................//.Could
ece0 20 61 6c 73 6f 20 61 64 64 20 73 6f 6d 65 20 75 70 64 61 74 65 20 72 65 67 69 73 74 72 79 20 74 .also.add.some.update.registry.t
ed00 6f 20 68 61 6e 64 6c 65 20 74 68 69 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f o.handle.this................../
ed20 2f 53 6f 72 74 47 6c 79 70 68 54 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 /SortGlyphTable();..............
ed40 20 20 20 69 66 20 28 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 ...if.(UnityEditor.EditorUtility
ed60 2e 49 73 50 65 72 73 69 73 74 65 6e 74 28 74 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 .IsPersistent(this))............
ed80 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 .....{.....................TMP_E
eda0 64 69 74 6f 72 52 65 73 6f 75 72 63 65 4d 61 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 ditorResourceManager.RegisterRes
edc0 6f 75 72 63 65 46 6f 72 55 70 64 61 74 65 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 ourceForUpdate(this);...........
ede0 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a ......}.................#endif..
ee00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 ................Profiler.EndSamp
ee20 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 le();..................return.tr
ee40 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f ue;.............}............../
ee60 2f 20 52 65 73 69 7a 65 20 74 68 65 20 41 74 6c 61 73 20 54 65 78 74 75 72 65 20 74 6f 20 74 68 /.Resize.the.Atlas.Texture.to.th
ee80 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 69 7a 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 e.appropriate.size.............i
eea0 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 f.(m_AtlasTextures[m_AtlasTextur
eec0 65 49 6e 64 65 78 5d 2e 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 41 74 6c 61 73 54 65 78 eIndex].width.==.0.||.m_AtlasTex
eee0 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 68 65 69 67 68 tures[m_AtlasTextureIndex].heigh
ef00 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 t.==.0).............{...........
ef20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 4e 65 65 64 20 74 65 78 74 75 72 65 20 74 6f 20 62 ......//.TODO:.Need.texture.to.b
ef40 65 20 72 65 61 64 61 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 e.readable..................if.(
ef60 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e m_AtlasTextures[m_AtlasTextureIn
ef80 64 65 78 5d 2e 69 73 52 65 61 64 61 62 6c 65 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 20 dex].isReadable.==.false).......
efa0 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
efc0 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 55 6e 61 62 6c 65 20 74 6f 20 61 64 64 20 Debug.LogWarning("Unable.to.add.
efe0 74 68 65 20 72 65 71 75 65 73 74 65 64 20 63 68 61 72 61 63 74 65 72 20 74 6f 20 66 6f 6e 74 20 the.requested.character.to.font.
f000 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 27 73 20 61 74 6c 61 asset.[".+.this.name.+."]'s.atla
f020 73 20 74 65 78 74 75 72 65 2e 20 50 6c 65 61 73 65 20 6d 61 6b 65 20 74 68 65 20 74 65 78 74 75 s.texture..Please.make.the.textu
f040 72 65 20 5b 22 20 2b 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 re.[".+.m_AtlasTextures[m_AtlasT
f060 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 6e 61 6d 65 20 2b 20 22 5d 20 72 65 61 64 61 62 6c 65 2e extureIndex].name.+."].readable.
f080 22 2c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 ",.m_AtlasTextures[m_AtlasTextur
f0a0 65 49 6e 64 65 78 5d 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 eIndex]);......................P
f0c0 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 rofiler.EndSample();............
f0e0 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 .........return.false;..........
f100 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 .......}..................m_Atla
f120 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 52 sTextures[m_AtlasTextureIndex].R
f140 65 73 69 7a 65 28 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 esize(m_AtlasWidth,.m_AtlasHeigh
f160 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 52 t);.................FontEngine.R
f180 65 73 65 74 41 74 6c 61 73 54 65 78 74 75 72 65 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 esetAtlasTexture(m_AtlasTextures
f1a0 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 20 20 20 20 20 20 20 20 [m_AtlasTextureIndex]);.........
f1c0 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 46 6f 6e 74 45 6e 67 69 6e ....}..............if.(FontEngin
f1e0 65 2e 54 72 79 41 64 64 47 6c 79 70 68 54 6f 54 65 78 74 75 72 65 28 67 6c 79 70 68 49 6e 64 65 e.TryAddGlyphToTexture(glyphInde
f200 78 2c 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 47 6c 79 70 68 50 61 63 6b 69 6e 67 4d x,.m_AtlasPadding,.GlyphPackingM
f220 6f 64 65 2e 42 65 73 74 53 68 6f 72 74 53 69 64 65 46 69 74 2c 20 6d 5f 46 72 65 65 47 6c 79 70 ode.BestShortSideFit,.m_FreeGlyp
f240 68 52 65 63 74 73 2c 20 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 41 74 6c 61 hRects,.m_UsedGlyphRects,.m_Atla
f260 73 52 65 6e 64 65 72 4d 6f 64 65 2c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 sRenderMode,.m_AtlasTextures[m_A
f280 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2c 20 6f 75 74 20 47 6c 79 70 68 20 67 6c 79 tlasTextureIndex],.out.Glyph.gly
f2a0 70 68 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ph)).............{..............
f2c0 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 67 6c 79 70 68 20 74 6f 20 67 6c 79 70 68 20 74 61 62 ...//.Add.new.glyph.to.glyph.tab
f2e0 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 le..................m_GlyphTable
f300 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 .Add(glyph);.................m_G
f320 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 67 6c 79 70 68 49 6e lyphLookupDictionary.Add(glyphIn
f340 64 65 78 2c 20 67 6c 79 70 68 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f dex,.glyph);..................//
f360 20 41 64 64 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .Add.new.character..............
f380 20 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 ...character.=.new.TMP_Character
f3a0 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 (unicode,.glyph);...............
f3c0 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 ..m_CharacterTable.Add(character
f3e0 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 4c 6f );.................m_CharacterLo
f400 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 64 64 28 75 6e 69 63 6f 64 65 2c 20 63 68 61 72 okupDictionary.Add(unicode,.char
f420 61 63 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 acter);..................m_Glyph
f440 49 6e 64 65 78 4c 69 73 74 2e 41 64 64 28 67 6c 79 70 68 49 6e 64 65 78 29 3b 0a 0a 20 20 20 20 IndexList.Add(glyphIndex);......
f460 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 67 65 74 ............if.(TMP_Settings.get
f480 46 6f 6e 74 46 65 61 74 75 72 65 73 41 74 52 75 6e 74 69 6d 65 29 0a 20 20 20 20 20 20 20 20 20 FontFeaturesAtRuntime)..........
f4a0 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 ...........UpdateGlyphAdjustment
f4c0 52 65 63 6f 72 64 73 28 75 6e 69 63 6f 64 65 2c 20 67 6c 79 70 68 49 6e 64 65 78 29 3b 0a 0a 20 Records(unicode,.glyphIndex);...
f4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a ...............#if.UNITY_EDITOR.
f500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 73 20 74 68 65 20 63 68 61 ................//.Makes.the.cha
f520 6e 67 65 73 20 74 6f 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 70 65 72 73 69 73 74 65 6e nges.to.the.font.asset.persisten
f540 74 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 50 54 49 4d 49 5a 41 54 49 t..................//.OPTIMIZATI
f560 4f 4e 3a 20 54 68 69 73 20 63 6f 75 6c 64 20 62 65 20 68 61 6e 64 6c 65 64 20 77 68 65 6e 20 65 ON:.This.could.be.handled.when.e
f580 78 69 74 69 6e 67 20 50 6c 61 79 20 6d 6f 64 65 20 69 66 20 77 65 20 61 64 64 65 64 20 61 6e 79 xiting.Play.mode.if.we.added.any
f5a0 20 6e 65 77 20 63 68 61 72 61 63 74 65 72 73 20 74 6f 20 74 68 65 20 61 73 73 65 74 2e 0a 20 20 .new.characters.to.the.asset....
f5c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 75 6c 64 20 61 6c 73 6f 20 61 64 64 20 ..............//.Could.also.add.
f5e0 73 6f 6d 65 20 75 70 64 61 74 65 20 72 65 67 69 73 74 72 79 20 74 6f 20 68 61 6e 64 6c 65 20 74 some.update.registry.to.handle.t
f600 68 69 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 53 6f 72 74 47 6c 79 70 68 his..................//SortGlyph
f620 54 61 62 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 55 6e 69 Table();.................if.(Uni
f640 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 49 73 50 65 72 73 69 73 74 tyEditor.EditorUtility.IsPersist
f660 65 6e 74 28 74 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 ent(this)).................{....
f680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 6f 75 .................TMP_EditorResou
f6a0 72 63 65 4d 61 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 55 70 rceManager.RegisterResourceForUp
f6c0 64 61 74 65 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 date(this);.................}...
f6e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 ..............#endif............
f700 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0a 0a 20 20 20 ......Profiler.EndSample();.....
f720 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 20 20 .............return.true;.......
f740 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e ......}..............Profiler.En
f760 64 53 61 6d 70 6c 65 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 dSample();..............return.f
f780 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 alse;.........}...........///.<s
f7a0 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 74 65 72 6e 61 6c 20 66 75 6e ummary>.........///.Internal.fun
f7c0 63 74 69 6f 6e 20 75 73 65 64 20 74 6f 20 67 65 74 20 74 68 65 20 67 6c 79 70 68 20 69 6e 64 65 ction.used.to.get.the.glyph.inde
f7e0 78 20 66 6f 72 20 74 68 65 20 67 69 76 65 6e 20 75 6e 69 63 6f 64 65 2e 0a 20 20 20 20 20 20 20 x.for.the.given.unicode.........
f800 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 .///.</summary>.........///.<par
f820 61 6d 20 6e 61 6d 65 3d 22 75 6e 69 63 6f 64 65 22 3e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 am.name="unicode"></param>......
f840 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0a 20 20 20 20 20 ...///.<returns></returns>......
f860 20 20 20 69 6e 74 65 72 6e 61 6c 20 75 69 6e 74 20 47 65 74 47 6c 79 70 68 49 6e 64 65 78 28 75 ...internal.uint.GetGlyphIndex(u
f880 69 6e 74 20 75 6e 69 63 6f 64 65 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 int.unicode).........{..........
f8a0 20 20 20 2f 2f 20 4c 6f 61 64 20 66 6f 6e 74 20 66 61 63 65 2e 0a 20 20 20 20 20 20 20 20 20 20 ...//.Load.font.face............
f8c0 20 20 69 66 20 28 46 6f 6e 74 45 6e 67 69 6e 65 2e 4c 6f 61 64 46 6f 6e 74 46 61 63 65 28 73 6f ..if.(FontEngine.LoadFontFace(so
f8e0 75 72 63 65 46 6f 6e 74 46 69 6c 65 2c 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 70 6f 69 6e 74 53 69 urceFontFile,.m_FaceInfo.pointSi
f900 7a 65 29 20 21 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 45 72 72 6f 72 2e 53 75 63 63 65 73 73 29 0a ze).!=.FontEngineError.Success).
f920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 30 3b 0a 0a 20 20 20 20 20 ................return.0;.......
f940 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 70 .......return.FontEngine.GetGlyp
f960 68 49 6e 64 65 78 28 75 6e 69 63 6f 64 65 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 hIndex(unicode);.........}......
f980 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 55 70 64 61 74 65 41 74 6c 61 73 54 65 .....internal.void.UpdateAtlasTe
f9a0 78 74 75 72 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f xture().........{.............//
f9c0 20 52 65 74 75 72 6e 20 69 66 20 77 65 20 64 6f 6e 27 74 20 68 61 76 65 20 61 6e 79 20 67 6c 79 .Return.if.we.don't.have.any.gly
f9e0 70 68 73 20 74 6f 20 61 64 64 20 74 6f 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 0a 20 20 20 phs.to.add.to.atlas.texture.....
fa00 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 69 73 20 70 6f 73 73 69 62 6c 65 20 69 66 20 .........//.This.is.possible.if.
fa20 55 70 64 61 74 65 41 74 6c 61 73 54 65 78 74 75 72 65 28 29 20 77 61 73 20 63 61 6c 6c 65 64 20 UpdateAtlasTexture().was.called.
fa40 6d 61 6e 75 61 6c 6c 79 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 5f 47 6c manually..............//if.(m_Gl
fa60 79 70 68 73 54 6f 50 61 63 6b 2e 43 6f 75 6e 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 yphsToPack.Count.==.0)..........
fa80 20 20 20 2f 2f 20 20 20 20 72 65 74 75 72 6e 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 ...//....return;..............if
faa0 20 28 6d 5f 47 6c 79 70 68 73 54 6f 52 65 6e 64 65 72 2e 43 6f 75 6e 74 20 3d 3d 20 30 29 0a 20 .(m_GlyphsToRender.Count.==.0)..
fac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0a 0a 20 20 20 20 20 20 20 20 ...............return;..........
fae0 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 55 70 64 61 74 69 6e 67 20 5b 22 20 2b 20 74 ....//Debug.Log("Updating.[".+.t
fb00 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 27 73 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 22 29 his.name.+."]'s.atlas.texture.")
fb20 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 63 6b 20 67 6c 79 70 68 73 20 69 6e ;..............//.Pack.glyphs.in
fb40 20 74 68 65 20 67 69 76 65 6e 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 73 69 7a 65 2e 20 0a .the.given.atlas.texture.size...
fb60 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 50 61 63 6b 69 6e 67 20 61 6e 64 ............//.TODO:.Packing.and
fb80 20 67 6c 79 70 68 20 72 65 6e 64 65 72 20 6d 6f 64 65 73 20 73 68 6f 75 6c 64 20 62 65 20 64 65 .glyph.render.modes.should.be.de
fba0 66 69 6e 65 64 20 69 6e 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 2e 0a 20 20 20 20 20 20 20 fined.in.the.font.asset.........
fbc0 20 20 20 20 20 2f 2f 46 6f 6e 74 45 6e 67 69 6e 65 2e 50 61 63 6b 47 6c 79 70 68 73 49 6e 41 74 .....//FontEngine.PackGlyphsInAt
fbe0 6c 61 73 28 6d 5f 47 6c 79 70 68 73 54 6f 50 61 63 6b 2c 20 6d 5f 47 6c 79 70 68 73 50 61 63 6b las(m_GlyphsToPack,.m_GlyphsPack
fc00 65 64 2c 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 47 6c 79 70 68 50 61 63 6b 69 6e 67 ed,.m_AtlasPadding,.GlyphPacking
fc20 4d 6f 64 65 2e 43 6f 6e 74 61 63 74 50 6f 69 6e 74 52 75 6c 65 2c 20 47 6c 79 70 68 52 65 6e 64 Mode.ContactPointRule,.GlyphRend
fc40 65 72 4d 6f 64 65 2e 53 44 46 41 41 2c 20 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 erMode.SDFAA,.m_AtlasWidth,.m_At
fc60 6c 61 73 48 65 69 67 68 74 2c 20 6d 5f 46 72 65 65 47 6c 79 70 68 52 65 63 74 73 2c 20 6d 5f 55 lasHeight,.m_FreeGlyphRects,.m_U
fc80 73 65 64 47 6c 79 70 68 52 65 63 74 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 46 6f sedGlyphRects);.............//Fo
fca0 6e 74 45 6e 67 69 6e 65 2e 52 65 6e 64 65 72 47 6c 79 70 68 73 54 6f 54 65 78 74 75 72 65 28 6d ntEngine.RenderGlyphsToTexture(m
fcc0 5f 47 6c 79 70 68 73 50 61 63 6b 65 64 2c 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 47 _GlyphsPacked,.m_AtlasPadding,.G
fce0 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 2e 53 44 46 41 41 2c 20 6d 5f 41 74 6c 61 73 54 65 78 lyphRenderMode.SDFAA,.m_AtlasTex
fd00 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 0a 20 20 tures[m_AtlasTextureIndex]);....
fd20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 69 7a 65 20 74 68 65 20 41 74 6c 61 73 20 54 65 ..........//.Resize.the.Atlas.Te
fd40 78 74 75 72 65 20 74 6f 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 69 7a 65 0a 20 20 xture.to.the.appropriate.size...
fd60 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f ..........if.(m_AtlasTextures[m_
fd80 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 77 69 64 74 68 20 3d 3d 20 30 20 7c 7c AtlasTextureIndex].width.==.0.||
fda0 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 .m_AtlasTextures[m_AtlasTextureI
fdc0 6e 64 65 78 5d 2e 68 65 69 67 68 74 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b ndex].height.==.0).............{
fde0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 53 65 .................//Debug.Log("Se
fe00 74 74 69 6e 67 20 69 6e 69 74 69 61 6c 20 73 69 7a 65 20 6f 66 20 61 74 6c 61 73 20 74 65 78 74 tting.initial.size.of.atlas.text
fe20 75 72 65 20 75 73 65 64 20 62 79 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 73 ure.used.by.font.asset.[".+.this
fe40 2e 6e 61 6d 65 20 2b 20 22 5d 2e 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d .name.+."].");.................m
fe60 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 _AtlasTextures[m_AtlasTextureInd
fe80 65 78 5d 2e 52 65 73 69 7a 65 28 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 ex].Resize(m_AtlasWidth,.m_Atlas
fea0 48 65 69 67 68 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 Height);.................FontEng
fec0 69 6e 65 2e 52 65 73 65 74 41 74 6c 61 73 54 65 78 74 75 72 65 28 6d 5f 41 74 6c 61 73 54 65 78 ine.ResetAtlasTexture(m_AtlasTex
fee0 74 75 72 65 73 5b 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 20 20 20 tures[m_AtlasTextureIndex]);....
ff00 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 6f 6e 74 45 6e 67 69 .........}..............FontEngi
ff20 6e 65 2e 52 65 6e 64 65 72 47 6c 79 70 68 73 54 6f 54 65 78 74 75 72 65 28 6d 5f 47 6c 79 70 68 ne.RenderGlyphsToTexture(m_Glyph
ff40 73 54 6f 52 65 6e 64 65 72 2c 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 2c 20 6d 5f 41 74 6c sToRender,.m_AtlasPadding,.m_Atl
ff60 61 73 52 65 6e 64 65 72 4d 6f 64 65 2c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f asRenderMode,.m_AtlasTextures[m_
ff80 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 AtlasTextureIndex]);............
ffa0 20 20 2f 2f 20 41 70 70 6c 79 20 63 68 61 6e 67 65 73 20 74 6f 20 61 74 6c 61 73 20 74 65 78 74 ..//.Apply.changes.to.atlas.text
ffc0 75 72 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b ure.............m_AtlasTextures[
ffe0 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 2e 41 70 70 6c 79 28 66 61 6c 73 65 m_AtlasTextureIndex].Apply(false
10000 2c 20 66 61 6c 73 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 67 6c ,.false);..............//.Add.gl
10020 79 70 68 73 20 74 68 61 74 20 77 65 72 65 20 73 75 63 63 65 73 73 66 75 6c 6c 79 20 70 61 63 6b yphs.that.were.successfully.pack
10040 65 64 20 74 6f 20 74 68 65 20 67 6c 79 70 68 20 74 61 62 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 ed.to.the.glyph.table...........
10060 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 47 6c 79 70 68 73 54 ...for.(int.i.=.0;.i.<.m_GlyphsT
10080 6f 52 65 6e 64 65 72 2e 43 6f 75 6e 74 20 2f 2a 20 6d 5f 47 6c 79 70 68 73 50 61 63 6b 65 64 2e oRender.Count./*.m_GlyphsPacked.
100a0 43 6f 75 6e 74 20 2a 2f 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 Count.*/;.i++).............{....
100c0 20 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 6d 5f 47 6c 79 .............Glyph.glyph.=.m_Gly
100e0 70 68 73 54 6f 52 65 6e 64 65 72 5b 69 5d 3b 20 2f 2f 20 6d 5f 47 6c 79 70 68 73 50 61 63 6b 65 phsToRender[i];.//.m_GlyphsPacke
10100 64 5b 69 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 70 64 61 74 65 d[i];..................//.Update
10120 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 69 6e 64 65 78 0a 20 20 20 20 20 20 20 20 20 20 20 .atlas.texture.index............
10140 20 20 20 20 20 67 6c 79 70 68 2e 61 74 6c 61 73 49 6e 64 65 78 20 3d 20 6d 5f 41 74 6c 61 73 54 .....glyph.atlasIndex.=.m_AtlasT
10160 65 78 74 75 72 65 49 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f extureIndex;..................m_
10180 47 6c 79 70 68 54 61 62 6c 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 GlyphTable.Add(glyph);..........
101a0 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 41 .......m_GlyphLookupDictionary.A
101c0 64 64 28 67 6c 79 70 68 2e 69 6e 64 65 78 2c 20 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 dd(glyph.index,.glyph);.........
101e0 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 6c 69 73 74 ....}..............//.Clear.list
10200 20 6f 66 20 67 6c 79 70 68 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 73 50 .of.glyphs.............m_GlyphsP
10220 61 63 6b 65 64 2e 43 6c 65 61 72 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 acked.Clear();.............m_Gly
10240 70 68 73 54 6f 52 65 6e 64 65 72 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 phsToRender.Clear();............
10260 20 20 2f 2f 20 41 64 64 20 61 6e 79 20 72 65 6d 61 69 6e 69 6e 67 20 67 6c 79 70 68 73 20 69 6e ..//.Add.any.remaining.glyphs.in
10280 74 6f 20 6e 65 77 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 69 66 20 6d 75 6c 74 69 20 74 65 to.new.atlas.texture.if.multi.te
102a0 78 74 75 72 65 20 73 75 70 70 6f 72 74 20 69 66 20 65 6e 61 62 6c 65 64 2e 0a 20 20 20 20 20 20 xture.support.if.enabled........
102c0 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 73 54 6f 50 61 63 6b 2e 43 6f 75 6e 74 20 3e ......if.(m_GlyphsToPack.Count.>
102e0 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .0).............{...............
10300 20 20 2f 2a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 6e ../*.................//.Create.n
10320 65 77 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ew.atlas.texture................
10340 20 20 54 65 78 74 75 72 65 32 44 20 74 65 78 20 3d 20 6e 65 77 20 54 65 78 74 75 72 65 32 44 28 ..Texture2D.tex.=.new.Texture2D(
10360 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 2c 20 54 65 78 m_AtlasWidth,.m_AtlasHeight,.Tex
10380 74 75 72 65 46 6f 72 6d 61 74 2e 41 6c 70 68 61 38 2c 20 66 61 6c 73 65 2c 20 74 72 75 65 29 3b tureFormat.Alpha8,.false,.true);
103a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 2e 53 65 74 50 69 78 65 6c 73 33 32 .................tex.SetPixels32
103c0 28 6e 65 77 20 43 6f 6c 6f 72 33 32 5b 6d 5f 41 74 6c 61 73 57 69 64 74 68 20 2a 20 6d 5f 41 74 (new.Color32[m_AtlasWidth.*.m_At
103e0 6c 61 73 48 65 69 67 68 74 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 lasHeight]);.................tex
10400 2e 41 70 70 6c 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c .Apply();..................m_Atl
10420 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 2b 2b 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 asTextureIndex++;...............
10440 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 2e 4c 65 6e 67 74 68 20 3d 3d ...if.(m_AtlasTextures.Length.==
10460 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 29 0a 20 20 20 20 20 20 20 20 20 20 .m_AtlasTextureIndex)...........
10480 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 41 74 6c ..........Array.Resize(ref.m_Atl
104a0 61 73 54 65 78 74 75 72 65 73 2c 20 4d 61 74 68 66 2e 4e 65 78 74 50 6f 77 65 72 4f 66 54 77 6f asTextures,.Mathf.NextPowerOfTwo
104c0 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 20 2b 20 31 29 29 3b 0a 0a 20 20 20 (m_AtlasTextureIndex.+.1));.....
104e0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 6d 5f 41 .............m_AtlasTextures[m_A
10500 74 6c 61 73 54 65 78 74 75 72 65 49 6e 64 65 78 5d 20 3d 20 74 65 78 3b 0a 20 20 20 20 20 20 20 tlasTextureIndex].=.tex;........
10520 20 20 20 20 20 20 20 20 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 .........*/.............}.......
10540 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 .......#if.UNITY_EDITOR.........
10560 20 20 20 20 2f 2f 20 4d 61 6b 65 73 20 74 68 65 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 ....//.Makes.the.changes.to.the.
10580 66 6f 6e 74 20 61 73 73 65 74 20 70 65 72 73 69 73 74 65 6e 74 2e 0a 20 20 20 20 20 20 20 20 20 font.asset.persistent...........
105a0 20 20 20 53 6f 72 74 47 6c 79 70 68 41 6e 64 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 73 28 29 ...SortGlyphAndCharacterTables()
105c0 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 6f 75 72 63 65 ;.............TMP_EditorResource
105e0 4d 61 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 55 70 64 61 74 Manager.RegisterResourceForUpdat
10600 65 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 20 20 20 20 e(this);.............#endif.....
10620 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 55 70 ....}...........internal.void.Up
10640 64 61 74 65 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 28 75 69 6e 74 20 dateGlyphAdjustmentRecords(uint.
10660 75 6e 69 63 6f 64 65 2c 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 29 0a 20 20 20 20 20 20 unicode,.uint.glyphIndex).......
10680 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 42 65 67 69 6e 53 61 ..{.............Profiler.BeginSa
106a0 6d 70 6c 65 28 22 54 4d 50 2e 55 70 64 61 74 65 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 52 mple("TMP.UpdateGlyphAdjustmentR
106c0 65 63 6f 72 64 73 22 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 67 6c 79 70 68 ecords");..............int.glyph
106e0 43 6f 75 6e 74 20 3d 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 2e 43 6f 75 6e 74 3b 0a Count.=.m_GlyphIndexList.Count;.
10700 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 47 6c 79 70 68 49 6e 64 65 78 41 72 72 .............if.(s_GlyphIndexArr
10720 61 79 2e 4c 65 6e 67 74 68 20 3c 3d 20 67 6c 79 70 68 43 6f 75 6e 74 29 0a 20 20 20 20 20 20 20 ay.Length.<=.glyphCount)........
10740 20 20 20 20 20 20 20 20 20 73 5f 47 6c 79 70 68 49 6e 64 65 78 41 72 72 61 79 20 3d 20 6e 65 77 .........s_GlyphIndexArray.=.new
10760 20 75 69 6e 74 5b 4d 61 74 68 66 2e 4e 65 78 74 50 6f 77 65 72 4f 66 54 77 6f 28 67 6c 79 70 68 .uint[Mathf.NextPowerOfTwo(glyph
10780 43 6f 75 6e 74 20 2b 20 31 29 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 Count.+.1)];..............for.(i
107a0 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 67 6c 79 70 68 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 nt.i.=.0;.i.<.glyphCount;.i++)..
107c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 47 6c 79 70 68 49 6e 64 65 78 41 72 72 61 79 ...............s_GlyphIndexArray
107e0 5b 69 5d 20 3d 20 6d 5f 47 6c 79 70 68 49 6e 64 65 78 4c 69 73 74 5b 69 5d 3b 0a 0a 20 20 20 20 [i].=.m_GlyphIndexList[i];......
10800 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 75 6e 75 73 65 64 20 61 72 72 61 79 20 65 6c ........//.Clear.unused.array.el
10820 65 6d 65 6e 74 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 2e 43 6c 65 61 72 28 73 ements.............Array.Clear(s
10840 5f 47 6c 79 70 68 49 6e 64 65 78 41 72 72 61 79 2c 20 67 6c 79 70 68 43 6f 75 6e 74 2c 20 73 5f _GlyphIndexArray,.glyphCount,.s_
10860 47 6c 79 70 68 49 6e 64 65 78 41 72 72 61 79 2e 4c 65 6e 67 74 68 20 2d 20 67 6c 79 70 68 43 6f GlyphIndexArray.Length.-.glyphCo
10880 75 6e 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 67 6c 79 70 68 20 unt);..............//.Get.glyph.
108a0 70 61 69 72 20 61 64 6a 75 73 74 6d 65 6e 74 20 72 65 63 6f 72 64 73 20 66 72 6f 6d 20 66 6f 6e pair.adjustment.records.from.fon
108c0 74 20 66 69 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 52 65 76 t.file..............//.TODO:.Rev
108e0 69 73 65 20 46 6f 6e 74 45 6e 67 69 6e 65 20 62 69 6e 64 69 6e 67 73 20 74 6f 20 75 73 65 20 61 ise.FontEngine.bindings.to.use.a
10900 20 6d 6f 72 65 20 65 66 66 69 63 69 65 6e 74 20 66 75 6e 63 74 69 6f 6e 20 77 68 65 72 65 20 6f .more.efficient.function.where.o
10920 6e 6c 79 20 74 68 65 20 6e 65 77 20 67 6c 79 70 68 20 69 6e 64 65 78 20 69 73 20 70 61 73 73 65 nly.the.new.glyph.index.is.passe
10940 64 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 d..............GlyphPairAdjustme
10960 6e 74 52 65 63 6f 72 64 5b 5d 20 70 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 ntRecord[].pairAdjustmentRecords
10980 20 3d 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 .=.FontEngine.GetGlyphPairAdjust
109a0 6d 65 6e 74 54 61 62 6c 65 28 73 5f 47 6c 79 70 68 49 6e 64 65 78 41 72 72 61 79 29 3b 0a 0a 20 mentTable(s_GlyphIndexArray);...
109c0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 ...........if.(pairAdjustmentRec
109e0 6f 72 64 73 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 70 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 ords.==.null.||.pairAdjustmentRe
10a00 63 6f 72 64 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b cords.Length.==.0).............{
10a20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d .................Profiler.EndSam
10a40 70 6c 65 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0a 20 ple();.................return;..
10a60 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f ...........}..............if.(m_
10a80 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 FontFeatureTable.==.null).......
10aa0 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 20 3d 20 6e ..........m_FontFeatureTable.=.n
10ac0 65 77 20 54 4d 50 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 28 29 3b 0a 0a 20 20 20 20 ew.TMP_FontFeatureTable();......
10ae0 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 70 61 69 72 ........for.(int.i.=.0;.i.<.pair
10b00 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 2e 4c 65 6e 67 74 68 20 26 26 20 70 61 69 72 AdjustmentRecords.Length.&&.pair
10b20 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 5b 69 5d 2e 66 69 72 73 74 41 64 6a 75 73 74 AdjustmentRecords[i].firstAdjust
10b40 6d 65 6e 74 52 65 63 6f 72 64 2e 67 6c 79 70 68 49 6e 64 65 78 20 21 3d 20 30 3b 20 69 2b 2b 29 mentRecord.glyphIndex.!=.0;.i++)
10b60 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c .............{.................l
10b80 6f 6e 67 20 70 61 69 72 4b 65 79 20 3d 20 28 6c 6f 6e 67 29 70 61 69 72 41 64 6a 75 73 74 6d 65 ong.pairKey.=.(long)pairAdjustme
10ba0 6e 74 52 65 63 6f 72 64 73 5b 69 5d 2e 73 65 63 6f 6e 64 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 ntRecords[i].secondAdjustmentRec
10bc0 6f 72 64 2e 67 6c 79 70 68 49 6e 64 65 78 20 3c 3c 20 33 32 20 7c 20 70 61 69 72 41 64 6a 75 73 ord.glyphIndex.<<.32.|.pairAdjus
10be0 74 6d 65 6e 74 52 65 63 6f 72 64 73 5b 69 5d 2e 66 69 72 73 74 41 64 6a 75 73 74 6d 65 6e 74 52 tmentRecords[i].firstAdjustmentR
10c00 65 63 6f 72 64 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ecord.glyphIndex;...............
10c20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 74 61 62 6c 65 20 61 6c 72 65 61 64 79 20 63 6f 6e ...//.Check.if.table.already.con
10c40 74 61 69 6e 73 20 61 20 70 61 69 72 20 61 64 6a 75 73 74 6d 65 6e 74 20 72 65 63 6f 72 64 20 66 tains.a.pair.adjustment.record.f
10c60 6f 72 20 74 68 69 73 20 6b 65 79 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 or.this.key..................if.
10c80 28 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 (m_FontFeatureTable.m_GlyphPairA
10ca0 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e djustmentRecordLookupDictionary.
10cc0 43 6f 6e 74 61 69 6e 73 4b 65 79 28 70 61 69 72 4b 65 79 29 29 0a 20 20 20 20 20 20 20 20 20 20 ContainsKey(pairKey))...........
10ce0 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ..........continue;.............
10d00 20 20 20 20 20 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f .....TMP_GlyphPairAdjustmentReco
10d20 72 64 20 72 65 63 6f 72 64 20 3d 20 6e 65 77 20 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 64 6a rd.record.=.new.TMP_GlyphPairAdj
10d40 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 28 70 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f ustmentRecord(pairAdjustmentReco
10d60 72 64 73 5b 69 5d 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 rds[i]);..................m_Font
10d80 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 FeatureTable.m_GlyphPairAdjustme
10da0 6e 74 52 65 63 6f 72 64 73 2e 41 64 64 28 72 65 63 6f 72 64 29 3b 0a 20 20 20 20 20 20 20 20 20 ntRecords.Add(record);..........
10dc0 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 .......m_FontFeatureTable.m_Glyp
10de0 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 4c 6f 6f 6b 75 70 44 69 63 74 69 hPairAdjustmentRecordLookupDicti
10e00 6f 6e 61 72 79 2e 41 64 64 28 70 61 69 72 4b 65 79 2c 20 72 65 63 6f 72 64 29 3b 0a 20 20 20 20 onary.Add(pairKey,.record);.....
10e20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 ........}..............#if.UNITY
10e40 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 _EDITOR.............m_FontFeatur
10e60 65 54 61 62 6c 65 2e 53 6f 72 74 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 eTable.SortGlyphPairAdjustmentRe
10e80 63 6f 72 64 73 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 20 20 cords();.............#endif.....
10ea0 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0a 20 .........Profiler.EndSample();..
10ec0 20 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e .......}...........///.<summary>
10ee0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 43 6c 65 61 72 73 20 66 6f 6e 74 20 61 73 73 65 74 20 64 .........///.Clears.font.asset.d
10f00 61 74 61 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 65 20 67 6c 79 70 68 20 61 6e 64 20 63 68 61 72 ata.including.the.glyph.and.char
10f20 61 63 74 65 72 20 74 61 62 6c 65 73 20 61 6e 64 20 74 65 78 74 75 72 65 73 2e 0a 20 20 20 20 20 acter.tables.and.textures.......
10f40 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 6d 69 67 68 74 20 62 65 20 63 68 61 6e 67 65 64 ...///.Function.might.be.changed
10f60 20 74 6f 20 49 6e 74 65 72 6e 61 6c 20 61 6e 64 20 6f 6e 6c 79 20 75 73 65 64 20 69 6e 20 74 65 .to.Internal.and.only.used.in.te
10f80 73 74 73 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 sts..........///.</summary>.....
10fa0 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 65 74 41 74 6c 61 73 53 69 7a ....///.<param.name="setAtlasSiz
10fc0 65 54 6f 5a 65 72 6f 22 3e 57 69 6c 6c 20 73 65 74 20 74 68 65 20 61 74 6c 61 73 20 74 65 78 74 eToZero">Will.set.the.atlas.text
10fe0 75 72 65 20 73 69 7a 65 20 74 6f 20 7a 65 72 6f 20 77 69 64 74 68 20 61 6e 64 20 68 65 69 67 68 ure.size.to.zero.width.and.heigh
11000 74 20 69 66 20 74 72 75 65 2e 3c 2f 70 61 72 61 6d 3e 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 t.if.true.</param>.........publi
11020 63 20 76 6f 69 64 20 43 6c 65 61 72 46 6f 6e 74 41 73 73 65 74 44 61 74 61 28 62 6f 6f 6c 20 73 c.void.ClearFontAssetData(bool.s
11040 65 74 41 74 6c 61 73 53 69 7a 65 54 6f 5a 65 72 6f 20 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 20 etAtlasSizeToZero.=.false)......
11060 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f ...{.............#if.UNITY_EDITO
11080 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 63 6f 72 64 20 66 75 6c 6c 20 6f 62 6a R.............//.Record.full.obj
110a0 65 63 74 20 75 6e 64 6f 20 69 6e 20 74 68 65 20 45 64 69 74 6f 72 2e 0a 20 20 20 20 20 20 20 20 ect.undo.in.the.Editor..........
110c0 20 20 20 20 2f 2f 55 6e 69 74 79 45 64 69 74 6f 72 2e 55 6e 64 6f 2e 52 65 63 6f 72 64 4f 62 6a ....//UnityEditor.Undo.RecordObj
110e0 65 63 74 73 28 6e 65 77 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 4f 62 6a 65 63 74 5b 5d 20 7b 20 ects(new.UnityEngine.Object[].{.
11100 74 68 69 73 2c 20 74 68 69 73 2e 61 74 6c 61 73 54 65 78 74 75 72 65 20 7d 2c 20 22 52 65 73 65 this,.this.atlasTexture.},."Rese
11120 74 74 69 6e 67 20 46 6f 6e 74 20 41 73 73 65 74 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 tting.Font.Asset");.............
11140 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 67 6c 79 #endif..............//.Clear.gly
11160 70 68 20 61 6e 64 20 63 68 61 72 61 63 74 65 72 20 74 61 62 6c 65 73 0a 20 20 20 20 20 20 20 20 ph.and.character.tables.........
11180 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 54 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 ....if.(m_GlyphTable.!=.null)...
111a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 2e 43 6c 65 61 72 ..............m_GlyphTable.Clear
111c0 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 ();..............if.(m_Character
111e0 54 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d Table.!=.null).................m
11200 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 _CharacterTable.Clear();........
11220 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 67 6c 79 70 68 20 72 65 63 74 61 6e 67 6c 65 73 0a ......//.Clear.glyph.rectangles.
11240 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 55 73 65 64 47 6c 79 70 68 52 65 63 74 73 ............if.(m_UsedGlyphRects
11260 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 73 65 64 .!=.null).................m_Used
11280 47 6c 79 70 68 52 65 63 74 73 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 GlyphRects.Clear();.............
112a0 20 69 66 20 28 6d 5f 46 72 65 65 47 6c 79 70 68 52 65 63 74 73 20 21 3d 20 6e 75 6c 6c 29 0a 20 .if.(m_FreeGlyphRects.!=.null)..
112c0 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 ...........{.................int
112e0 20 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 20 3d 20 28 28 47 6c 79 70 68 52 61 73 74 65 72 .packingModifier.=.((GlyphRaster
11300 4d 6f 64 65 73 29 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 26 20 47 6c 79 70 68 52 Modes)m_AtlasRenderMode.&.GlyphR
11320 61 73 74 65 72 4d 6f 64 65 73 2e 52 41 53 54 45 52 5f 4d 4f 44 45 5f 42 49 54 4d 41 50 29 20 3d asterModes.RASTER_MODE_BITMAP).=
11340 3d 20 47 6c 79 70 68 52 61 73 74 65 72 4d 6f 64 65 73 2e 52 41 53 54 45 52 5f 4d 4f 44 45 5f 42 =.GlyphRasterModes.RASTER_MODE_B
11360 49 54 4d 41 50 20 3f 20 30 20 3a 20 31 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d ITMAP.?.0.:.1;.................m
11380 5f 46 72 65 65 47 6c 79 70 68 52 65 63 74 73 20 3d 20 6e 65 77 20 4c 69 73 74 3c 47 6c 79 70 68 _FreeGlyphRects.=.new.List<Glyph
113a0 52 65 63 74 3e 28 29 20 7b 20 6e 65 77 20 47 6c 79 70 68 52 65 63 74 28 30 2c 20 30 2c 20 6d 5f Rect>().{.new.GlyphRect(0,.0,.m_
113c0 41 74 6c 61 73 57 69 64 74 68 20 2d 20 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 2c 20 6d 5f AtlasWidth.-.packingModifier,.m_
113e0 41 74 6c 61 73 48 65 69 67 68 74 20 2d 20 70 61 63 6b 69 6e 67 4d 6f 64 69 66 69 65 72 29 20 7d AtlasHeight.-.packingModifier).}
11400 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ;.............}..............if.
11420 28 6d 5f 47 6c 79 70 68 73 54 6f 50 61 63 6b 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 (m_GlyphsToPack.!=.null)........
11440 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 68 73 54 6f 50 61 63 6b 2e 43 6c 65 61 72 28 29 3b .........m_GlyphsToPack.Clear();
11460 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 47 6c 79 70 68 73 50 61 63 6b 65 64 ..............if.(m_GlyphsPacked
11480 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c 79 70 .!=.null).................m_Glyp
114a0 68 73 50 61 63 6b 65 64 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f hsPacked.Clear();............../
114c0 2f 20 43 6c 65 61 72 20 47 6c 79 70 68 20 41 64 6a 75 73 74 6d 65 6e 74 20 54 61 62 6c 65 0a 20 /.Clear.Glyph.Adjustment.Table..
114e0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c ...........if.(m_FontFeatureTabl
11500 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e e.!=.null.&&.m_FontFeatureTable.
11520 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 20 21 3d 20 m_GlyphPairAdjustmentRecords.!=.
11540 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 null).................m_FontFeat
11560 75 72 65 54 61 62 6c 65 2e 67 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f ureTable.glyphPairAdjustmentReco
11580 72 64 73 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 rds.Clear();..............m_Atla
115a0 73 54 65 78 74 75 72 65 49 6e 64 65 78 20 3d 20 30 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 sTextureIndex.=.0;..............
115c0 2f 2f 20 43 6c 65 61 72 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 73 0a 20 20 20 20 20 20 20 20 //.Clear.atlas.textures.........
115e0 20 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 20 21 3d 20 6e 75 6c 6c 29 ....if.(m_AtlasTextures.!=.null)
11600 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 .............{.................f
11620 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 or.(int.i.=.0;.i.<.m_AtlasTextur
11640 65 73 2e 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 es.Length;.i++).................
11660 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 65 78 74 75 72 65 32 44 20 {.....................Texture2D.
11680 74 65 78 74 75 72 65 20 3d 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 69 5d 3b 0a 0a 20 texture.=.m_AtlasTextures[i];...
116a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3e 20 30 29 0a 20 20 ...................if.(i.>.0)...
116c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 73 74 72 6f 79 49 6d 6d ......................DestroyImm
116e0 65 64 69 61 74 65 28 74 65 78 74 75 72 65 2c 20 74 72 75 65 29 3b 0a 0a 20 20 20 20 20 20 20 20 ediate(texture,.true);..........
11700 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 78 74 75 72 65 20 3d 3d 20 6e 75 6c 6c 29 ............if.(texture.==.null)
11720 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 .........................continu
11740 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a e;......................//.TODO:
11760 20 4e 65 65 64 20 74 65 78 74 75 72 65 20 74 6f 20 62 65 20 72 65 61 64 61 62 6c 65 2e 0a 20 20 .Need.texture.to.be.readable....
11780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 74 6c 61 73 54 65 78 ..................if.(m_AtlasTex
117a0 74 75 72 65 73 5b 69 5d 2e 69 73 52 65 61 64 61 62 6c 65 20 3d 3d 20 66 61 6c 73 65 29 0a 20 20 tures[i].isReadable.==.false)...
117c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
117e0 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 55 6e ............Debug.LogWarning("Un
11800 61 62 6c 65 20 74 6f 20 72 65 73 65 74 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 able.to.reset.font.asset.[".+.th
11820 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 27 73 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 2e 20 50 6c is.name.+."]'s.atlas.texture..Pl
11840 65 61 73 65 20 6d 61 6b 65 20 74 68 65 20 74 65 78 74 75 72 65 20 5b 22 20 2b 20 6d 5f 41 74 6c ease.make.the.texture.[".+.m_Atl
11860 61 73 54 65 78 74 75 72 65 73 5b 69 5d 2e 6e 61 6d 65 20 2b 20 22 5d 20 72 65 61 64 61 62 6c 65 asTextures[i].name.+."].readable
11880 2e 22 2c 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 5b 69 5d 29 3b 0a 20 20 20 20 20 20 20 .",.m_AtlasTextures[i]);........
118a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 20 20 20 20 20 .................continue;......
118c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
118e0 20 20 20 20 20 20 69 66 20 28 73 65 74 41 74 6c 61 73 53 69 7a 65 54 6f 5a 65 72 6f 29 0a 20 20 ......if.(setAtlasSizeToZero)...
11900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
11920 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 74 75 72 65 2e 52 65 73 69 7a 65 28 30 2c 20 30 2c ............texture.Resize(0,.0,
11940 20 54 65 78 74 75 72 65 46 6f 72 6d 61 74 2e 41 6c 70 68 61 38 2c 20 66 61 6c 73 65 29 3b 0a 20 .TextureFormat.Alpha8,.false);..
11960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 ...................}............
11980 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 74 65 78 74 75 72 65 2e 77 69 64 74 68 20 .........else.if.(texture.width.
119a0 21 3d 20 6d 5f 41 74 6c 61 73 57 69 64 74 68 20 7c 7c 20 74 65 78 74 75 72 65 2e 68 65 69 67 68 !=.m_AtlasWidth.||.texture.heigh
119c0 74 20 21 3d 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 t.!=.m_AtlasHeight).............
119e0 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........{.......................
11a00 20 20 74 65 78 74 75 72 65 2e 52 65 73 69 7a 65 28 6d 5f 41 74 6c 61 73 57 69 64 74 68 2c 20 6d ..texture.Resize(m_AtlasWidth,.m
11a20 5f 41 74 6c 61 73 48 65 69 67 68 74 2c 20 54 65 78 74 75 72 65 46 6f 72 6d 61 74 2e 41 6c 70 68 _AtlasHeight,.TextureFormat.Alph
11a40 61 38 2c 20 66 61 6c 73 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 a8,.false);.....................
11a60 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 }......................//.Clear.
11a80 74 65 78 74 75 72 65 20 61 74 6c 61 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 texture.atlas...................
11aa0 20 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 52 65 73 65 74 41 74 6c 61 73 54 65 78 74 75 72 65 28 74 ..FontEngine.ResetAtlasTexture(t
11ac0 65 78 74 75 72 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 65 78 exture);.....................tex
11ae0 74 75 72 65 2e 41 70 70 6c 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ture.Apply();...................
11b00 20 20 20 69 66 20 28 69 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...if.(i.==.0)..................
11b20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 20 3d 20 74 65 78 74 75 72 65 3b .......m_AtlasTexture.=.texture;
11b40 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 ......................m_AtlasTex
11b60 74 75 72 65 73 5b 69 5d 20 3d 20 74 65 78 74 75 72 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 tures[i].=.texture;.............
11b80 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 ....}.............}.............
11ba0 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .#if.UNITY_EDITOR.............if
11bc0 20 28 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 49 73 50 65 .(UnityEditor.EditorUtility.IsPe
11be0 72 73 69 73 74 65 6e 74 28 74 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 rsistent(this)).............{...
11c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 6f 75 72 63 65 ..............TMP_EditorResource
11c20 4d 61 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 52 65 69 6d 70 Manager.RegisterResourceForReimp
11c40 6f 72 74 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 ort(this);.............}........
11c60 20 20 20 20 20 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 52 65 61 64 46 6f 6e .....#endif..............ReadFon
11c80 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a tAssetDefinition();.........}...
11ca0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f .........///.<summary>........./
11cc0 2f 2f 20 49 6e 74 65 72 6e 61 6c 20 6d 65 74 68 6f 64 20 75 73 65 64 20 74 6f 20 75 70 67 72 61 //.Internal.method.used.to.upgra
11ce0 64 65 20 66 6f 6e 74 20 61 73 73 65 74 20 74 6f 20 73 75 70 70 6f 72 74 20 44 79 6e 61 6d 69 63 de.font.asset.to.support.Dynamic
11d00 20 53 44 46 2e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 .SDF..........///.</summary>....
11d20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 55 70 67 72 61 64 65 46 6f 6e 74 41 73 73 .....private.void.UpgradeFontAss
11d40 65 74 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 56 65 72 et().........{.............m_Ver
11d60 73 69 6f 6e 20 3d 20 22 31 2e 31 2e 30 22 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 sion.=."1.1.0";..............Deb
11d80 75 67 2e 4c 6f 67 28 22 55 70 67 72 61 64 69 6e 67 20 66 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 ug.Log("Upgrading.font.asset.[".
11da0 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 74 6f 20 76 65 72 73 69 6f 6e 20 22 20 2b 20 +.this.name.+."].to.version.".+.
11dc0 6d 5f 56 65 72 73 69 6f 6e 20 2b 20 22 2e 22 2c 20 74 68 69 73 29 3b 0a 0a 20 20 20 20 20 20 20 m_Version.+.".",.this);.........
11de0 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 66 61 6d 69 6c 79 4e 61 6d 65 20 3d 20 6d 5f 66 .....m_FaceInfo.familyName.=.m_f
11e00 6f 6e 74 49 6e 66 6f 2e 4e 61 6d 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 ontInfo.Name;.............m_Face
11e20 49 6e 66 6f 2e 73 74 79 6c 65 4e 61 6d 65 20 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0a 0a Info.styleName.=.string.Empty;..
11e40 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 70 6f 69 6e 74 53 69 7a 65 ............m_FaceInfo.pointSize
11e60 20 3d 20 28 69 6e 74 29 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 50 6f 69 6e 74 53 69 7a 65 3b 0a 20 20 .=.(int)m_fontInfo.PointSize;...
11e80 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 63 61 6c 65 20 3d 20 6d 5f 66 ..........m_FaceInfo.scale.=.m_f
11ea0 6f 6e 74 49 6e 66 6f 2e 53 63 61 6c 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 ontInfo.Scale;..............m_Fa
11ec0 63 65 49 6e 66 6f 2e 6c 69 6e 65 48 65 69 67 68 74 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 4c ceInfo.lineHeight.=.m_fontInfo.L
11ee0 69 6e 65 48 65 69 67 68 74 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 ineHeight;.............m_FaceInf
11f00 6f 2e 61 73 63 65 6e 74 4c 69 6e 65 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 41 73 63 65 6e 64 o.ascentLine.=.m_fontInfo.Ascend
11f20 65 72 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 63 61 70 4c 69 er;.............m_FaceInfo.capLi
11f40 6e 65 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 43 61 70 48 65 69 67 68 74 3b 0a 20 20 20 20 20 ne.=.m_fontInfo.CapHeight;......
11f60 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 6d 65 61 6e 4c 69 6e 65 20 3d 20 6d 5f 66 .......m_FaceInfo.meanLine.=.m_f
11f80 6f 6e 74 49 6e 66 6f 2e 43 65 6e 74 65 72 4c 69 6e 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 ontInfo.CenterLine;.............
11fa0 6d 5f 46 61 63 65 49 6e 66 6f 2e 62 61 73 65 6c 69 6e 65 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f m_FaceInfo.baseline.=.m_fontInfo
11fc0 2e 42 61 73 65 6c 69 6e 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 .Baseline;.............m_FaceInf
11fe0 6f 2e 64 65 73 63 65 6e 74 4c 69 6e 65 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 44 65 73 63 65 o.descentLine.=.m_fontInfo.Desce
12000 6e 64 65 72 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 75 nder;..............m_FaceInfo.su
12020 70 65 72 73 63 72 69 70 74 4f 66 66 73 65 74 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 53 75 70 perscriptOffset.=.m_fontInfo.Sup
12040 65 72 73 63 72 69 70 74 4f 66 66 73 65 74 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 erscriptOffset;.............m_Fa
12060 63 65 49 6e 66 6f 2e 73 75 70 65 72 73 63 72 69 70 74 53 69 7a 65 20 3d 20 6d 5f 66 6f 6e 74 49 ceInfo.superscriptSize.=.m_fontI
12080 6e 66 6f 2e 53 75 62 53 69 7a 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 nfo.SubSize;.............m_FaceI
120a0 6e 66 6f 2e 73 75 62 73 63 72 69 70 74 4f 66 66 73 65 74 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f nfo.subscriptOffset.=.m_fontInfo
120c0 2e 53 75 62 73 63 72 69 70 74 4f 66 66 73 65 74 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f .SubscriptOffset;.............m_
120e0 46 61 63 65 49 6e 66 6f 2e 73 75 62 73 63 72 69 70 74 53 69 7a 65 20 3d 20 6d 5f 66 6f 6e 74 49 FaceInfo.subscriptSize.=.m_fontI
12100 6e 66 6f 2e 53 75 62 53 69 7a 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 nfo.SubSize;..............m_Face
12120 49 6e 66 6f 2e 75 6e 64 65 72 6c 69 6e 65 4f 66 66 73 65 74 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 Info.underlineOffset.=.m_fontInf
12140 6f 2e 55 6e 64 65 72 6c 69 6e 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 o.Underline;.............m_FaceI
12160 6e 66 6f 2e 75 6e 64 65 72 6c 69 6e 65 54 68 69 63 6b 6e 65 73 73 20 3d 20 6d 5f 66 6f 6e 74 49 nfo.underlineThickness.=.m_fontI
12180 6e 66 6f 2e 55 6e 64 65 72 6c 69 6e 65 54 68 69 63 6b 6e 65 73 73 3b 0a 20 20 20 20 20 20 20 20 nfo.UnderlineThickness;.........
121a0 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 ....m_FaceInfo.strikethroughOffs
121c0 65 74 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 73 74 72 69 6b 65 74 68 72 6f 75 67 68 3b 0a 20 et.=.m_fontInfo.strikethrough;..
121e0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 63 65 49 6e 66 6f 2e 73 74 72 69 6b 65 74 68 72 6f ...........m_FaceInfo.strikethro
12200 75 67 68 54 68 69 63 6b 6e 65 73 73 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 73 74 72 69 6b 65 ughThickness.=.m_fontInfo.strike
12220 74 68 72 6f 75 67 68 54 68 69 63 6b 6e 65 73 73 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d throughThickness;..............m
12240 5f 46 61 63 65 49 6e 66 6f 2e 74 61 62 57 69 64 74 68 20 3d 20 6d 5f 66 6f 6e 74 49 6e 66 6f 2e _FaceInfo.tabWidth.=.m_fontInfo.
12260 54 61 62 57 69 64 74 68 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 74 6c TabWidth;..............if.(m_Atl
12280 61 73 54 65 78 74 75 72 65 73 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 41 74 6c 61 73 54 65 78 asTextures.==.null.||.m_AtlasTex
122a0 74 75 72 65 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 tures.Length.==.0)..............
122c0 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 72 65 73 20 3d 20 6e 65 77 20 54 65 78 74 75 72 65 ...m_AtlasTextures.=.new.Texture
122e0 32 44 5b 31 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 54 65 78 74 75 2D[1];..............m_AtlasTextu
12300 72 65 73 5b 30 5d 20 3d 20 61 74 6c 61 73 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 61 res[0].=.atlas;..............//a
12320 74 6c 61 73 20 3d 20 6e 75 6c 6c 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 tlas.=.null;..............m_Atla
12340 73 57 69 64 74 68 20 3d 20 28 69 6e 74 29 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 41 74 6c 61 73 57 69 sWidth.=.(int)m_fontInfo.AtlasWi
12360 64 74 68 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 20 3d dth;.............m_AtlasHeight.=
12380 20 28 69 6e 74 29 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 41 74 6c 61 73 48 65 69 67 68 74 3b 0a 20 20 .(int)m_fontInfo.AtlasHeight;...
123a0 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 50 61 64 64 69 6e 67 20 3d 20 28 69 6e 74 29 ..........m_AtlasPadding.=.(int)
123c0 6d 5f 66 6f 6e 74 49 6e 66 6f 2e 50 61 64 64 69 6e 67 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 m_fontInfo.Padding;.............
123e0 20 73 77 69 74 63 68 28 6d 5f 43 72 65 61 74 69 6f 6e 53 65 74 74 69 6e 67 73 2e 72 65 6e 64 65 .switch(m_CreationSettings.rende
12400 72 4d 6f 64 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 rMode).............{............
12420 20 20 20 20 20 63 61 73 65 20 30 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....case.0:....................
12440 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 3d 20 47 6c 79 70 68 52 65 6e 64 65 72 .m_AtlasRenderMode.=.GlyphRender
12460 4d 6f 64 65 2e 53 4d 4f 4f 54 48 5f 48 49 4e 54 45 44 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 Mode.SMOOTH_HINTED;.............
12480 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 ........break;.................c
124a0 61 73 65 20 31 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c ase.1:.....................m_Atl
124c0 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 3d 20 47 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 2e 53 asRenderMode.=.GlyphRenderMode.S
124e0 4d 4f 4f 54 48 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b MOOTH;.....................break
12500 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 32 3a 0a 20 20 20 20 20 20 ;.................case.2:.......
12520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 ..............m_AtlasRenderMode.
12540 3d 20 47 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 2e 52 41 53 54 45 52 5f 48 49 4e 54 45 44 3b =.GlyphRenderMode.RASTER_HINTED;
12560 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 .....................break;.....
12580 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 33 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 ............case.3:.............
125a0 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 3d 20 47 6c 79 70 ........m_AtlasRenderMode.=.Glyp
125c0 68 52 65 6e 64 65 72 4d 6f 64 65 2e 52 41 53 54 45 52 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 hRenderMode.RASTER;.............
125e0 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 ........break;.................c
12600 61 73 65 20 36 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c ase.6:.....................m_Atl
12620 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 3d 20 47 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 2e 53 asRenderMode.=.GlyphRenderMode.S
12640 44 46 31 36 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b DF16;.....................break;
12660 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 37 3a 0a 20 20 20 20 20 20 20 .................case.7:........
12680 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 74 6c 61 73 52 65 6e 64 65 72 4d 6f 64 65 20 3d .............m_AtlasRenderMode.=
126a0 20 47 6c 79 70 68 52 65 6e 64 65 72 4d 6f 64 65 2e 53 44 46 33 32 3b 0a 20 20 20 20 20 20 20 20 .GlyphRenderMode.SDF32;.........
126c0 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d ............break;.............}
126e0 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 66 6f 6e 74 49 6e 66 6f 20 3d 20 6e 75 6c ..............//m_fontInfo.=.nul
12700 6c 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 76 65 72 74 20 66 6f 6e 74 20 l;..............//.Convert.font.
12720 77 65 69 67 68 74 20 74 61 62 6c 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 6f 6e weight.table.............if.(fon
12740 74 57 65 69 67 68 74 73 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a tWeights.!=.null).............{.
12760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 54 61 62 6c ................m_FontWeightTabl
12780 65 5b 34 5d 20 3d 20 66 6f 6e 74 57 65 69 67 68 74 73 5b 34 5d 3b 0a 20 20 20 20 20 20 20 20 20 e[4].=.fontWeights[4];..........
127a0 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 54 61 62 6c 65 5b 37 5d 20 3d 20 66 6f .......m_FontWeightTable[7].=.fo
127c0 6e 74 57 65 69 67 68 74 73 5b 37 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ntWeights[7];................../
127e0 2f 20 43 6c 65 61 72 20 6f 6c 64 20 66 6f 6e 74 57 65 69 67 68 74 0a 20 20 20 20 20 20 20 20 20 /.Clear.old.fontWeight..........
12800 20 20 20 20 20 20 20 2f 2f 66 6f 6e 74 57 65 69 67 68 74 73 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 .......//fontWeights.=.null;....
12820 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 76 65 .........}..............//.Conve
12840 72 74 20 66 6f 6e 74 20 66 61 6c 6c 62 61 63 6b 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 rt.font.fallbacks.............if
12860 20 28 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 20 21 3d 20 6e 75 6c 6c 20 26 26 20 .(fallbackFontAssets.!=.null.&&.
12880 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0a 20 20 fallbackFontAssets.Count.>.0)...
128a0 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 ..........{.................if.(
128c0 6d 5f 46 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c m_FallbackFontAssetTable.==.null
128e0 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 6c 6c 62 61 63 6b ).....................m_Fallback
12900 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 20 3d 20 6e 65 77 20 4c 69 73 74 3c 54 4d 50 5f 46 6f FontAssetTable.=.new.List<TMP_Fo
12920 6e 74 41 73 73 65 74 3e 28 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 2e 43 6f 75 6e ntAsset>(fallbackFontAssets.Coun
12940 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 t);..................for.(int.i.
12960 3d 20 30 3b 20 69 20 3c 20 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 73 2e 43 6f 75 6e =.0;.i.<.fallbackFontAssets.Coun
12980 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 61 t;.i++).....................m_Fa
129a0 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 2e 41 64 64 28 66 61 6c 6c 62 61 63 llbackFontAssetTable.Add(fallbac
129c0 6b 46 6f 6e 74 41 73 73 65 74 73 5b 69 5d 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 kFontAssets[i]);................
129e0 20 20 2f 2f 20 43 6c 65 61 72 20 6f 6c 64 20 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 ..//.Clear.old.fallbackFontAsset
12a00 73 20 6c 69 73 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 66 61 6c 6c 62 61 63 s.list.................//fallbac
12a20 6b 46 6f 6e 74 41 73 73 65 74 73 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 kFontAssets.=.null;.............
12a40 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 66 6f 6e 74 20 }..............//.Check.if.font.
12a60 61 73 73 65 74 20 63 72 65 61 74 69 6f 6e 20 73 65 74 74 69 6e 67 73 20 63 6f 6e 74 61 69 6e 73 asset.creation.settings.contains
12a80 20 61 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 73 6f 75 72 63 65 20 66 6f 6e 74 20 .a.reference.to.the.source.font.
12aa0 66 69 6c 65 20 47 55 49 44 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 72 65 61 file.GUID.............if.(m_Crea
12ac0 74 69 6f 6e 53 65 74 74 69 6e 67 73 2e 73 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 20 tionSettings.sourceFontFileGUID.
12ae0 21 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 43 72 65 61 74 69 6f 6e 53 65 74 74 69 6e 67 73 2e 73 6f !=.null.||.m_CreationSettings.so
12b00 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 20 21 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 urceFontFileGUID.!=.string.Empty
12b20 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ).............{.................
12b40 6d 5f 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 20 3d 20 6d 5f 43 72 65 61 74 69 6f m_SourceFontFileGUID.=.m_Creatio
12b60 6e 53 65 74 74 69 6e 67 73 2e 73 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 3b 0a 20 20 nSettings.sourceFontFileGUID;...
12b80 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0a 20 20 20 ..........}.............else....
12ba0 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 .........{.................Debug
12bc0 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 46 6f 6e 74 20 61 73 73 65 74 20 5b 22 20 2b 20 74 68 69 .LogWarning("Font.asset.[".+.thi
12be0 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 64 6f 65 73 6e 27 74 20 68 61 76 65 20 61 20 72 65 66 65 72 s.name.+."].doesn't.have.a.refer
12c00 65 6e 63 65 20 74 6f 20 69 74 73 20 73 6f 75 72 63 65 20 66 6f 6e 74 20 66 69 6c 65 2e 20 50 6c ence.to.its.source.font.file..Pl
12c20 65 61 73 65 20 61 73 73 69 67 6e 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 6f 75 72 ease.assign.the.appropriate.sour
12c40 63 65 20 66 6f 6e 74 20 66 69 6c 65 20 66 6f 72 20 74 68 69 73 20 61 73 73 65 74 20 69 6e 20 74 ce.font.file.for.this.asset.in.t
12c60 68 65 20 46 6f 6e 74 20 41 74 6c 61 73 20 26 20 4d 61 74 65 72 69 61 6c 20 73 65 63 74 69 6f 6e he.Font.Atlas.&.Material.section
12c80 20 6f 66 20 66 6f 6e 74 20 61 73 73 65 74 20 69 6e 73 70 65 63 74 6f 72 2e 22 2c 20 74 68 69 73 .of.font.asset.inspector.",.this
12ca0 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f );.............}..............//
12cc0 20 43 6f 6e 76 65 72 74 20 6c 65 67 61 63 79 20 67 6c 79 70 68 20 61 6e 64 20 63 68 61 72 61 63 .Convert.legacy.glyph.and.charac
12ce0 74 65 72 20 74 61 62 6c 65 73 20 74 6f 20 6e 65 77 20 66 6f 72 6d 61 74 0a 20 20 20 20 20 20 20 ter.tables.to.new.format........
12d00 20 20 20 20 20 6d 5f 47 6c 79 70 68 54 61 62 6c 65 2e 43 6c 65 61 72 28 29 3b 0a 20 20 20 20 20 .....m_GlyphTable.Clear();......
12d20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 43 6c 65 61 72 28 29 3b .......m_CharacterTable.Clear();
12d40 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 ..............//#if.UNITY_EDITOR
12d60 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 54 68 69 73 20 69 73 20 63 61 .............//.TODO:.This.is.ca
12d80 75 73 69 6e 67 20 61 20 63 72 61 73 68 20 69 6e 20 55 6e 69 74 79 20 61 6e 64 20 72 65 6c 61 74 using.a.crash.in.Unity.and.relat
12da0 65 64 20 74 6f 20 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 4c 6f 61 64 41 73 73 65 74 41 74 50 ed.to.AssetDatabase.LoadAssetAtP
12dc0 61 74 68 20 61 6e 64 20 52 65 73 6f 75 72 63 65 73 2e 4c 6f 61 64 28 29 0a 20 20 20 20 20 20 20 ath.and.Resources.Load()........
12de0 20 20 20 20 20 2f 2f 20 4c 6f 61 64 20 66 6f 6e 74 20 74 6f 20 61 6c 6c 6f 77 20 75 73 20 74 6f .....//.Load.font.to.allow.us.to
12e00 20 67 65 74 20 74 68 65 20 67 6c 79 70 68 20 69 6e 64 65 78 2e 0a 20 20 20 20 20 20 20 20 20 20 .get.the.glyph.index............
12e20 20 20 2f 2f 73 74 72 69 6e 67 20 70 61 74 68 20 3d 20 55 6e 69 74 79 45 64 69 74 6f 72 2e 41 73 ..//string.path.=.UnityEditor.As
12e40 73 65 74 44 61 74 61 62 61 73 65 2e 47 55 49 44 54 6f 41 73 73 65 74 50 61 74 68 28 6d 5f 53 6f setDatabase.GUIDToAssetPath(m_So
12e60 75 72 63 65 46 6f 6e 74 46 69 6c 65 47 55 49 44 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 urceFontFileGUID);..............
12e80 2f 2f 69 66 20 28 70 61 74 68 20 21 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 29 0a 20 20 20 20 //if.(path.!=.string.Empty).....
12ea0 20 20 20 20 20 20 20 20 2f 2f 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f ........//{.................//m_
12ec0 53 6f 75 72 63 65 46 6f 6e 74 46 69 6c 65 5f 45 64 69 74 6f 72 52 65 66 20 3d 20 55 6e 69 74 79 SourceFontFile_EditorRef.=.Unity
12ee0 45 64 69 74 6f 72 2e 41 73 73 65 74 44 61 74 61 62 61 73 65 2e 4c 6f 61 64 41 73 73 65 74 41 74 Editor.AssetDatabase.LoadAssetAt
12f00 50 61 74 68 3c 46 6f 6e 74 3e 28 70 61 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Path<Font>(path);...............
12f20 20 20 2f 2f 46 6f 6e 74 45 6e 67 69 6e 65 2e 4c 6f 61 64 46 6f 6e 74 46 61 63 65 28 6d 5f 53 6f ..//FontEngine.LoadFontFace(m_So
12f40 75 72 63 65 46 6f 6e 74 46 69 6c 65 5f 45 64 69 74 6f 72 52 65 66 29 3b 0a 20 20 20 20 20 20 20 urceFontFile_EditorRef);........
12f60 20 20 20 20 20 2f 2f 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 65 6e 64 69 66 0a 0a 20 .....//}.............//#endif...
12f80 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 53 70 61 63 65 43 68 61 72 61 63 74 65 72 ...........bool.isSpaceCharacter
12fa0 50 72 65 73 65 6e 74 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 Present.=.false;.............for
12fc0 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 67 6c 79 70 68 49 6e 66 6f 4c 69 73 74 .(int.i.=.0;.i.<.m_glyphInfoList
12fe0 2e 43 6f 75 6e 74 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 .Count;.i++).............{......
13000 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 47 6c 79 70 68 20 6f 6c 64 47 6c 79 70 68 20 3d 20 ...........TMP_Glyph.oldGlyph.=.
13020 6d 5f 67 6c 79 70 68 49 6e 66 6f 4c 69 73 74 5b 69 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 m_glyphInfoList[i];.............
13040 20 20 20 20 20 47 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 6e 65 77 20 47 6c 79 70 68 28 29 3b 0a .....Glyph.glyph.=.new.Glyph();.
13060 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 67 6c 79 70 68 49 6e 64 65 78 .................uint.glyphIndex
13080 20 3d 20 28 75 69 6e 74 29 69 20 2b 20 31 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.(uint)i.+.1;.................
130a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 23 69 66 20 55 4e 49 54 59 5f 45 44 49 .................//#if.UNITY_EDI
130c0 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 5f 53 6f 75 72 TOR.................//if.(m_Sour
130e0 63 65 46 6f 6e 74 46 69 6c 65 5f 45 64 69 74 6f 72 52 65 66 20 21 3d 20 6e 75 6c 6c 29 0a 20 20 ceFontFile_EditorRef.!=.null)...
13100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 67 6c 79 70 68 49 6e 64 65 78 20 3d ..............//....glyphIndex.=
13120 20 46 6f 6e 74 45 6e 67 69 6e 65 2e 47 65 74 47 6c 79 70 68 49 6e 64 65 78 28 28 75 69 6e 74 29 .FontEngine.GetGlyphIndex((uint)
13140 6f 6c 64 47 6c 79 70 68 2e 69 64 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f oldGlyph.id);.................//
13160 23 65 6e 64 69 66 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 6c 79 70 68 2e 69 6e #endif..................glyph.in
13180 64 65 78 20 3d 20 67 6c 79 70 68 49 6e 64 65 78 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dex.=.glyphIndex;...............
131a0 20 20 67 6c 79 70 68 2e 67 6c 79 70 68 52 65 63 74 20 3d 20 6e 65 77 20 47 6c 79 70 68 52 65 63 ..glyph.glyphRect.=.new.GlyphRec
131c0 74 28 28 69 6e 74 29 6f 6c 64 47 6c 79 70 68 2e 78 2c 20 6d 5f 41 74 6c 61 73 48 65 69 67 68 74 t((int)oldGlyph.x,.m_AtlasHeight
131e0 20 2d 20 28 69 6e 74 29 28 6f 6c 64 47 6c 79 70 68 2e 79 20 2b 20 6f 6c 64 47 6c 79 70 68 2e 68 .-.(int)(oldGlyph.y.+.oldGlyph.h
13200 65 69 67 68 74 20 2b 20 30 2e 35 66 29 2c 20 28 69 6e 74 29 28 6f 6c 64 47 6c 79 70 68 2e 77 69 eight.+.0.5f),.(int)(oldGlyph.wi
13220 64 74 68 20 2b 20 30 2e 35 66 29 2c 20 28 69 6e 74 29 28 6f 6c 64 47 6c 79 70 68 2e 68 65 69 67 dth.+.0.5f),.(int)(oldGlyph.heig
13240 68 74 20 2b 20 30 2e 35 66 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 6c 79 ht.+.0.5f));.................gly
13260 70 68 2e 6d 65 74 72 69 63 73 20 3d 20 6e 65 77 20 47 6c 79 70 68 4d 65 74 72 69 63 73 28 6f 6c ph.metrics.=.new.GlyphMetrics(ol
13280 64 47 6c 79 70 68 2e 77 69 64 74 68 2c 20 6f 6c 64 47 6c 79 70 68 2e 68 65 69 67 68 74 2c 20 6f dGlyph.width,.oldGlyph.height,.o
132a0 6c 64 47 6c 79 70 68 2e 78 4f 66 66 73 65 74 2c 20 6f 6c 64 47 6c 79 70 68 2e 79 4f 66 66 73 65 ldGlyph.xOffset,.oldGlyph.yOffse
132c0 74 2c 20 6f 6c 64 47 6c 79 70 68 2e 78 41 64 76 61 6e 63 65 29 3b 0a 20 20 20 20 20 20 20 20 20 t,.oldGlyph.xAdvance);..........
132e0 20 20 20 20 20 20 20 67 6c 79 70 68 2e 73 63 61 6c 65 20 3d 20 6f 6c 64 47 6c 79 70 68 2e 73 63 .......glyph.scale.=.oldGlyph.sc
13300 61 6c 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 6c 79 70 68 2e 61 74 6c 61 73 ale;.................glyph.atlas
13320 49 6e 64 65 78 20 3d 20 30 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 6c Index.=.0;..................m_Gl
13340 79 70 68 54 61 62 6c 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 yphTable.Add(glyph);............
13360 20 20 20 20 20 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 20 3d 20 ......TMP_Character.character.=.
13380 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 28 28 75 69 6e 74 29 6f 6c 64 47 6c 79 70 68 new.TMP_Character((uint)oldGlyph
133a0 2e 69 64 2c 20 67 6c 79 70 68 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .id,.glyph);..................if
133c0 20 28 6f 6c 64 47 6c 79 70 68 2e 69 64 20 3d 3d 20 33 32 29 0a 20 20 20 20 20 20 20 20 20 20 20 .(oldGlyph.id.==.32)............
133e0 20 20 20 20 20 20 20 20 20 69 73 53 70 61 63 65 43 68 61 72 61 63 74 65 72 50 72 65 73 65 6e 74 .........isSpaceCharacterPresent
13400 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 68 61 72 .=.true;..................m_Char
13420 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 63 68 61 72 61 63 74 65 72 29 3b 0a 20 20 20 20 20 acterTable.Add(character);......
13440 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 70 65 63 69 61 6c .......}..............//.Special
13460 20 68 61 6e 64 6c 69 6e 67 20 66 6f 72 20 74 68 65 20 73 79 6e 74 68 65 73 69 7a 65 64 20 73 70 .handling.for.the.synthesized.sp
13480 61 63 65 20 63 68 61 72 61 63 74 65 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 69 ace.character.............if.(!i
134a0 73 53 70 61 63 65 43 68 61 72 61 63 74 65 72 50 72 65 73 65 6e 74 29 0a 20 20 20 20 20 20 20 20 sSpaceCharacterPresent).........
134c0 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 28 ....{.................Debug.Log(
134e0 22 53 79 6e 74 68 65 73 69 7a 69 6e 67 20 53 70 61 63 65 20 66 6f 72 20 5b 22 20 2b 20 74 68 69 "Synthesizing.Space.for.[".+.thi
13500 73 2e 6e 61 6d 65 20 2b 20 22 5d 22 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 s.name.+."]");.................G
13520 6c 79 70 68 20 67 6c 79 70 68 20 3d 20 6e 65 77 20 47 6c 79 70 68 28 30 2c 20 6e 65 77 20 47 6c lyph.glyph.=.new.Glyph(0,.new.Gl
13540 79 70 68 4d 65 74 72 69 63 73 28 30 2c 20 30 2c 20 30 2c 20 30 2c 20 6d 5f 46 61 63 65 49 6e 66 yphMetrics(0,.0,.0,.0,.m_FaceInf
13560 6f 2e 61 73 63 65 6e 74 4c 69 6e 65 20 2f 20 35 29 2c 20 47 6c 79 70 68 52 65 63 74 2e 7a 65 72 o.ascentLine./.5),.GlyphRect.zer
13580 6f 2c 20 31 2e 30 66 2c 20 30 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 47 o,.1.0f,.0);.................m_G
135a0 6c 79 70 68 54 61 62 6c 65 2e 41 64 64 28 67 6c 79 70 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 lyphTable.Add(glyph);...........
135c0 20 20 20 20 20 20 6d 5f 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 2e 41 64 64 28 6e 65 77 20 54 ......m_CharacterTable.Add(new.T
135e0 4d 50 5f 43 68 61 72 61 63 74 65 72 28 33 32 2c 20 67 6c 79 70 68 29 29 3b 0a 20 20 20 20 20 20 MP_Character(32,.glyph));.......
13600 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 6c 65 ......}..............//.Clear.le
13620 67 61 63 79 20 67 6c 79 70 68 20 69 6e 66 6f 20 6c 69 73 74 2e 0a 20 20 20 20 20 20 20 20 20 20 gacy.glyph.info.list............
13640 20 20 2f 2f 6d 5f 67 6c 79 70 68 49 6e 66 6f 4c 69 73 74 2e 43 6c 65 61 72 28 29 3b 0a 0a 20 20 ..//m_glyphInfoList.Clear();....
13660 20 20 20 20 20 20 20 20 20 20 52 65 61 64 46 6f 6e 74 41 73 73 65 74 44 65 66 69 6e 69 74 69 6f ..........ReadFontAssetDefinitio
13680 6e 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6e 76 65 72 74 20 61 74 6c n();..............//.Convert.atl
136a0 61 73 20 74 65 78 74 75 72 65 73 20 64 61 74 61 20 74 6f 20 6e 65 77 20 66 6f 72 6d 61 74 0a 20 as.textures.data.to.new.format..
136c0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 ...........//.TODO.............#
136e0 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 if.UNITY_EDITOR.............if.(
13700 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 49 73 50 65 72 73 UnityEditor.EditorUtility.IsPers
13720 69 73 74 65 6e 74 28 74 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 istent(this)).............{.....
13740 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 6f 75 72 63 65 4d 61 ............TMP_EditorResourceMa
13760 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 55 70 64 61 74 65 28 nager.RegisterResourceForUpdate(
13780 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 this);.............}............
137a0 20 23 65 6e 64 69 66 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c .#endif.........}..........///.<
137c0 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 0a 20 20 20 20 20 20 20 20 2f 2f summary>.........///..........//
137e0 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 55 70 67 72 61 64 /.</summary>.........void.Upgrad
13800 65 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 54 61 62 6c 65 54 6f 46 6f 6e 74 46 65 61 74 75 eGlyphAdjustmentTableToFontFeatu
13820 72 65 54 61 62 6c 65 28 29 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 reTable().........{.............
13840 44 65 62 75 67 2e 4c 6f 67 28 22 55 70 67 72 61 64 69 6e 67 20 66 6f 6e 74 20 61 73 73 65 74 20 Debug.Log("Upgrading.font.asset.
13860 5b 22 20 2b 20 74 68 69 73 2e 6e 61 6d 65 20 2b 20 22 5d 20 47 6c 79 70 68 20 41 64 6a 75 73 74 [".+.this.name.+."].Glyph.Adjust
13880 6d 65 6e 74 20 54 61 62 6c 65 2e 22 2c 20 74 68 69 73 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 ment.Table.",.this);............
138a0 20 20 69 66 20 28 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c ..if.(m_FontFeatureTable.==.null
138c0 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 ).................m_FontFeatureT
138e0 61 62 6c 65 20 3d 20 6e 65 77 20 54 4d 50 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 28 able.=.new.TMP_FontFeatureTable(
13900 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 70 61 69 72 43 6f 75 6e 74 20 3d 20 );..............int.pairCount.=.
13920 6d 5f 4b 65 72 6e 69 6e 67 54 61 62 6c 65 2e 6b 65 72 6e 69 6e 67 50 61 69 72 73 2e 43 6f 75 6e m_KerningTable.kerningPairs.Coun
13940 74 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 t;..............m_FontFeatureTab
13960 6c 65 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 20 le.m_GlyphPairAdjustmentRecords.
13980 3d 20 6e 65 77 20 4c 69 73 74 3c 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 =.new.List<TMP_GlyphPairAdjustme
139a0 6e 74 52 65 63 6f 72 64 3e 28 70 61 69 72 43 6f 75 6e 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 ntRecord>(pairCount);...........
139c0 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 70 61 69 72 43 6f 75 6e 74 ...for.(int.i.=.0;.i.<.pairCount
139e0 3b 20 69 2b 2b 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 ;.i++).............{............
13a00 20 20 20 20 20 4b 65 72 6e 69 6e 67 50 61 69 72 20 70 61 69 72 20 3d 20 6d 5f 4b 65 72 6e 69 6e .....KerningPair.pair.=.m_Kernin
13a20 67 54 61 62 6c 65 2e 6b 65 72 6e 69 6e 67 50 61 69 72 73 5b 69 5d 3b 0a 0a 20 20 20 20 20 20 20 gTable.kerningPairs[i];.........
13a40 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 66 69 72 73 74 47 6c 79 70 68 49 6e 64 65 78 20 3d 20 .........uint.firstGlyphIndex.=.
13a60 30 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 0;.................if.(m_Charact
13a80 65 72 4c 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 54 72 79 47 65 74 56 61 6c 75 65 28 70 erLookupDictionary.TryGetValue(p
13aa0 61 69 72 2e 66 69 72 73 74 47 6c 79 70 68 2c 20 6f 75 74 20 54 4d 50 5f 43 68 61 72 61 63 74 65 air.firstGlyph,.out.TMP_Characte
13ac0 72 20 66 69 72 73 74 43 68 61 72 61 63 74 65 72 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 r.firstCharacter))..............
13ae0 20 20 20 20 20 20 20 66 69 72 73 74 47 6c 79 70 68 49 6e 64 65 78 20 3d 20 66 69 72 73 74 43 68 .......firstGlyphIndex.=.firstCh
13b00 61 72 61 63 74 65 72 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 aracter.glyphIndex;.............
13b20 20 20 20 20 20 75 69 6e 74 20 73 65 63 6f 6e 64 47 6c 79 70 68 49 6e 64 65 78 20 3d 20 30 3b 0a .....uint.secondGlyphIndex.=.0;.
13b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 68 61 72 61 63 74 65 72 4c ................if.(m_CharacterL
13b60 6f 6f 6b 75 70 44 69 63 74 69 6f 6e 61 72 79 2e 54 72 79 47 65 74 56 61 6c 75 65 28 70 61 69 72 ookupDictionary.TryGetValue(pair
13b80 2e 73 65 63 6f 6e 64 47 6c 79 70 68 2c 20 6f 75 74 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 20 .secondGlyph,.out.TMP_Character.
13ba0 73 65 63 6f 6e 64 43 68 61 72 61 63 74 65 72 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 secondCharacter))...............
13bc0 20 20 20 20 20 20 73 65 63 6f 6e 64 47 6c 79 70 68 49 6e 64 65 78 20 3d 20 73 65 63 6f 6e 64 43 ......secondGlyphIndex.=.secondC
13be0 68 61 72 61 63 74 65 72 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 haracter.glyphIndex;............
13c00 20 20 20 20 20 20 54 4d 50 5f 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 20 ......TMP_GlyphAdjustmentRecord.
13c20 66 69 72 73 74 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 20 3d 20 6e 65 77 20 54 4d 50 5f firstAdjustmentRecord.=.new.TMP_
13c40 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 28 66 69 72 73 74 47 6c 79 70 68 GlyphAdjustmentRecord(firstGlyph
13c60 49 6e 64 65 78 2c 20 6e 65 77 20 54 4d 50 5f 47 6c 79 70 68 56 61 6c 75 65 52 65 63 6f 72 64 28 Index,.new.TMP_GlyphValueRecord(
13c80 70 61 69 72 2e 66 69 72 73 74 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 78 50 6c 61 63 pair.firstGlyphAdjustments.xPlac
13ca0 65 6d 65 6e 74 2c 20 70 61 69 72 2e 66 69 72 73 74 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 ement,.pair.firstGlyphAdjustment
13cc0 73 2e 79 50 6c 61 63 65 6d 65 6e 74 2c 20 70 61 69 72 2e 66 69 72 73 74 47 6c 79 70 68 41 64 6a s.yPlacement,.pair.firstGlyphAdj
13ce0 75 73 74 6d 65 6e 74 73 2e 78 41 64 76 61 6e 63 65 2c 20 70 61 69 72 2e 66 69 72 73 74 47 6c 79 ustments.xAdvance,.pair.firstGly
13d00 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 79 41 64 76 61 6e 63 65 29 29 3b 0a 20 20 20 20 20 20 phAdjustments.yAdvance));.......
13d20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 ..........TMP_GlyphAdjustmentRec
13d40 6f 72 64 20 73 65 63 6f 6e 64 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 20 3d 20 6e 65 77 ord.secondAdjustmentRecord.=.new
13d60 20 54 4d 50 5f 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 28 73 65 63 6f 6e .TMP_GlyphAdjustmentRecord(secon
13d80 64 47 6c 79 70 68 49 6e 64 65 78 2c 20 6e 65 77 20 54 4d 50 5f 47 6c 79 70 68 56 61 6c 75 65 52 dGlyphIndex,.new.TMP_GlyphValueR
13da0 65 63 6f 72 64 28 70 61 69 72 2e 73 65 63 6f 6e 64 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 ecord(pair.secondGlyphAdjustment
13dc0 73 2e 78 50 6c 61 63 65 6d 65 6e 74 2c 20 70 61 69 72 2e 73 65 63 6f 6e 64 47 6c 79 70 68 41 64 s.xPlacement,.pair.secondGlyphAd
13de0 6a 75 73 74 6d 65 6e 74 73 2e 79 50 6c 61 63 65 6d 65 6e 74 2c 20 70 61 69 72 2e 73 65 63 6f 6e justments.yPlacement,.pair.secon
13e00 64 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 78 41 64 76 61 6e 63 65 2c 20 70 61 69 72 dGlyphAdjustments.xAdvance,.pair
13e20 2e 73 65 63 6f 6e 64 47 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 79 41 64 76 61 6e 63 65 .secondGlyphAdjustments.yAdvance
13e40 29 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 47 6c 79 70 68 50 61 69 ));.................TMP_GlyphPai
13e60 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 20 72 65 63 6f 72 64 20 3d 20 6e 65 77 20 54 rAdjustmentRecord.record.=.new.T
13e80 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 28 66 69 72 MP_GlyphPairAdjustmentRecord(fir
13ea0 73 74 41 64 6a 75 73 74 6d 65 6e 74 52 65 63 6f 72 64 2c 20 73 65 63 6f 6e 64 41 64 6a 75 73 74 stAdjustmentRecord,.secondAdjust
13ec0 6d 65 6e 74 52 65 63 6f 72 64 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f mentRecord);..................m_
13ee0 46 6f 6e 74 46 65 61 74 75 72 65 54 61 62 6c 65 2e 6d 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 FontFeatureTable.m_GlyphPairAdju
13f00 73 74 6d 65 6e 74 52 65 63 6f 72 64 73 2e 41 64 64 28 72 65 63 6f 72 64 29 3b 0a 20 20 20 20 20 stmentRecords.Add(record);......
13f20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 53 .......}..............//.TODO:.S
13f40 68 6f 75 6c 64 20 63 6c 65 61 72 20 6c 65 67 61 63 79 20 6b 65 72 6e 69 6e 67 20 74 61 62 6c 65 hould.clear.legacy.kerning.table
13f60 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4b 65 72 6e 69 6e 67 54 61 62 6c 65 2e 6b 65 72 ..............m_KerningTable.ker
13f80 6e 69 6e 67 50 61 69 72 73 20 3d 20 6e 75 6c 6c 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f ningPairs.=.null;.............m_
13fa0 4b 65 72 6e 69 6e 67 54 61 62 6c 65 20 3d 20 6e 75 6c 6c 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 KerningTable.=.null;............
13fc0 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 ..#if.UNITY_EDITOR.............i
13fe0 66 20 28 55 6e 69 74 79 45 64 69 74 6f 72 2e 45 64 69 74 6f 72 55 74 69 6c 69 74 79 2e 49 73 50 f.(UnityEditor.EditorUtility.IsP
14000 65 72 73 69 73 74 65 6e 74 28 74 68 69 73 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 ersistent(this)).............{..
14020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 45 64 69 74 6f 72 52 65 73 6f 75 72 63 ...............TMP_EditorResourc
14040 65 4d 61 6e 61 67 65 72 2e 52 65 67 69 73 74 65 72 52 65 73 6f 75 72 63 65 46 6f 72 55 70 64 61 eManager.RegisterResourceForUpda
14060 74 65 28 74 68 69 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 te(this);.............}.........
14080 20 20 20 20 23 65 6e 64 69 66 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 7d 0a 7d 00 00 00 ....#endif.........}......}.}...
140a0 00 00 00 00 01 00 00 00 80 b9 2a 00 00 00 00 00 00 00 00 00 0d 00 00 00 54 4d 50 5f 46 6f 6e 74 ..........*.............TMP_Font
140c0 41 73 73 65 74 00 00 00 05 00 00 00 54 4d 50 72 6f 00 00 00 Asset.......TMPro...