summaryrefslogtreecommitdiff
path: root/Library/Artifacts/31/31146bcd49110d52caf20dbcb7e2b935
blob: a87c7f4bf1c65557cdf3621cf7d6e2e7d2c6746b (plain)
ofshex dumpascii
0000 00 00 0f 97 00 03 54 c0 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ......T.............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 60 44 03 00 01 00 00 00 00 00 00 00 01 00 00 00 00 e8 90 d8 d8 82 5c 81 42 91 7f 1a 8c 9b c1 7a `D....................\.B......z
0fa0 22 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 72 6f 5f 50 72 69 76 61 74 65 00 00 00 f3 43 03 00 ............TMPro_Private....C..
10a0 2f 2f 23 64 65 66 69 6e 65 20 54 4d 50 5f 50 52 4f 46 49 4c 45 5f 4f 4e 0d 0a 2f 2f 23 64 65 66 //#define.TMP_PROFILE_ON..//#def
10c0 69 6e 65 20 54 4d 50 5f 50 52 4f 46 49 4c 45 5f 50 48 41 53 45 53 5f 4f 4e 0d 0a 0d 0a 75 73 69 ine.TMP_PROFILE_PHASES_ON....usi
10e0 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 ng.UnityEngine;..using.UnityEngi
1100 6e 65 2e 54 65 78 74 43 6f 72 65 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 ne.TextCore;..using.System;..usi
1120 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 3b 0d 0a 75 73 69 6e 67 20 53 79 ng.System.Collections;..using.Sy
1140 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 0d 0a 0d 0a 23 70 72 stem.Collections.Generic;....#pr
1160 61 67 6d 61 20 77 61 72 6e 69 6e 67 20 64 69 73 61 62 6c 65 20 30 34 31 34 20 2f 2f 20 44 69 73 agma.warning.disable.0414.//.Dis
1180 61 62 6c 65 64 20 61 20 66 65 77 20 77 61 72 6e 69 6e 67 73 20 72 65 6c 61 74 65 64 20 74 6f 20 abled.a.few.warnings.related.to.
11a0 73 65 72 69 61 6c 69 7a 65 64 20 76 61 72 69 61 62 6c 65 73 20 6e 6f 74 20 75 73 65 64 20 69 6e serialized.variables.not.used.in
11c0 20 74 68 69 73 20 73 63 72 69 70 74 20 62 75 74 20 75 73 65 64 20 69 6e 20 74 68 65 20 65 64 69 .this.script.but.used.in.the.edi
11e0 74 6f 72 2e 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 54 4d 50 72 6f 0d 0a 7b 0d 0a 0d 0a 20 20 tor.....namespace.TMPro..{......
1200 20 20 70 75 62 6c 69 63 20 70 61 72 74 69 61 6c 20 63 6c 61 73 73 20 54 65 78 74 4d 65 73 68 50 ..public.partial.class.TextMeshP
1220 72 6f 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 ro......{..........[SerializeFie
1240 6c 64 5d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 68 61 73 46 ld]..........private.bool.m_hasF
1260 6f 6e 74 41 73 73 65 74 43 68 61 6e 67 65 64 20 3d 20 66 61 6c 73 65 3b 20 2f 2f 20 55 73 65 64 ontAssetChanged.=.false;.//.Used
1280 20 74 6f 20 74 72 61 63 6b 20 77 68 65 6e 20 66 6f 6e 74 20 70 72 6f 70 65 72 74 69 65 73 20 68 .to.track.when.font.properties.h
12a0 61 76 65 20 63 68 61 6e 67 65 64 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6d 5f ave.changed.............float.m_
12c0 70 72 65 76 69 6f 75 73 4c 6f 73 73 79 53 63 61 6c 65 59 20 3d 20 2d 31 3b 20 2f 2f 20 55 73 65 previousLossyScaleY.=.-1;.//.Use
12e0 64 20 66 6f 72 20 54 72 61 63 6b 69 6e 67 20 6c 6f 73 73 79 20 73 63 61 6c 65 20 63 68 61 6e 67 d.for.Tracking.lossy.scale.chang
1300 65 73 20 69 6e 20 74 68 65 20 74 72 61 6e 73 66 6f 72 6d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 es.in.the.transform;............
1320 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 [SerializeField]..........privat
1340 65 20 52 65 6e 64 65 72 65 72 20 6d 5f 72 65 6e 64 65 72 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 e.Renderer.m_renderer;..........
1360 70 72 69 76 61 74 65 20 4d 65 73 68 46 69 6c 74 65 72 20 6d 5f 6d 65 73 68 46 69 6c 74 65 72 3b private.MeshFilter.m_meshFilter;
1380 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 69 73 46 69 72 ............private.bool.m_isFir
13a0 73 74 41 6c 6c 6f 63 61 74 69 6f 6e 3b 20 2f 2f 20 46 6c 61 67 20 74 6f 20 64 65 74 65 72 6d 69 stAllocation;.//.Flag.to.determi
13c0 6e 65 20 69 66 20 74 68 69 73 20 69 73 20 74 68 65 20 66 69 72 73 74 20 61 6c 6c 6f 63 61 74 69 ne.if.this.is.the.first.allocati
13e0 6f 6e 20 6f 66 20 74 68 65 20 62 75 66 66 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 on.of.the.buffers...........priv
1400 61 74 65 20 69 6e 74 20 6d 5f 6d 61 78 5f 63 68 61 72 61 63 74 65 72 73 20 3d 20 38 3b 20 2f 2f ate.int.m_max_characters.=.8;.//
1420 20 44 65 74 65 72 6d 69 6e 65 73 20 74 68 65 20 69 6e 69 74 69 61 6c 20 61 6c 6c 6f 63 61 74 69 .Determines.the.initial.allocati
1440 6f 6e 20 61 6e 64 20 73 69 7a 65 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 61 72 72 on.and.size.of.the.character.arr
1460 61 79 20 2f 20 62 75 66 66 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e ay./.buffer...........private.in
1480 74 20 6d 5f 6d 61 78 5f 6e 75 6d 62 65 72 4f 66 4c 69 6e 65 73 20 3d 20 34 3b 20 2f 2f 20 44 65 t.m_max_numberOfLines.=.4;.//.De
14a0 74 65 72 6d 69 6e 65 73 20 74 68 65 20 69 6e 69 74 69 61 6c 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 termines.the.initial.allocation.
14c0 61 6e 64 20 6d 61 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 6f 66 20 6c 69 6e 65 73 20 6f 66 20 74 and.maximum.number.of.lines.of.t
14e0 65 78 74 2e 20 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 ext..............[SerializeField
1500 5d 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 54 4d 50 5f 53 75 62 4d 65 73 68 ]..........protected.TMP_SubMesh
1520 5b 5d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 20 3d 20 6e 65 77 20 54 4d 50 5f 53 75 [].m_subTextObjects.=.new.TMP_Su
1540 62 4d 65 73 68 5b 38 5d 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4d 41 53 4b 49 4e bMesh[8];..............//.MASKIN
1560 47 20 52 45 4c 41 54 45 44 20 50 52 4f 50 45 52 54 49 45 53 0d 0a 0d 0a 20 20 20 20 20 20 20 20 G.RELATED.PROPERTIES............
1580 2f 2f 4d 61 74 65 72 69 61 6c 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 20 6d 5f 6d 61 73 6b 69 6e //MaterialPropertyBlock.m_maskin
15a0 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 5b 53 65 72 69 gPropertyBlock;..........//[Seri
15c0 61 6c 69 7a 65 46 69 65 6c 64 5d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f alizeField]..........private.boo
15e0 6c 20 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 70 l.m_isMaskingEnabled;..........p
1600 72 69 76 61 74 65 20 62 6f 6f 6c 20 69 73 4d 61 73 6b 55 70 64 61 74 65 52 65 71 75 69 72 65 64 rivate.bool.isMaskUpdateRequired
1620 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 69 73 4d 61 ;..........//private.bool.m_isMa
1640 74 65 72 69 61 6c 42 6c 6f 63 6b 53 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 terialBlockSet;............[Seri
1660 61 6c 69 7a 65 46 69 65 6c 64 5d 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4d 61 73 alizeField]..........private.Mas
1680 6b 69 6e 67 54 79 70 65 73 20 6d 5f 6d 61 73 6b 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 kingTypes.m_maskType;...........
16a0 20 2f 2f 20 4d 61 74 72 69 78 20 75 73 65 64 20 74 6f 20 61 6e 69 6d 61 74 65 64 20 45 6e 76 20 .//.Matrix.used.to.animated.Env.
16c0 4d 61 70 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 4d 61 74 72 69 78 34 78 34 20 6d Map..........private.Matrix4x4.m
16e0 5f 45 6e 76 4d 61 70 4d 61 74 72 69 78 20 3d 20 6e 65 77 20 4d 61 74 72 69 78 34 78 34 28 29 3b _EnvMapMatrix.=.new.Matrix4x4();
1700 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 65 78 74 20 43 6f 6e 74 61 69 6e 65 72 20 ..............//.Text.Container.
1720 2f 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 43 6f 6d 70 6f 6e 65 6e 74 0d 0a 20 20 20 20 20 /.RectTransform.Component.......
1740 20 20 20 70 72 69 76 61 74 65 20 56 65 63 74 6f 72 33 5b 5d 20 6d 5f 52 65 63 74 54 72 61 6e 73 ...private.Vector3[].m_RectTrans
1760 66 6f 72 6d 43 6f 72 6e 65 72 73 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 5b 34 5d 3b 0d 0a 0d formCorners.=.new.Vector3[4];...
1780 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 0d 0a 20 20 20 20 20 20 .........[NonSerialized]........
17a0 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 69 73 52 65 67 69 73 74 65 72 65 64 46 6f 72 ..private.bool.m_isRegisteredFor
17c0 45 76 65 6e 74 73 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 44 45 42 55 47 20 56 61 Events;..............//.DEBUG.Va
17e0 72 69 61 62 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 53 79 73 74 65 riables..........//private.Syste
1800 6d 2e 44 69 61 67 6e 6f 73 74 69 63 73 2e 53 74 6f 70 77 61 74 63 68 20 6d 5f 53 74 6f 70 57 61 m.Diagnostics.Stopwatch.m_StopWa
1820 74 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 69 73 44 tch;..........//private.bool.isD
1840 65 62 75 67 4f 75 74 70 75 74 44 6f 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 ebugOutputDone;..........//priva
1860 74 65 20 69 6e 74 20 6d 5f 72 65 63 75 72 73 69 76 65 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 te.int.m_recursiveCount.=.0;....
1880 20 20 20 20 20 20 70 72 69 76 61 74 65 20 69 6e 74 20 6c 6f 6f 70 43 6f 75 6e 74 41 3b 0d 0a 20 ......private.int.loopCountA;...
18a0 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 69 6e 74 20 6c 6f 6f 70 43 6f 75 6e 74 42 3b .......//private.int.loopCountB;
18c0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 69 6e 74 20 6c 6f 6f 70 43 6f 75 6e ..........//private.int.loopCoun
18e0 74 43 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 69 6e 74 20 6c 6f 6f 70 43 tC;..........//private.int.loopC
1900 6f 75 6e 74 44 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 70 72 69 76 61 74 65 20 69 6e 74 20 6c 6f ountD;..........//private.int.lo
1920 6f 70 43 6f 75 6e 74 45 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 opCountE;..............protected
1940 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 41 77 61 6b 65 28 29 0d 0a 20 20 20 20 20 20 20 20 .override.void.Awake()..........
1960 7b 0d 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 22 2a 2a 2a 2a {..............//Debug.Log("****
1980 2a 20 41 77 61 6b 65 28 29 20 63 61 6c 6c 65 64 20 6f 6e 20 6f 62 6a 65 63 74 20 49 44 20 22 20 *.Awake().called.on.object.ID.".
19a0 2b 20 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 2b 20 22 2e 20 2a 2a 2a 2a 2a 22 29 3b 0d +.GetInstanceID().+."..*****");.
19c0 0a 0d 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 52 0d ...............#if.UNITY_EDITOR.
19e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 70 65 63 69 61 6c 20 68 61 6e 64 6c 69 6e 67 .............//.Special.handling
1a00 20 66 6f 72 20 54 4d 50 20 53 65 74 74 69 6e 67 73 20 61 6e 64 20 69 6d 70 6f 72 74 69 6e 67 20 .for.TMP.Settings.and.importing.
1a20 45 73 73 65 6e 74 69 61 6c 20 52 65 73 6f 75 72 63 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Essential.Resources.............
1a40 20 69 66 20 28 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 69 6e 73 74 61 6e 63 65 20 3d 3d 20 6e 75 .if.(TMP_Settings.instance.==.nu
1a60 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ll)..............{..............
1a80 20 20 20 20 69 66 20 28 6d 5f 69 73 57 61 69 74 69 6e 67 4f 6e 52 65 73 6f 75 72 63 65 4c 6f 61 ....if.(m_isWaitingOnResourceLoa
1aa0 64 20 3d 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 d.==.false).....................
1ac0 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 52 45 53 4f 55 52 43 45 5f 4c 4f 41 .TMPro_EventManager.RESOURCE_LOA
1ae0 44 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 52 45 53 4f 55 52 43 45 53 5f 4c 4f 41 44 45 44 29 D_EVENT.Add(ON_RESOURCES_LOADED)
1b00 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 57 61 69 74 69 6e 67 ;....................m_isWaiting
1b20 4f 6e 52 65 73 6f 75 72 63 65 4c 6f 61 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 OnResourceLoad.=.true;..........
1b40 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ........return;..............}..
1b60 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ............#endif..............
1b80 20 20 2f 2f 20 43 61 63 68 65 20 52 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 4d 65 73 68 ..//.Cache.Reference.to.the.Mesh
1ba0 20 52 65 6e 64 65 72 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 .Renderer...............m_render
1bc0 65 72 20 3d 20 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 6e 64 65 72 65 72 3e 28 29 3b 0d 0a er.=.GetComponent<Renderer>();..
1be0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 72 65 6e 64 65 72 65 72 20 3d 3d 20 6e 75 ............if.(m_renderer.==.nu
1c00 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 20 ll)..................m_renderer.
1c20 3d 20 67 61 6d 65 4f 62 6a 65 63 74 2e 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 6e 64 65 72 =.gameObject.AddComponent<Render
1c40 65 72 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 er>();................//.Make.su
1c60 72 65 20 77 65 20 68 61 76 65 20 61 20 43 61 6e 76 61 73 52 65 6e 64 65 72 65 72 20 66 6f 72 20 re.we.have.a.CanvasRenderer.for.
1c80 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 72 65 61 73 6f 6e 73 20 61 6e 64 20 68 69 64 65 20 69 compatibility.reasons.and.hide.i
1ca0 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 68 69 73 2e 63 61 6e 76 61 73 52 65 t..............if.(this.canvasRe
1cc0 6e 64 65 72 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nderer.!=.null).................
1ce0 20 74 68 69 73 2e 63 61 6e 76 61 73 52 65 6e 64 65 72 65 72 2e 68 69 64 65 46 6c 61 67 73 20 3d .this.canvasRenderer.hideFlags.=
1d00 20 48 69 64 65 46 6c 61 67 73 2e 48 69 64 65 49 6e 49 6e 73 70 65 63 74 6f 72 3b 0d 0a 20 20 20 .HideFlags.HideInInspector;.....
1d20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 .........else..............{....
1d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 61 6e 76 61 73 52 65 6e 64 65 72 65 72 20 63 61 6e ..............CanvasRenderer.can
1d60 76 61 73 52 65 6e 64 65 72 65 72 20 3d 20 67 61 6d 65 4f 62 6a 65 63 74 2e 41 64 64 43 6f 6d 70 vasRenderer.=.gameObject.AddComp
1d80 6f 6e 65 6e 74 3c 43 61 6e 76 61 73 52 65 6e 64 65 72 65 72 3e 28 29 3b 0d 0a 20 20 20 20 20 20 onent<CanvasRenderer>();........
1da0 20 20 20 20 20 20 20 20 20 20 63 61 6e 76 61 73 52 65 6e 64 65 72 65 72 2e 68 69 64 65 46 6c 61 ..........canvasRenderer.hideFla
1dc0 67 73 20 3d 20 48 69 64 65 46 6c 61 67 73 2e 48 69 64 65 49 6e 49 6e 73 70 65 63 74 6f 72 3b 0d gs.=.HideFlags.HideInInspector;.
1de0 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .............}................//
1e00 20 43 61 63 68 65 20 52 65 66 65 72 65 6e 63 65 20 74 6f 20 52 65 63 74 54 72 61 6e 73 66 6f 72 .Cache.Reference.to.RectTransfor
1e20 6d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 3d m..............m_rectTransform.=
1e40 20 74 68 69 73 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .this.rectTransform;............
1e60 20 20 20 20 2f 2f 20 43 61 63 68 65 20 52 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 74 72 ....//.Cache.Reference.to.the.tr
1e80 61 6e 73 66 6f 72 6d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 72 61 6e 73 66 6f 72 ansform;..............m_transfor
1ea0 6d 20 3d 20 74 68 69 73 2e 74 72 61 6e 73 66 6f 72 6d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 m.=.this.transform;.............
1ec0 20 20 20 2f 2f 20 43 61 63 68 65 20 61 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 4d ...//.Cache.a.reference.to.the.M
1ee0 65 73 68 20 46 69 6c 74 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 46 esh.Filter...............m_meshF
1f00 69 6c 74 65 72 20 3d 20 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 4d 65 73 68 46 69 6c 74 65 72 3e ilter.=.GetComponent<MeshFilter>
1f20 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6d 65 73 68 46 69 6c 74 65 ();..............if.(m_meshFilte
1f40 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 r.==.null)..................m_me
1f60 73 68 46 69 6c 74 65 72 20 3d 20 67 61 6d 65 4f 62 6a 65 63 74 2e 41 64 64 43 6f 6d 70 6f 6e 65 shFilter.=.gameObject.AddCompone
1f80 6e 74 3c 4d 65 73 68 46 69 6c 74 65 72 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nt<MeshFilter>();...............
1fa0 20 2f 2f 20 43 72 65 61 74 65 20 6e 65 77 20 4d 65 73 68 20 69 66 20 6e 65 63 65 73 73 61 72 79 .//.Create.new.Mesh.if.necessary
1fc0 20 61 6e 64 20 63 61 63 68 65 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 69 74 2e 0d 0a 20 20 20 .and.cache.reference.to.it......
1fe0 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6d 65 73 68 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 .........if.(m_mesh.==.null)....
2000 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d ..........{..................m_m
2020 65 73 68 20 3d 20 6e 65 77 20 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 esh.=.new.Mesh();...............
2040 20 20 20 6d 5f 6d 65 73 68 2e 68 69 64 65 46 6c 61 67 73 20 3d 20 48 69 64 65 46 6c 61 67 73 2e ...m_mesh.hideFlags.=.HideFlags.
2060 48 69 64 65 41 6e 64 44 6f 6e 74 53 61 76 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 HideAndDontSave;................
2080 20 20 20 20 6d 5f 6d 65 73 68 46 69 6c 74 65 72 2e 6d 65 73 68 20 3d 20 6d 5f 6d 65 73 68 3b 0d ....m_meshFilter.mesh.=.m_mesh;.
20a0 0a 0d 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 65 77 ...................//.Create.new
20c0 20 54 65 78 74 49 6e 66 6f 20 66 6f 72 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 2e 0d 0a .TextInfo.for.the.text.object...
20e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 20 3d 20 6e 65 77 ................m_textInfo.=.new
2100 20 54 4d 50 5f 54 65 78 74 49 6e 66 6f 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .TMP_TextInfo(this);............
2120 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 46 69 6c 74 65 72 2e 68 69 ..}..............m_meshFilter.hi
2140 64 65 46 6c 61 67 73 20 3d 20 48 69 64 65 46 6c 61 67 73 2e 48 69 64 65 49 6e 49 6e 73 70 65 63 deFlags.=.HideFlags.HideInInspec
2160 74 6f 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 61 64 20 54 4d 50 20 tor;................//.Load.TMP.
2180 53 65 74 74 69 6e 67 73 20 66 6f 72 20 6e 65 77 20 74 65 78 74 20 6f 62 6a 65 63 74 20 69 6e 73 Settings.for.new.text.object.ins
21a0 74 61 6e 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4c 6f 61 64 44 65 66 61 75 6c 74 tances...............LoadDefault
21c0 53 65 74 74 69 6e 67 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f Settings();................//.Lo
21e0 61 64 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 61 6e 64 20 61 73 73 69 67 6e 20 6d 61 74 ad.the.font.asset.and.assign.mat
2200 65 72 69 61 6c 20 74 6f 20 72 65 6e 64 65 72 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 erial.to.renderer...............
2220 4c 6f 61 64 46 6f 6e 74 41 73 73 65 74 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 LoadFontAsset();................
2240 2f 2f 20 4c 6f 61 64 20 44 65 66 61 75 6c 74 20 54 4d 50 20 53 74 79 6c 65 53 68 65 65 74 0d 0a //.Load.Default.TMP.StyleSheet..
2260 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 53 74 79 6c 65 53 68 65 65 74 2e 4c 6f 61 64 44 ............TMP_StyleSheet.LoadD
2280 65 66 61 75 6c 74 53 74 79 6c 65 53 68 65 65 74 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 efaultStyleSheet();.............
22a0 20 20 20 2f 2f 20 41 6c 6c 6f 63 61 74 65 20 6f 75 72 20 69 6e 69 74 69 61 6c 20 62 75 66 66 65 ...//.Allocate.our.initial.buffe
22c0 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 50 61 72 73 69 rs...............if.(m_TextParsi
22e0 6e 67 42 75 66 66 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ngBuffer.==.null)...............
2300 20 20 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 20 3d 20 6e 65 77 20 55 6e 69 ...m_TextParsingBuffer.=.new.Uni
2320 63 6f 64 65 43 68 61 72 5b 6d 5f 6d 61 78 5f 63 68 61 72 61 63 74 65 72 73 5d 3b 0d 0a 0d 0a 20 codeChar[m_max_characters];.....
2340 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 20 ...........m_cached_TextElement.
2360 3d 20 6e 65 77 20 54 4d 50 5f 43 68 61 72 61 63 74 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 =.new.TMP_Character();..........
2380 20 20 20 20 6d 5f 69 73 46 69 72 73 74 41 6c 6c 6f 63 61 74 69 6f 6e 20 3d 20 74 72 75 65 3b 0d ....m_isFirstAllocation.=.true;.
23a0 0a 0d 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 77 65 20 68 61 ...............//.Check.if.we.ha
23c0 76 65 20 61 20 66 6f 6e 74 20 61 73 73 65 74 20 61 73 73 69 67 6e 65 64 2e 20 52 65 74 75 72 6e ve.a.font.asset.assigned..Return
23e0 20 69 66 20 77 65 20 64 6f 6e 27 74 20 62 65 63 61 75 73 65 20 6e 6f 20 6f 6e 65 20 6c 69 6b 65 .if.we.don't.because.no.one.like
2400 73 20 74 6f 20 73 65 65 20 70 75 72 70 6c 65 20 73 71 75 61 72 65 73 20 6f 6e 20 73 63 72 65 65 s.to.see.purple.squares.on.scree
2420 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 41 73 73 65 74 20 n...............if.(m_fontAsset.
2440 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ==.null)..............{.........
2460 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 50 6c 65 61 73 .........Debug.LogWarning("Pleas
2480 65 20 61 73 73 69 67 6e 20 61 20 46 6f 6e 74 20 41 73 73 65 74 20 74 6f 20 74 68 69 73 20 22 20 e.assign.a.Font.Asset.to.this.".
24a0 2b 20 74 72 61 6e 73 66 6f 72 6d 2e 6e 61 6d 65 20 2b 20 22 20 67 61 6d 65 6f 62 6a 65 63 74 2e +.transform.name.+.".gameobject.
24c0 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ",.this);..................retur
24e0 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 n;..............}...............
2500 20 2f 2f 20 43 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 53 75 62 20 54 65 78 74 20 .//.Check.to.make.sure.Sub.Text.
2520 4f 62 6a 65 63 74 73 20 61 72 65 20 74 72 61 63 6b 65 64 20 63 6f 72 72 65 63 74 6c 79 20 69 6e Objects.are.tracked.correctly.in
2540 20 74 68 65 20 65 76 65 6e 74 20 61 20 50 72 65 66 61 62 20 69 73 20 75 73 65 64 2e 0d 0a 20 20 .the.event.a.Prefab.is.used.....
2560 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 53 75 62 4d 65 73 68 5b 5d 20 73 75 62 54 65 78 74 4f ..........TMP_SubMesh[].subTextO
2580 62 6a 65 63 74 73 20 3d 20 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 73 49 6e 43 68 69 6c 64 72 65 6e bjects.=.GetComponentsInChildren
25a0 3c 54 4d 50 5f 53 75 62 4d 65 73 68 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 <TMP_SubMesh>();..............if
25c0 20 28 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 68 20 3e 20 30 29 0d 0a 20 20 .(subTextObjects.Length.>.0)....
25e0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 ..........{..................for
2600 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e .(int.i.=.0;.i.<.subTextObjects.
2620 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Length;.i++)....................
2640 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 20 2b 20 31 5d 20 3d 20 73 75 62 54 ..m_subTextObjects[i.+.1].=.subT
2660 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d extObjects[i];..............}...
2680 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 66 6c 61 67 73 20 74 6f 20 65 6e 73 .............//.Set.flags.to.ens
26a0 75 72 65 20 6f 75 72 20 74 65 78 74 20 69 73 20 70 61 72 73 65 64 20 61 6e 64 20 72 65 64 72 61 ure.our.text.is.parsed.and.redra
26c0 77 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 75 74 50 61 72 73 69 6e wn...............m_isInputParsin
26e0 67 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d gRequired.=.true;..............m
2700 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a _havePropertiesChanged.=.true;..
2720 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 43 61 6c 63 75 6c 61 74 65 53 69 7a 65 52 65 71 ............m_isCalculateSizeReq
2740 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 uired.=.true;................m_i
2760 73 41 77 61 6b 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 sAwake.=.true;..........}.......
2780 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f .......protected.override.void.O
27a0 6e 45 6e 61 62 6c 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 nEnable()..........{............
27c0 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 2a 2a 2a 2a 2a 20 4f 6e 45 6e 61 62 6c 65 28 29 20 ..//Debug.Log("*****.OnEnable().
27e0 63 61 6c 6c 65 64 20 6f 6e 20 6f 62 6a 65 63 74 20 49 44 20 22 20 2b 20 47 65 74 49 6e 73 74 61 called.on.object.ID.".+.GetInsta
2800 6e 63 65 49 44 28 29 20 2b 20 22 2e 20 2a 2a 2a 2a 2a 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 nceID().+."..*****");...........
2820 20 20 20 20 20 2f 2f 20 52 65 74 75 72 6e 20 69 66 20 41 77 61 6b 65 28 29 20 68 61 73 20 6e 6f .....//.Return.if.Awake().has.no
2840 74 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 6f 6e 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 t.been.called.on.the.text.object
2860 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 41 77 61 6b 65 20 3d 3d 20 ...............if.(m_isAwake.==.
2880 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d false)..................return;.
28a0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 67 69 73 74 65 72 20 43 61 6c 6c 62 ...............//.Register.Callb
28c0 61 63 6b 73 20 66 6f 72 20 76 61 72 69 6f 75 73 20 65 76 65 6e 74 73 2e 0d 0a 20 20 20 20 20 20 acks.for.various.events.........
28e0 20 20 20 20 20 20 69 66 20 28 21 6d 5f 69 73 52 65 67 69 73 74 65 72 65 64 46 6f 72 45 76 65 6e ......if.(!m_isRegisteredForEven
2900 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ts)..............{..............
2920 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 ....#if.UNITY_EDITOR............
2940 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 4d 41 54 45 52 49 41 ......TMPro_EventManager.MATERIA
2960 4c 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 4d 41 54 45 52 49 41 4c L_PROPERTY_EVENT.Add(ON_MATERIAL
2980 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 _PROPERTY_CHANGED);.............
29a0 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 46 4f 4e 54 5f 50 52 4f .....TMPro_EventManager.FONT_PRO
29c0 50 45 52 54 59 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 46 4f 4e 54 5f 50 52 4f 50 45 52 54 59 PERTY_EVENT.Add(ON_FONT_PROPERTY
29e0 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 _CHANGED);..................TMPr
2a00 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 54 45 58 54 4d 45 53 48 50 52 4f 5f 50 52 4f 50 45 o_EventManager.TEXTMESHPRO_PROPE
2a20 52 54 59 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 54 45 58 54 4d 45 53 48 50 52 4f 5f 50 52 4f RTY_EVENT.Add(ON_TEXTMESHPRO_PRO
2a40 50 45 52 54 59 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 PERTY_CHANGED);.................
2a60 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 44 52 41 47 5f 41 4e 44 5f 44 52 4f .TMPro_EventManager.DRAG_AND_DRO
2a80 50 5f 4d 41 54 45 52 49 41 4c 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 44 52 41 47 5f 41 4e 44 P_MATERIAL_EVENT.Add(ON_DRAG_AND
2aa0 5f 44 52 4f 50 5f 4d 41 54 45 52 49 41 4c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _DROP_MATERIAL);................
2ac0 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 54 45 58 54 5f 53 54 59 4c 45 5f ..TMPro_EventManager.TEXT_STYLE_
2ae0 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 54 45 58 54 5f 53 54 59 4c 45 PROPERTY_EVENT.Add(ON_TEXT_STYLE
2b00 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 _CHANGED);..................TMPr
2b20 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 43 4f 4c 4f 52 5f 47 52 41 44 49 45 4e 54 5f 50 52 o_EventManager.COLOR_GRADIENT_PR
2b40 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 43 4f 4c 4f 52 5f 47 52 41 44 49 45 OPERTY_EVENT.Add(ON_COLOR_GRADIE
2b60 4e 54 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d NT_CHANGED);..................TM
2b80 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 54 4d 50 5f 53 45 54 54 49 4e 47 53 5f 50 52 Pro_EventManager.TMP_SETTINGS_PR
2ba0 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 41 64 64 28 4f 4e 5f 54 4d 50 5f 53 45 54 54 49 4e 47 53 OPERTY_EVENT.Add(ON_TMP_SETTINGS
2bc0 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 _CHANGED);..................#end
2be0 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 52 65 67 69 73 74 65 72 if..................m_isRegister
2c00 65 64 46 6f 72 45 76 65 6e 74 73 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 edForEvents.=.true;.............
2c20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 55 70 64 61 74 65 4d 61 6e 61 .}................TMP_UpdateMana
2c40 67 65 72 2e 52 65 67 69 73 74 65 72 54 65 78 74 4f 62 6a 65 63 74 46 6f 72 55 70 64 61 74 65 28 ger.RegisterTextObjectForUpdate(
2c60 74 68 69 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 73 68 46 69 6c 74 65 72 this);................meshFilter
2c80 2e 73 68 61 72 65 64 4d 65 73 68 20 3d 20 6d 65 73 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .sharedMesh.=.mesh;.............
2ca0 20 53 65 74 41 63 74 69 76 65 53 75 62 4d 65 73 68 65 73 28 74 72 75 65 29 3b 0d 0a 0d 0a 20 20 .SetActiveSubMeshes(true);......
2cc0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 63 68 65 64 75 6c 65 20 70 6f 74 65 6e 74 69 61 6c 20 ..........//.Schedule.potential.
2ce0 74 65 78 74 20 6f 62 6a 65 63 74 20 75 70 64 61 74 65 20 28 69 66 20 61 6e 79 20 6f 66 20 74 68 text.object.update.(if.any.of.th
2d00 65 20 70 72 6f 70 65 72 74 69 65 73 20 68 61 76 65 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 e.properties.have.changed.......
2d20 20 20 20 20 20 20 20 20 43 6f 6d 70 75 74 65 4d 61 72 67 69 6e 53 69 7a 65 28 29 3b 0d 0a 0d 0a ........ComputeMarginSize();....
2d40 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 75 74 50 61 72 73 69 6e 67 52 65 71 75 ............m_isInputParsingRequ
2d60 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 ired.=.true;..............m_have
2d80 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 PropertiesChanged.=.true;.......
2da0 20 20 20 20 20 20 20 6d 5f 76 65 72 74 69 63 65 73 41 6c 72 65 61 64 79 44 69 72 74 79 20 3d 20 .......m_verticesAlreadyDirty.=.
2dc0 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 false;..............SetVerticesD
2de0 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 irty();..........}..............
2e00 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 44 69 73 61 62 6c protected.override.void.OnDisabl
2e20 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 e()..........{..............//De
2e40 62 75 67 2e 4c 6f 67 28 22 2a 2a 2a 2a 2a 20 4f 6e 44 69 73 61 62 6c 65 28 29 20 63 61 6c 6c 65 bug.Log("*****.OnDisable().calle
2e60 64 20 6f 6e 20 6f 62 6a 65 63 74 20 49 44 20 22 20 2b 20 47 65 74 49 6e 73 74 61 6e 63 65 49 44 d.on.object.ID.".+.GetInstanceID
2e80 28 29 20 2b 20 22 2e 20 2a 2a 2a 2a 2a 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ().+."..*****");................
2ea0 2f 2f 20 52 65 74 75 72 6e 20 69 66 20 41 77 61 6b 65 28 29 20 68 61 73 20 6e 6f 74 20 62 65 65 //.Return.if.Awake().has.not.bee
2ec0 6e 20 63 61 6c 6c 65 64 20 6f 6e 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 n.called.on.the.text.object.....
2ee0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 41 77 61 6b 65 20 3d 3d 20 66 61 6c 73 65 ..........if.(m_isAwake.==.false
2f00 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 )..................return;......
2f20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 55 70 64 61 74 65 4d 61 6e 61 67 65 72 2e 55 6e 52 65 ..........TMP_UpdateManager.UnRe
2f40 67 69 73 74 65 72 54 65 78 74 45 6c 65 6d 65 6e 74 46 6f 72 52 65 62 75 69 6c 64 28 74 68 69 73 gisterTextElementForRebuild(this
2f60 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 55 70 64 61 74 65 4d 61 6e 61 67 65 );..............TMP_UpdateManage
2f80 72 2e 55 6e 52 65 67 69 73 74 65 72 54 65 78 74 4f 62 6a 65 63 74 46 6f 72 55 70 64 61 74 65 28 r.UnRegisterTextObjectForUpdate(
2fa0 74 68 69 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 46 69 6c 74 this);................m_meshFilt
2fc0 65 72 2e 73 68 61 72 65 64 4d 65 73 68 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 er.sharedMesh.=.null;...........
2fe0 20 20 20 53 65 74 41 63 74 69 76 65 53 75 62 4d 65 73 68 65 73 28 66 61 6c 73 65 29 3b 0d 0a 20 ...SetActiveSubMeshes(false);...
3000 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 .......}..............protected.
3020 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 44 65 73 74 72 6f 79 28 29 0d 0a 20 20 20 20 20 override.void.OnDestroy().......
3040 20 20 20 7b 0d 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 22 2a ...{..............//Debug.Log("*
3060 2a 2a 2a 2a 20 4f 6e 44 65 73 74 72 6f 79 28 29 20 63 61 6c 6c 65 64 20 6f 6e 20 6f 62 6a 65 63 ****.OnDestroy().called.on.objec
3080 74 20 49 44 20 22 20 2b 20 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 2b 20 22 2e 20 2a 2a t.ID.".+.GetInstanceID().+."..**
30a0 2a 2a 2a 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 73 74 72 6f 79 ***");................//.Destroy
30c0 20 74 68 65 20 6d 65 73 68 20 69 66 20 77 65 20 68 61 76 65 20 6f 6e 65 2e 0d 0a 20 20 20 20 20 .the.mesh.if.we.have.one........
30e0 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6d 65 73 68 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 .......if.(m_mesh.!=.null)......
3100 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 73 74 72 ........{..................Destr
3120 6f 79 49 6d 6d 65 64 69 61 74 65 28 6d 5f 6d 65 73 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 oyImmediate(m_mesh);............
3140 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 6e 72 65 67 69 73 74 65 72 ..}................//.Unregister
3160 20 74 68 65 20 65 76 65 6e 74 20 74 68 69 73 20 6f 62 6a 65 63 74 20 77 61 73 20 6c 69 73 74 65 .the.event.this.object.was.liste
3180 6e 69 6e 67 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 ning.to..............#if.UNITY_E
31a0 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 DITOR..............TMPro_EventMa
31c0 6e 61 67 65 72 2e 4d 41 54 45 52 49 41 4c 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 52 65 nager.MATERIAL_PROPERTY_EVENT.Re
31e0 6d 6f 76 65 28 4f 4e 5f 4d 41 54 45 52 49 41 4c 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 move(ON_MATERIAL_PROPERTY_CHANGE
3200 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 D);..............TMPro_EventMana
3220 67 65 72 2e 46 4f 4e 54 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f ger.FONT_PROPERTY_EVENT.Remove(O
3240 4e 5f 46 4f 4e 54 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 N_FONT_PROPERTY_CHANGED);.......
3260 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 54 45 58 54 4d 45 .......TMPro_EventManager.TEXTME
3280 53 48 50 52 4f 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f 4e 5f 54 SHPRO_PROPERTY_EVENT.Remove(ON_T
32a0 45 58 54 4d 45 53 48 50 52 4f 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 EXTMESHPRO_PROPERTY_CHANGED);...
32c0 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 44 52 ...........TMPro_EventManager.DR
32e0 41 47 5f 41 4e 44 5f 44 52 4f 50 5f 4d 41 54 45 52 49 41 4c 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 AG_AND_DROP_MATERIAL_EVENT.Remov
3300 65 28 4f 4e 5f 44 52 41 47 5f 41 4e 44 5f 44 52 4f 50 5f 4d 41 54 45 52 49 41 4c 29 3b 0d 0a 20 e(ON_DRAG_AND_DROP_MATERIAL);...
3320 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 54 45 ...........TMPro_EventManager.TE
3340 58 54 5f 53 54 59 4c 45 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f XT_STYLE_PROPERTY_EVENT.Remove(O
3360 4e 5f 54 45 58 54 5f 53 54 59 4c 45 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 N_TEXT_STYLE_CHANGED);..........
3380 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 43 4f 4c 4f 52 5f 47 52 41 ....TMPro_EventManager.COLOR_GRA
33a0 44 49 45 4e 54 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f 4e 5f 43 DIENT_PROPERTY_EVENT.Remove(ON_C
33c0 4f 4c 4f 52 5f 47 52 41 44 49 45 4e 54 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 OLOR_GRADIENT_CHANGED);.........
33e0 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 54 4d 50 5f 53 45 54 54 .....TMPro_EventManager.TMP_SETT
3400 49 4e 47 53 5f 50 52 4f 50 45 52 54 59 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f 4e 5f 54 4d INGS_PROPERTY_EVENT.Remove(ON_TM
3420 50 5f 53 45 54 54 49 4e 47 53 5f 43 48 41 4e 47 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 P_SETTINGS_CHANGED);............
3440 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 52 45 53 4f 55 52 43 45 5f 4c 4f ..TMPro_EventManager.RESOURCE_LO
3460 41 44 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f 4e 5f 52 45 53 4f 55 52 43 45 53 5f 4c 4f 41 AD_EVENT.Remove(ON_RESOURCES_LOA
3480 44 45 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 DED);..............#endif.......
34a0 20 20 20 20 20 20 20 20 20 6d 5f 69 73 52 65 67 69 73 74 65 72 65 64 46 6f 72 45 76 65 6e 74 73 .........m_isRegisteredForEvents
34c0 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 55 70 64 61 74 .=.false;..............TMP_Updat
34e0 65 4d 61 6e 61 67 65 72 2e 55 6e 52 65 67 69 73 74 65 72 54 65 78 74 45 6c 65 6d 65 6e 74 46 6f eManager.UnRegisterTextElementFo
3500 72 52 65 62 75 69 6c 64 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 rRebuild(this);..............TMP
3520 5f 55 70 64 61 74 65 4d 61 6e 61 67 65 72 2e 55 6e 52 65 67 69 73 74 65 72 54 65 78 74 4f 62 6a _UpdateManager.UnRegisterTextObj
3540 65 63 74 46 6f 72 55 70 64 61 74 65 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ectForUpdate(this);..........}..
3560 0d 0a 0d 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 0d 0a 20 20 ............#if.UNITY_EDITOR....
3580 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 52 65 ......protected.override.void.Re
35a0 73 65 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f set()..........{..............//
35c0 44 65 62 75 67 2e 4c 6f 67 28 22 52 65 73 65 74 28 29 20 68 61 73 20 62 65 65 6e 20 63 61 6c 6c Debug.Log("Reset().has.been.call
35e0 65 64 2e 22 20 2b 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 29 3b 0d 0a 20 20 20 20 20 ed.".+.m_subTextObjects);.......
3600 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 74 75 72 6e 20 69 .....................//.Return.i
3620 66 20 41 77 61 6b 65 28 29 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 6f 6e f.Awake().has.not.been.called.on
3640 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 .the.text.object...............i
3660 66 20 28 6d 5f 69 73 41 77 61 6b 65 20 3d 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 f.(m_isAwake.==.false)..........
3680 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 ........return;................i
36a0 66 20 28 6d 5f 6d 65 73 68 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 f.(m_mesh.!=.null)..............
36c0 20 20 20 20 44 65 73 74 72 6f 79 49 6d 6d 65 64 69 61 74 65 28 6d 5f 6d 65 73 68 29 3b 0d 0a 0d ....DestroyImmediate(m_mesh);...
36e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 77 61 6b 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d .............Awake();..........}
3700 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 ..............protected.override
3720 20 76 6f 69 64 20 4f 6e 56 61 6c 69 64 61 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 .void.OnValidate()..........{...
3740 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 2a 2a 2a 20 54 65 78 74 ...........//Debug.Log("***.Text
3760 4d 65 73 68 50 72 6f 20 4f 6e 56 61 6c 69 64 61 74 65 28 29 20 68 61 73 20 62 65 65 6e 20 63 61 MeshPro.OnValidate().has.been.ca
3780 6c 6c 65 64 20 6f 6e 20 4f 62 6a 65 63 74 20 49 44 3a 22 20 2b 20 67 61 6d 65 4f 62 6a 65 63 74 lled.on.Object.ID:".+.gameObject
37a0 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .GetInstanceID());..............
37c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 74 75 72 6e 20 69 66 20 41 77 61 6b 65 ..............//.Return.if.Awake
37e0 28 29 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 63 61 6c 6c 65 64 20 6f 6e 20 74 68 65 20 74 65 ().has.not.been.called.on.the.te
3800 78 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 xt.object...............if.(m_is
3820 41 77 61 6b 65 20 3d 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Awake.==.false).................
3840 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 69 74 .return;................//.Addit
3860 69 6f 6e 61 6c 20 50 72 6f 70 65 72 74 69 65 73 20 63 6f 75 6c 64 20 62 65 20 61 64 64 65 64 20 ional.Properties.could.be.added.
3880 74 6f 20 73 79 6e 63 20 75 70 20 53 65 72 69 61 6c 69 7a 65 64 20 50 72 6f 70 65 72 74 69 65 73 to.sync.up.Serialized.Properties
38a0 20 26 20 50 72 6f 70 65 72 74 69 65 73 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .&.Properties.................//
38c0 20 48 61 6e 64 6c 65 20 46 6f 6e 74 20 41 73 73 65 74 20 63 68 61 6e 67 65 73 20 69 6e 20 74 68 .Handle.Font.Asset.changes.in.th
38e0 65 20 69 6e 73 70 65 63 74 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 e.inspector..............if.(m_f
3900 6f 6e 74 41 73 73 65 74 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 68 61 73 46 6f 6e 74 41 73 73 ontAsset.==.null.||.m_hasFontAss
3920 65 74 43 68 61 6e 67 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 etChanged)..............{.......
3940 20 20 20 20 20 20 20 20 20 20 20 4c 6f 61 64 46 6f 6e 74 41 73 73 65 74 28 29 3b 0d 0a 20 20 20 ...........LoadFontAsset();.....
3960 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 43 61 6c 63 75 6c 61 74 65 53 69 7a 65 52 65 .............m_isCalculateSizeRe
3980 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 quired.=.true;..................
39a0 6d 5f 68 61 73 46 6f 6e 74 41 73 73 65 74 43 68 61 6e 67 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a m_hasFontAssetChanged.=.false;..
39c0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 ............}................m_p
39e0 61 64 64 69 6e 67 20 3d 20 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 adding.=.GetPaddingForMaterial()
3a00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6d 70 75 74 65 4d 61 72 67 69 6e 53 69 7a 65 ;..............ComputeMarginSize
3a20 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 75 74 50 61 72 73 ();................m_isInputPars
3a40 69 6e 67 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ingRequired.=.true;.............
3a60 20 6d 5f 69 6e 70 75 74 53 6f 75 72 63 65 20 3d 20 54 65 78 74 49 6e 70 75 74 53 6f 75 72 63 65 .m_inputSource.=.TextInputSource
3a80 73 2e 54 65 78 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 s.Text;..............m_havePrope
3aa0 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 rtiesChanged.=.true;............
3ac0 20 20 6d 5f 69 73 43 61 6c 63 75 6c 61 74 65 53 69 7a 65 52 65 71 75 69 72 65 64 20 3d 20 74 72 ..m_isCalculateSizeRequired.=.tr
3ae0 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 50 72 65 66 65 72 72 65 64 57 69 ue;..............m_isPreferredWi
3b00 64 74 68 44 69 72 74 79 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f dthDirty.=.true;..............m_
3b20 69 73 50 72 65 66 65 72 72 65 64 48 65 69 67 68 74 44 69 72 74 79 20 3d 20 74 72 75 65 3b 0d 0a isPreferredHeightDirty.=.true;..
3b40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 41 6c 6c 44 69 72 74 79 28 29 3b 0d 0a 20 20 ..............SetAllDirty();....
3b60 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 72 65 ......}..............//.Event.re
3b80 63 65 69 76 65 64 20 77 68 65 6e 20 54 4d 50 20 72 65 73 6f 75 72 63 65 73 20 68 61 76 65 20 62 ceived.when.TMP.resources.have.b
3ba0 65 65 6e 20 6c 6f 61 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 4f 4e 5f 52 45 53 een.loaded...........void.ON_RES
3bc0 4f 55 52 43 45 53 5f 4c 4f 41 44 45 44 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 OURCES_LOADED()..........{......
3be0 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e 52 45 53 4f 55 ........TMPro_EventManager.RESOU
3c00 52 43 45 5f 4c 4f 41 44 5f 45 56 45 4e 54 2e 52 65 6d 6f 76 65 28 4f 4e 5f 52 45 53 4f 55 52 43 RCE_LOAD_EVENT.Remove(ON_RESOURC
3c20 45 53 5f 4c 4f 41 44 45 44 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 ES_LOADED);................if.(t
3c40 68 69 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 his.==.null)..................re
3c60 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 77 61 6b 65 28 29 3b 0d 0a 20 turn;................Awake();...
3c80 20 20 20 20 20 20 20 20 20 20 20 4f 6e 45 6e 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 ...........OnEnable();..........
3ca0 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 72 65 63 65 69 76 65 64 }..............//.Event.received
3cc0 20 77 68 65 6e 20 63 75 73 74 6f 6d 20 6d 61 74 65 72 69 61 6c 20 65 64 69 74 6f 72 20 70 72 6f .when.custom.material.editor.pro
3ce0 70 65 72 74 69 65 73 20 61 72 65 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 76 6f perties.are.changed...........vo
3d00 69 64 20 4f 4e 5f 4d 41 54 45 52 49 41 4c 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 28 id.ON_MATERIAL_PROPERTY_CHANGED(
3d20 62 6f 6f 6c 20 69 73 43 68 61 6e 67 65 64 2c 20 4d 61 74 65 72 69 61 6c 20 6d 61 74 29 0d 0a 20 bool.isChanged,.Material.mat)...
3d40 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f .......{..............//Debug.Lo
3d60 67 28 22 4f 4e 5f 4d 41 54 45 52 49 41 4c 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 20 g("ON_MATERIAL_PROPERTY_CHANGED.
3d80 65 76 65 6e 74 20 72 65 63 65 69 76 65 64 2e 20 54 61 72 67 65 74 65 64 20 4d 61 74 65 72 69 61 event.received..Targeted.Materia
3da0 6c 20 69 73 3a 20 22 20 2b 20 6d 61 74 2e 6e 61 6d 65 20 2b 20 22 20 20 6d 5f 73 68 61 72 65 64 l.is:.".+.mat.name.+."..m_shared
3dc0 4d 61 74 65 72 69 61 6c 3a 20 22 20 2b 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 6e Material:.".+.m_sharedMaterial.n
3de0 61 6d 65 20 2b 20 22 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 ame.+."..m_renderer.sharedMateri
3e00 61 6c 3a 20 22 20 2b 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 al:.".+.m_renderer.sharedMateria
3e20 6c 29 3b 20 20 20 20 20 20 20 20 20 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 l);.........................if.(
3e40 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c m_renderer.sharedMaterial.==.nul
3e60 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 l)..............{...............
3e80 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 41 73 73 65 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ...if.(m_fontAsset.!=.null).....
3ea0 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
3ec0 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 ....m_renderer.sharedMaterial.=.
3ee0 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 m_fontAsset.material;...........
3f00 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 4e 6f 20 ...........Debug.LogWarning("No.
3f20 4d 61 74 65 72 69 61 6c 20 77 61 73 20 61 73 73 69 67 6e 65 64 20 74 6f 20 22 20 2b 20 6e 61 6d Material.was.assigned.to.".+.nam
3f40 65 20 2b 20 22 2e 20 22 20 2b 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 2e e.+."..".+.m_fontAsset.material.
3f60 6e 61 6d 65 20 2b 20 22 20 77 61 73 20 61 73 73 69 67 6e 65 64 2e 22 2c 20 74 68 69 73 29 3b 0d name.+.".was.assigned.",.this);.
3f80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
3fa0 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 ....else......................De
3fc0 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 4e 6f 20 46 6f 6e 74 20 41 73 73 65 74 20 61 73 bug.LogWarning("No.Font.Asset.as
3fe0 73 69 67 6e 65 64 20 74 6f 20 22 20 2b 20 6e 61 6d 65 20 2b 20 22 2e 20 50 6c 65 61 73 65 20 61 signed.to.".+.name.+."..Please.a
4000 73 73 69 67 6e 20 61 20 46 6f 6e 74 20 41 73 73 65 74 2e 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 ssign.a.Font.Asset.",.this);....
4020 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d ..........}................if.(m
4040 5f 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 54 65 78 74 75 72 65 20 21 3d 20 6e 75 6c 6c 20 _fontAsset.atlasTexture.!=.null.
4060 26 26 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 54 65 78 74 75 72 65 2e 47 65 74 49 &&.m_fontAsset.atlasTexture.GetI
4080 6e 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 nstanceID().!=.m_renderer.shared
40a0 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 65 72 55 74 69 6c 69 74 Material.GetTexture(ShaderUtilit
40c0 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 29 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 ies.ID_MainTex).GetInstanceID())
40e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
4100 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 73 .m_renderer.sharedMaterial.=.m_s
4120 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 haredMaterial;..................
4140 2f 2f 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f //m_renderer.sharedMaterial.=.m_
4160 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 fontAsset.material;.............
4180 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 46 6f 6e 74 20 41 73 73 65 .....Debug.LogWarning("Font.Asse
41a0 74 20 41 74 6c 61 73 20 64 6f 65 73 6e 27 74 20 6d 61 74 63 68 20 74 68 65 20 41 74 6c 61 73 20 t.Atlas.doesn't.match.the.Atlas.
41c0 69 6e 20 74 68 65 20 6e 65 77 6c 79 20 61 73 73 69 67 6e 65 64 20 6d 61 74 65 72 69 61 6c 2e 20 in.the.newly.assigned.material..
41e0 53 65 6c 65 63 74 20 61 20 6d 61 74 63 68 69 6e 67 20 6d 61 74 65 72 69 61 6c 20 6f 72 20 61 20 Select.a.matching.material.or.a.
4200 64 69 66 66 65 72 65 6e 74 20 66 6f 6e 74 20 61 73 73 65 74 2e 22 2c 20 74 68 69 73 29 3b 0d 0a different.font.asset.",.this);..
4220 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ............}................if.
4240 28 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 21 3d 20 6d 5f (m_renderer.sharedMaterial.!=.m_
4260 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 20 2f 2f 20 20 20 20 7c 7c 20 6d 5f 72 65 6e 64 65 sharedMaterial).//....||.m_rende
4280 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 2e 43 6f 6e 74 61 69 6e 73 28 6d 61 74 rer.sharedMaterials.Contains(mat
42a0 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ))..............{...............
42c0 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 4f 4e 5f 4d 41 54 45 52 49 41 4c 5f 50 52 4f 50 ...//Debug.Log("ON_MATERIAL_PROP
42e0 45 52 54 59 5f 43 48 41 4e 47 45 44 20 43 61 6c 6c 65 64 20 6f 6e 20 54 61 72 67 65 74 20 49 44 ERTY_CHANGED.Called.on.Target.ID
4300 3a 20 22 20 2b 20 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 2b 20 22 2e 20 50 72 65 76 69 :.".+.GetInstanceID().+."..Previ
4320 6f 75 73 20 4d 61 74 65 72 69 61 6c 3a 22 20 2b 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 ous.Material:".+.m_sharedMateria
4340 6c 20 2b 20 22 20 20 4e 65 77 20 4d 61 74 65 72 69 61 6c 3a 22 20 2b 20 6d 5f 72 65 6e 64 65 72 l.+."..New.Material:".+.m_render
4360 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 3b 20 2f 2f 20 6f 6e 20 4f 62 6a 65 63 74 er.sharedMaterial);.//.on.Object
4380 20 49 44 3a 22 20 2b 20 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 2b 20 22 2e 20 6d 5f 73 .ID:".+.GetInstanceID().+."..m_s
43a0 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3a 20 22 20 2b 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 haredMaterial:.".+.m_sharedMater
43c0 69 61 6c 2e 6e 61 6d 65 20 2b 20 22 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d ial.name.+."..m_renderer.sharedM
43e0 61 74 65 72 69 61 6c 3a 20 22 20 2b 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 aterial:.".+.m_renderer.sharedMa
4400 74 65 72 69 61 6c 2e 6e 61 6d 65 29 3b 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 terial.name);...................
4420 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 72 65 6e ........m_sharedMaterial.=.m_ren
4440 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 derer.sharedMaterial;...........
4460 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 ...}................m_padding.=.
4480 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 3b 0d 0a 20 20 20 20 20 20 GetPaddingForMaterial();........
44a0 20 20 20 20 20 20 2f 2f 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 48 61 73 68 43 6f 64 65 ......//m_sharedMaterialHashCode
44c0 20 3d 20 54 4d 50 5f 54 65 78 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 53 69 6d 70 6c 65 48 61 .=.TMP_TextUtilities.GetSimpleHa
44e0 73 68 43 6f 64 65 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 6e 61 6d 65 29 3b 0d 0a shCode(m_sharedMaterial.name);..
4500 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 4d 61 73 6b 28 29 3b 0d 0a 20 20 20 ..............UpdateMask();.....
4520 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 45 6e 76 4d 61 70 4d 61 74 72 69 78 28 29 3b 0d 0a .........UpdateEnvMapMatrix();..
4540 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e ............m_havePropertiesChan
4560 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 74 ged.=.true;..............SetVert
4580 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 icesDirty();..........}.........
45a0 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 72 65 63 65 69 76 65 64 20 77 68 65 6e 20 66 6f 6e 74 .....//.Event.received.when.font
45c0 20 61 73 73 65 74 20 70 72 6f 70 65 72 74 69 65 73 20 61 72 65 20 63 68 61 6e 67 65 64 20 69 6e .asset.properties.are.changed.in
45e0 20 46 6f 6e 74 20 49 6e 73 70 65 63 74 6f 72 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 4f 4e .Font.Inspector..........void.ON
4600 5f 46 4f 4e 54 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 28 62 6f 6f 6c 20 69 73 43 68 _FONT_PROPERTY_CHANGED(bool.isCh
4620 61 6e 67 65 64 2c 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 20 66 6f 6e 74 29 0d 0a 20 20 20 20 anged,.TMP_FontAsset.font)......
4640 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 4d 61 74 65 72 69 61 6c 52 ....{..............if.(MaterialR
4660 65 66 65 72 65 6e 63 65 2e 43 6f 6e 74 61 69 6e 73 28 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 eference.Contains(m_materialRefe
4680 72 65 6e 63 65 73 2c 20 66 6f 6e 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 rences,.font))..............{...
46a0 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 4f 4e 5f 46 ...............//Debug.Log("ON_F
46c0 4f 4e 54 5f 50 52 4f 50 45 52 54 59 5f 43 48 41 4e 47 45 44 20 65 76 65 6e 74 20 72 65 63 65 69 ONT_PROPERTY_CHANGED.event.recei
46e0 76 65 64 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 ved.");..................m_isInp
4700 75 74 50 61 72 73 69 6e 67 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 utParsingRequired.=.true;.......
4720 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 ...........m_havePropertiesChang
4740 65 64 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 70 ed.=.true;....................Up
4760 64 61 74 65 4d 65 73 68 50 61 64 64 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 dateMeshPadding();..............
4780 20 20 20 20 20 20 53 65 74 4d 61 74 65 72 69 61 6c 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 ......SetMaterialDirty();.......
47a0 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a ...........SetVerticesDirty();..
47c0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ............}..........}........
47e0 20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 72 65 63 65 69 76 65 64 20 77 68 65 ...........//.Event.received.whe
4800 6e 20 55 4e 44 4f 20 2f 20 52 45 44 4f 20 45 76 65 6e 74 20 61 6c 74 65 72 73 20 74 68 65 20 70 n.UNDO./.REDO.Event.alters.the.p
4820 72 6f 70 65 72 74 69 65 73 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 roperties.of.the.object.........
4840 20 20 76 6f 69 64 20 4f 4e 5f 54 45 58 54 4d 45 53 48 50 52 4f 5f 50 52 4f 50 45 52 54 59 5f 43 ..void.ON_TEXTMESHPRO_PROPERTY_C
4860 48 41 4e 47 45 44 28 62 6f 6f 6c 20 69 73 43 68 61 6e 67 65 64 2c 20 54 65 78 74 4d 65 73 68 50 HANGED(bool.isChanged,.TextMeshP
4880 72 6f 20 6f 62 6a 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ro.obj)..........{..............
48a0 69 66 20 28 6f 62 6a 20 3d 3d 20 74 68 69 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d if.(obj.==.this)..............{.
48c0 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 55 6e .................//Debug.Log("Un
48e0 64 6f 20 2f 20 52 65 64 6f 20 45 76 65 6e 74 20 52 65 63 65 69 76 65 64 20 62 79 20 4f 62 6a 65 do./.Redo.Event.Received.by.Obje
4900 63 74 20 49 44 3a 22 20 2b 20 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 3b 0d 0a 20 20 20 ct.ID:".+.GetInstanceID());.....
4920 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 .............m_havePropertiesCha
4940 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f nged.=.true;..................m_
4960 69 73 49 6e 70 75 74 50 61 72 73 69 6e 67 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a isInputParsingRequired.=.true;..
4980 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 47 65 ..................m_padding.=.Ge
49a0 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 tPaddingForMaterial();..........
49c0 20 20 20 20 20 20 20 20 43 6f 6d 70 75 74 65 4d 61 72 67 69 6e 53 69 7a 65 28 29 3b 20 2f 2f 20 ........ComputeMarginSize();.//.
49e0 56 65 72 69 66 79 20 74 68 69 73 20 63 68 61 6e 67 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Verify.this.change..............
4a00 20 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 ....SetVerticesDirty();.........
4a20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f .....}..........}............../
4a40 2f 20 45 76 65 6e 74 20 74 6f 20 54 72 61 63 6b 20 4d 61 74 65 72 69 61 6c 20 43 68 61 6e 67 65 /.Event.to.Track.Material.Change
4a60 64 20 72 65 73 75 6c 74 69 6e 67 20 66 72 6f 6d 20 44 72 61 67 2d 6e 2d 64 72 6f 70 2e 0d 0a 20 d.resulting.from.Drag-n-drop....
4a80 20 20 20 20 20 20 20 76 6f 69 64 20 4f 4e 5f 44 52 41 47 5f 41 4e 44 5f 44 52 4f 50 5f 4d 41 54 .......void.ON_DRAG_AND_DROP_MAT
4aa0 45 52 49 41 4c 28 47 61 6d 65 4f 62 6a 65 63 74 20 6f 62 6a 2c 20 4d 61 74 65 72 69 61 6c 20 63 ERIAL(GameObject.obj,.Material.c
4ac0 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2c 20 4d 61 74 65 72 69 61 6c 20 6e 65 77 4d 61 74 65 urrentMaterial,.Material.newMate
4ae0 72 69 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f rial)..........{..............//
4b00 44 65 62 75 67 2e 4c 6f 67 28 22 44 72 61 67 2d 6e 2d 44 72 6f 70 20 45 76 65 6e 74 20 2d 20 52 Debug.Log("Drag-n-Drop.Event.-.R
4b20 65 63 65 69 76 69 6e 67 20 4f 62 6a 65 63 74 20 49 44 20 22 20 2b 20 47 65 74 49 6e 73 74 61 6e eceiving.Object.ID.".+.GetInstan
4b40 63 65 49 44 28 29 29 3b 20 2f 2f 20 2b 20 22 2e 20 54 61 72 67 65 74 20 4f 62 6a 65 63 74 20 49 ceID());.//.+."..Target.Object.I
4b60 44 20 22 20 2b 20 6f 62 6a 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 2b 20 22 2e 20 20 D.".+.obj.GetInstanceID().+."...
4b80 4e 65 77 20 4d 61 74 65 72 69 61 6c 20 69 73 20 22 20 2b 20 6d 61 74 2e 6e 61 6d 65 20 2b 20 22 New.Material.is.".+.mat.name.+."
4ba0 20 77 69 74 68 20 49 44 20 22 20 2b 20 6d 61 74 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 .with.ID.".+.mat.GetInstanceID()
4bc0 20 2b 20 22 2e 20 42 61 73 65 20 4d 61 74 65 72 69 61 6c 20 69 73 20 22 20 2b 20 6d 5f 62 61 73 .+."..Base.Material.is.".+.m_bas
4be0 65 4d 61 74 65 72 69 61 6c 2e 6e 61 6d 65 20 2b 20 22 20 77 69 74 68 20 49 44 20 22 20 2b 20 6d eMaterial.name.+.".with.ID.".+.m
4c00 5f 62 61 73 65 4d 61 74 65 72 69 61 6c 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 3b 0d _baseMaterial.GetInstanceID());.
4c20 0a 0d 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 65 76 65 6e 74 ...............//.Check.if.event
4c40 20 61 70 70 6c 69 65 73 20 74 6f 20 74 68 69 73 20 63 75 72 72 65 6e 74 20 6f 62 6a 65 63 74 0d .applies.to.this.current.object.
4c60 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 32 30 31 38 5f 32 5f 4f 52 .............#if.UNITY_2018_2_OR
4c80 5f 4e 45 57 45 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 62 6a 20 3d 3d 20 67 _NEWER..............if.(obj.==.g
4ca0 61 6d 65 4f 62 6a 65 63 74 20 7c 7c 20 55 6e 69 74 79 45 64 69 74 6f 72 2e 50 72 65 66 61 62 55 ameObject.||.UnityEditor.PrefabU
4cc0 74 69 6c 69 74 79 2e 47 65 74 43 6f 72 72 65 73 70 6f 6e 64 69 6e 67 4f 62 6a 65 63 74 46 72 6f tility.GetCorrespondingObjectFro
4ce0 6d 53 6f 75 72 63 65 28 67 61 6d 65 4f 62 6a 65 63 74 29 20 3d 3d 20 6f 62 6a 29 0d 0a 20 20 20 mSource(gameObject).==.obj).....
4d00 20 20 20 20 20 20 20 20 20 23 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 .........#else..............if.(
4d20 6f 62 6a 20 3d 3d 20 67 61 6d 65 4f 62 6a 65 63 74 20 7c 7c 20 55 6e 69 74 79 45 64 69 74 6f 72 obj.==.gameObject.||.UnityEditor
4d40 2e 50 72 65 66 61 62 55 74 69 6c 69 74 79 2e 47 65 74 50 72 65 66 61 62 50 61 72 65 6e 74 28 67 .PrefabUtility.GetPrefabParent(g
4d60 61 6d 65 4f 62 6a 65 63 74 29 20 3d 3d 20 6f 62 6a 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ameObject).==.obj)..............
4d80 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 #endif..............{...........
4da0 20 20 20 20 20 20 20 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 .......UnityEditor.Undo.RecordOb
4dc0 6a 65 63 74 28 74 68 69 73 2c 20 22 4d 61 74 65 72 69 61 6c 20 41 73 73 69 67 6e 6d 65 6e 74 22 ject(this,."Material.Assignment"
4de0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 69 74 79 45 64 69 74 6f 72 2e );..................UnityEditor.
4e00 55 6e 64 6f 2e 52 65 63 6f 72 64 4f 62 6a 65 63 74 28 6d 5f 72 65 6e 64 65 72 65 72 2c 20 22 4d Undo.RecordObject(m_renderer,."M
4e20 61 74 65 72 69 61 6c 20 41 73 73 69 67 6e 6d 65 6e 74 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 aterial.Assignment");...........
4e40 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6e 65 77 4d .........m_sharedMaterial.=.newM
4e60 61 74 65 72 69 61 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 aterial;....................m_pa
4e80 64 64 69 6e 67 20 3d 20 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 3b dding.=.GetPaddingForMaterial();
4ea0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 ..................m_haveProperti
4ec0 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 esChanged.=.true;...............
4ee0 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 ...SetVerticesDirty();..........
4f00 20 20 20 20 20 20 20 20 53 65 74 4d 61 74 65 72 69 61 6c 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 ........SetMaterialDirty();.....
4f20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 .........}..........}...........
4f40 20 20 20 2f 2f 20 45 76 65 6e 74 20 72 65 63 65 69 76 65 64 20 77 68 65 6e 20 54 65 78 74 20 53 ...//.Event.received.when.Text.S
4f60 74 79 6c 65 73 20 61 72 65 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 tyles.are.changed...........void
4f80 20 4f 4e 5f 54 45 58 54 5f 53 54 59 4c 45 5f 43 48 41 4e 47 45 44 28 62 6f 6f 6c 20 69 73 43 68 .ON_TEXT_STYLE_CHANGED(bool.isCh
4fa0 61 6e 67 65 64 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d anged)..........{..............m
4fc0 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a _havePropertiesChanged.=.true;..
4fe0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 75 74 50 61 72 73 69 6e 67 52 65 71 75 ............m_isInputParsingRequ
5000 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 ired.=.true;..............SetVer
5020 74 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 ticesDirty();..........}........
5040 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ......///.<summary>..........///
5060 20 45 76 65 6e 74 20 72 65 63 65 69 76 65 64 20 77 68 65 6e 20 61 20 43 6f 6c 6f 72 20 47 72 61 .Event.received.when.a.Color.Gra
5080 64 69 65 6e 74 20 50 72 65 73 65 74 20 69 73 20 6d 6f 64 69 66 69 65 64 2e 0d 0a 20 20 20 20 20 dient.Preset.is.modified........
50a0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ...///.</summary>..........///.<
50c0 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 65 78 74 4f 62 6a 65 63 74 22 3e 3c 2f 70 61 72 61 6d 3e param.name="textObject"></param>
50e0 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 4f 4e 5f 43 4f 4c 4f 52 5f 47 52 41 44 49 45 4e 54 ..........void.ON_COLOR_GRADIENT
5100 5f 43 48 41 4e 47 45 44 28 54 4d 50 5f 43 6f 6c 6f 72 47 72 61 64 69 65 6e 74 20 67 72 61 64 69 _CHANGED(TMP_ColorGradient.gradi
5120 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ent)..........{..............if.
5140 28 6d 5f 66 6f 6e 74 43 6f 6c 6f 72 47 72 61 64 69 65 6e 74 50 72 65 73 65 74 20 21 3d 20 6e 75 (m_fontColorGradientPreset.!=.nu
5160 6c 6c 20 26 26 20 67 72 61 64 69 65 6e 74 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 3d ll.&&.gradient.GetInstanceID().=
5180 3d 20 6d 5f 66 6f 6e 74 43 6f 6c 6f 72 47 72 61 64 69 65 6e 74 50 72 65 73 65 74 2e 47 65 74 49 =.m_fontColorGradientPreset.GetI
51a0 6e 73 74 61 6e 63 65 49 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 nstanceID())..............{.....
51c0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 .............m_havePropertiesCha
51e0 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 nged.=.true;..................Se
5200 74 56 65 72 74 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d tVerticesDirty();..............}
5220 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ..........}..............///.<su
5240 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 45 76 65 6e 74 20 72 65 63 65 69 76 mmary>..........///.Event.receiv
5260 65 64 20 77 68 65 6e 20 74 68 65 20 54 4d 50 20 53 65 74 74 69 6e 67 73 20 61 72 65 20 63 68 61 ed.when.the.TMP.Settings.are.cha
5280 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 nged...........///.</summary>...
52a0 20 20 20 20 20 20 20 76 6f 69 64 20 4f 4e 5f 54 4d 50 5f 53 45 54 54 49 4e 47 53 5f 43 48 41 4e .......void.ON_TMP_SETTINGS_CHAN
52c0 47 45 44 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f GED()..........{..............m_
52e0 64 65 66 61 75 6c 74 53 70 72 69 74 65 41 73 73 65 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 defaultSpriteAsset.=.null;......
5300 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 ........m_havePropertiesChanged.
5320 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 75 74 50 61 =.true;..............m_isInputPa
5340 72 73 69 6e 67 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 rsingRequired.=.true;...........
5360 20 20 20 53 65 74 41 6c 6c 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 23 65 ...SetAllDirty();..........}..#e
5380 6e 64 69 66 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 75 6e 63 74 69 6f ndif..................//.Functio
53a0 6e 20 77 68 69 63 68 20 6c 6f 61 64 73 20 65 69 74 68 65 72 20 74 68 65 20 64 65 66 61 75 6c 74 n.which.loads.either.the.default
53c0 20 66 6f 6e 74 20 6f 72 20 61 20 6e 65 77 6c 79 20 61 73 73 69 67 6e 65 64 20 66 6f 6e 74 20 61 .font.or.a.newly.assigned.font.a
53e0 73 73 65 74 2e 20 54 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 61 6c 73 6f 20 61 73 73 69 67 6e 65 sset..This.function.also.assigne
5400 64 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 6d 61 74 65 72 69 61 6c 20 74 6f 20 74 68 d.the.appropriate.material.to.th
5420 65 20 72 65 6e 64 65 72 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f e.renderer...........protected.o
5440 76 65 72 72 69 64 65 20 76 6f 69 64 20 4c 6f 61 64 46 6f 6e 74 41 73 73 65 74 28 29 0d 0a 20 20 verride.void.LoadFontAsset()....
5460 20 20 20 20 20 20 7b 0d 0a 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
5480 28 22 54 65 78 74 4d 65 73 68 50 72 6f 20 4c 6f 61 64 46 6f 6e 74 41 73 73 65 74 28 29 20 68 61 ("TextMeshPro.LoadFontAsset().ha
54a0 73 20 62 65 65 6e 20 63 61 6c 6c 65 64 2e 22 29 3b 20 2f 2f 20 43 75 72 72 65 6e 74 20 46 6f 6e s.been.called.");.//.Current.Fon
54c0 74 20 41 73 73 65 74 20 69 73 20 22 20 2b 20 28 66 6f 6e 74 20 21 3d 20 6e 75 6c 6c 20 3f 20 66 t.Asset.is.".+.(font.!=.null.?.f
54e0 6f 6e 74 2e 6e 61 6d 65 3a 20 22 4e 75 6c 6c 22 29 20 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ont.name:."Null").);............
5500 20 20 20 20 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 47 65 74 53 68 61 64 65 72 50 72 6f ....ShaderUtilities.GetShaderPro
5520 70 65 72 74 79 49 44 73 28 29 3b 20 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 20 26 20 47 65 74 20 pertyIDs();.//.Initialize.&.Get.
5540 73 68 61 64 65 72 20 70 72 6f 70 65 72 74 79 20 49 44 73 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 shader.property.IDs.............
5560 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 41 73 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 ....if.(m_fontAsset.==.null)....
5580 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ..........{..................if.
55a0 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 73 65 74 20 21 (TMP_Settings.defaultFontAsset.!
55c0 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 =.null)......................m_f
55e0 6f 6e 74 41 73 73 65 74 20 3d 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 64 65 66 61 75 6c 74 46 6f ontAsset.=TMP_Settings.defaultFo
5600 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a ntAsset;..................else..
5620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 41 73 73 65 74 20 ....................m_fontAsset.
5640 3d 20 52 65 73 6f 75 72 63 65 73 2e 4c 6f 61 64 3c 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 3e 28 =.Resources.Load<TMP_FontAsset>(
5660 22 46 6f 6e 74 73 20 26 20 4d 61 74 65 72 69 61 6c 73 2f 4c 69 62 65 72 61 74 69 6f 6e 53 61 6e "Fonts.&.Materials/LiberationSan
5680 73 20 53 44 46 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 s.SDF");....................if.(
56a0 6d 5f 66 6f 6e 74 41 73 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 m_fontAsset.==.null)............
56c0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 ......{......................Deb
56e0 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 54 68 65 20 4c 69 62 65 72 61 74 69 6f 6e 53 61 6e ug.LogWarning("The.LiberationSan
5700 73 20 53 44 46 20 46 6f 6e 74 20 41 73 73 65 74 20 77 61 73 20 6e 6f 74 20 66 6f 75 6e 64 2e 20 s.SDF.Font.Asset.was.not.found..
5720 54 68 65 72 65 20 69 73 20 6e 6f 20 46 6f 6e 74 20 41 73 73 65 74 20 61 73 73 69 67 6e 65 64 20 There.is.no.Font.Asset.assigned.
5740 74 6f 20 22 20 2b 20 67 61 6d 65 4f 62 6a 65 63 74 2e 6e 61 6d 65 20 2b 20 22 2e 22 2c 20 74 68 to.".+.gameObject.name.+.".",.th
5760 69 73 29 3b 0d 0a 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 is);......................return
5780 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ;..................}............
57a0 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 63 68 61 72 61 63 74 65 ........if.(m_fontAsset.characte
57c0 72 4c 6f 6f 6b 75 70 54 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 rLookupTable.==.null)...........
57e0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 .......{......................De
5800 62 75 67 2e 4c 6f 67 28 22 44 69 63 74 69 6f 6e 61 72 79 20 69 73 20 4e 75 6c 6c 21 22 29 3b 0d bug.Log("Dictionary.is.Null!");.
5820 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 .................}..............
5840 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 ......m_renderer.sharedMaterial.
5860 3d 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 =.m_fontAsset.material;.........
5880 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 66 6f .........m_sharedMaterial.=.m_fo
58a0 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ntAsset.material;...............
58c0 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 22 5f 43 ...m_sharedMaterial.SetFloat("_C
58e0 75 6c 6c 4d 6f 64 65 22 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d ullMode",.0);..................m
5900 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 _sharedMaterial.SetFloat(ShaderU
5920 74 69 6c 69 74 69 65 73 2e 53 68 61 64 65 72 54 61 67 5f 5a 54 65 73 74 4d 6f 64 65 2c 20 34 29 tilities.ShaderTag_ZTestMode,.4)
5940 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 72 65 ;..................m_renderer.re
5960 63 65 69 76 65 53 68 61 64 6f 77 73 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 ceiveShadows.=.false;...........
5980 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 64 6f 77 43 61 73 74 69 6e 67 4d .......m_renderer.shadowCastingM
59a0 6f 64 65 20 3d 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 52 65 6e 64 65 72 69 6e 67 2e 53 68 61 64 ode.=.UnityEngine.Rendering.Shad
59c0 6f 77 43 61 73 74 69 6e 67 4d 6f 64 65 2e 4f 66 66 3b 20 2f 2f 20 74 72 75 65 3b 0d 0a 20 20 20 owCastingMode.Off;.//.true;.....
59e0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 61 20 52 65 66 65 72 65 6e 63 65 20 .............//.Get.a.Reference.
5a00 74 6f 20 74 68 65 20 53 68 61 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 to.the.Shader..............}....
5a20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 ..........else..............{...
5a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 63 ...............if.(m_fontAsset.c
5a60 68 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 54 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 haracterLookupTable.==.null)....
5a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
5aa0 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 44 .....//Debug.Log("Reading.Font.D
5ac0 65 66 69 6e 69 74 69 6f 6e 20 61 6e 64 20 43 72 65 61 74 69 6e 67 20 43 68 61 72 61 63 74 65 72 efinition.and.Creating.Character
5ae0 20 44 69 63 74 69 6f 6e 61 72 79 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Dictionary.");.................
5b00 20 20 20 20 20 6d 5f 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 .....m_fontAsset.ReadFontAssetDe
5b20 66 69 6e 69 74 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a finition();..................}..
5b40 0d 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 46 ..................//Debug.Log("F
5b60 6f 6e 74 20 41 73 73 65 74 20 6e 61 6d 65 3a 22 20 2b 20 66 6f 6e 74 2e 6d 61 74 65 72 69 61 6c ont.Asset.name:".+.font.material
5b80 2e 6e 61 6d 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 .name);....................//.If
5ba0 20 66 6f 6e 74 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 20 64 6f 65 73 6e 27 74 20 6d 61 74 63 .font.atlas.texture.doesn't.matc
5bc0 68 20 74 68 65 20 61 73 73 69 67 6e 65 64 20 6d 61 74 65 72 69 61 6c 20 66 6f 6e 74 20 61 74 6c h.the.assigned.material.font.atl
5be0 61 73 2c 20 73 77 69 74 63 68 20 62 61 63 6b 20 74 6f 20 64 65 66 61 75 6c 74 20 6d 61 74 65 72 as,.switch.back.to.default.mater
5c00 69 61 6c 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 46 6f 6e 74 20 41 73 73 65 74 2e ial.specified.in.the.Font.Asset.
5c20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 72 65 6e 64 65 72 65 72 ..................if.(m_renderer
5c40 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 72 65 6e .sharedMaterial.==.null.||.m_ren
5c60 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 derer.sharedMaterial.GetTexture(
5c80 53 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 29 20 3d 3d 20 6e ShaderUtilities.ID_MainTex).==.n
5ca0 75 6c 6c 20 7c 7c 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 61 74 6c 61 73 54 65 78 74 75 72 65 2e ull.||.m_fontAsset.atlasTexture.
5cc0 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 GetInstanceID().!=.m_renderer.sh
5ce0 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 65 72 55 74 aredMaterial.GetTexture(ShaderUt
5d00 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 29 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 ilities.ID_MainTex).GetInstanceI
5d20 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 D())..................{.........
5d40 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 .............m_renderer.sharedMa
5d60 74 65 72 69 61 6c 20 3d 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a terial.=.m_fontAsset.material;..
5d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 ....................m_sharedMate
5da0 72 69 61 6c 20 3d 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 20 0d 0a 20 rial.=.m_fontAsset.material;....
5dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
5de0 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ..else..................{.......
5e00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 ...............m_sharedMaterial.
5e20 3d 20 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 =.m_renderer.sharedMaterial;....
5e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
5e60 20 20 20 2f 2f 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 22 ...//m_sharedMaterial.SetFloat("
5e80 5f 43 75 6c 6c 4d 6f 64 65 22 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _CullMode",.0);.................
5ea0 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 .m_sharedMaterial.SetFloat(Shade
5ec0 72 55 74 69 6c 69 74 69 65 73 2e 53 68 61 64 65 72 54 61 67 5f 5a 54 65 73 74 4d 6f 64 65 2c 20 rUtilities.ShaderTag_ZTestMode,.
5ee0 34 29 3b 0d 0a 0d 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 4);....................//.Check.
5f00 69 66 20 77 65 20 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 53 44 46 20 53 75 72 66 61 63 65 20 if.we.are.using.the.SDF.Surface.
5f20 53 68 61 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 68 Shader..................if.(m_sh
5f40 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 70 61 73 73 43 6f 75 6e 74 20 3d 3d 20 31 29 0d 0a 20 20 aredMaterial.passCount.==.1)....
5f60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
5f80 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 72 65 63 65 69 76 65 53 68 61 64 6f 77 73 20 3d .....m_renderer.receiveShadows.=
5fa0 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 .false;......................m_r
5fc0 65 6e 64 65 72 65 72 2e 73 68 61 64 6f 77 43 61 73 74 69 6e 67 4d 6f 64 65 20 3d 20 55 6e 69 74 enderer.shadowCastingMode.=.Unit
5fe0 79 45 6e 67 69 6e 65 2e 52 65 6e 64 65 72 69 6e 67 2e 53 68 61 64 6f 77 43 61 73 74 69 6e 67 4d yEngine.Rendering.ShadowCastingM
6000 6f 64 65 2e 4f 66 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ode.Off;..................}.....
6020 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 ...........}................m_pa
6040 64 64 69 6e 67 20 3d 20 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 3b dding.=.GetPaddingForMaterial();
6060 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 61 6c 69 67 6e 6d 65 6e 74 50 61 64 64 69 ..............//m_alignmentPaddi
6080 6e 67 20 3d 20 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 47 65 74 46 6f 6e 74 45 78 74 65 ng.=.ShaderUtilities.GetFontExte
60a0 6e 74 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 nt(m_sharedMaterial);...........
60c0 20 20 20 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 53 68 61 64 65 72 55 74 ...m_isMaskingEnabled.=.ShaderUt
60e0 69 6c 69 74 69 65 73 2e 49 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 28 6d 5f 73 68 61 72 65 ilities.IsMaskingEnabled(m_share
6100 64 4d 61 74 65 72 69 61 6c 29 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 dMaterial);..................//.
6120 46 69 6e 64 20 61 6e 64 20 63 61 63 68 65 20 55 6e 64 65 72 6c 69 6e 65 20 26 20 45 6c 6c 69 70 Find.and.cache.Underline.&.Ellip
6140 73 69 73 20 63 68 61 72 61 63 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 65 74 sis.characters...............Get
6160 53 70 65 63 69 61 6c 43 68 61 72 61 63 74 65 72 73 28 6d 5f 66 6f 6e 74 41 73 73 65 74 29 3b 0d SpecialCharacters(m_fontAsset);.
6180 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 .................//m_sharedMater
61a0 69 61 6c 73 2e 41 64 64 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 3b 0d 0a 20 20 20 ials.Add(m_sharedMaterial);.....
61c0 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 48 61 73 68 43 .........//m_sharedMaterialHashC
61e0 6f 64 65 20 3d 20 54 4d 50 5f 54 65 78 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 53 69 6d 70 6c ode.=.TMP_TextUtilities.GetSimpl
6200 65 48 61 73 68 43 6f 64 65 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 6e 61 6d 65 29 eHashCode(m_sharedMaterial.name)
6220 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 69 64 65 20 4d 61 74 65 72 69 61 6c 20 ;..............//.Hide.Material.
6240 45 64 69 74 6f 72 20 43 6f 6d 70 6f 6e 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f Editor.Component..............//
6260 6d 5f 72 65 6e 64 65 72 65 72 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 68 69 64 65 46 6c m_renderer.sharedMaterial.hideFl
6280 61 67 73 20 3d 20 48 69 64 65 46 6c 61 67 73 2e 4e 6f 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d ags.=.HideFlags.None;..........}
62a0 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 55 70 64 61 74 65 45 6e 76 4d 61 70 4d ..............void.UpdateEnvMapM
62c0 61 74 72 69 78 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 atrix()..........{..............
62e0 69 66 20 28 21 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 48 61 73 50 72 6f 70 65 72 74 if.(!m_sharedMaterial.HasPropert
6300 79 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 45 6e 76 4d 61 70 29 20 7c 7c 20 y(ShaderUtilities.ID_EnvMap).||.
6320 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 m_sharedMaterial.GetTexture(Shad
6340 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 45 6e 76 4d 61 70 29 20 3d 3d 20 6e 75 6c 6c 29 0d erUtilities.ID_EnvMap).==.null).
6360 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 .................return;........
6380 20 20 20 20 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 45 6e ........//Debug.Log("Updating.En
63a0 76 20 4d 61 74 72 69 78 2e 2e 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 v.Matrix...");..............Vect
63c0 6f 72 33 20 72 6f 74 61 74 69 6f 6e 20 3d 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e or3.rotation.=.m_sharedMaterial.
63e0 47 65 74 56 65 63 74 6f 72 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 45 6e 76 GetVector(ShaderUtilities.ID_Env
6400 4d 61 74 72 69 78 52 6f 74 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f MatrixRotation);..............m_
6420 45 6e 76 4d 61 70 4d 61 74 72 69 78 20 3d 20 4d 61 74 72 69 78 34 78 34 2e 54 52 53 28 56 65 63 EnvMapMatrix.=.Matrix4x4.TRS(Vec
6440 74 6f 72 33 2e 7a 65 72 6f 2c 20 51 75 61 74 65 72 6e 69 6f 6e 2e 45 75 6c 65 72 28 72 6f 74 61 tor3.zero,.Quaternion.Euler(rota
6460 74 69 6f 6e 29 2c 20 56 65 63 74 6f 72 33 2e 6f 6e 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 tion),.Vector3.one);............
6480 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 4d 61 74 72 69 78 28 53 ....m_sharedMaterial.SetMatrix(S
64a0 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 45 6e 76 4d 61 74 72 69 78 2c 20 6d 5f 45 haderUtilities.ID_EnvMatrix,.m_E
64c0 6e 76 4d 61 70 4d 61 74 72 69 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 nvMapMatrix);..........}........
64e0 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 53 65 74 4d 61 73 6b 28 4d ......//..........void.SetMask(M
6500 61 73 6b 69 6e 67 54 79 70 65 73 20 6d 61 73 6b 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 7b askingTypes.maskType)..........{
6520 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 28 6d 61 73 6b 54 79 70 65 29 0d 0a ..............switch(maskType)..
6540 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 ............{..................c
6560 61 73 65 20 4d 61 73 6b 69 6e 67 54 79 70 65 73 2e 4d 61 73 6b 4f 66 66 3a 0d 0a 20 20 20 20 20 ase.MaskingTypes.MaskOff:.......
6580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e ...............m_sharedMaterial.
65a0 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b DisableKeyword(ShaderUtilities.K
65c0 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 53 4f 46 54 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 eyword_MASK_SOFT);..............
65e0 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 ........m_sharedMaterial.Disable
6600 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f Keyword(ShaderUtilities.Keyword_
6620 4d 41 53 4b 5f 48 41 52 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 MASK_HARD);.....................
6640 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 .m_sharedMaterial.DisableKeyword
6660 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 54 45 (ShaderUtilities.Keyword_MASK_TE
6680 58 29 3b 0d 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 0d X);......................break;.
66a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 4d 61 73 6b 69 6e 67 54 79 70 .................case.MaskingTyp
66c0 65 73 2e 4d 61 73 6b 53 6f 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 es.MaskSoft:....................
66e0 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 45 6e 61 62 6c 65 4b 65 79 77 6f 72 64 ..m_sharedMaterial.EnableKeyword
6700 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 53 4f (ShaderUtilities.Keyword_MASK_SO
6720 46 54 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 FT);......................m_shar
6740 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 edMaterial.DisableKeyword(Shader
6760 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 48 41 52 44 29 3b 0d 0a 20 Utilities.Keyword_MASK_HARD);...
6780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 ...................m_sharedMater
67a0 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 ial.DisableKeyword(ShaderUtiliti
67c0 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 54 45 58 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 es.Keyword_MASK_TEX);...........
67e0 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........break;...............
6800 20 20 20 63 61 73 65 20 4d 61 73 6b 69 6e 67 54 79 70 65 73 2e 4d 61 73 6b 48 61 72 64 3a 0d 0a ...case.MaskingTypes.MaskHard:..
6820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 ....................m_sharedMate
6840 72 69 61 6c 2e 45 6e 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 rial.EnableKeyword(ShaderUtiliti
6860 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 48 41 52 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 es.Keyword_MASK_HARD);..........
6880 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 ............m_sharedMaterial.Dis
68a0 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 ableKeyword(ShaderUtilities.Keyw
68c0 6f 72 64 5f 4d 41 53 4b 5f 53 4f 46 54 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ord_MASK_SOFT);.................
68e0 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 .....m_sharedMaterial.DisableKey
6900 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 word(ShaderUtilities.Keyword_MAS
6920 4b 5f 54 45 58 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 K_TEX);......................bre
6940 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 63 61 73 65 20 4d 61 73 6b ak;..................//case.Mask
6960 69 6e 67 54 79 70 65 73 2e 4d 61 73 6b 54 65 78 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ingTypes.MaskTex:...............
6980 20 20 20 2f 2f 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 45 6e 61 62 6c 65 ...//....m_sharedMaterial.Enable
69a0 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f Keyword(ShaderUtilities.Keyword_
69c0 4d 41 53 4b 5f 54 45 58 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 MASK_TEX);..................//..
69e0 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 ..m_sharedMaterial.DisableKeywor
6a00 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 48 d(ShaderUtilities.Keyword_MASK_H
6a20 41 52 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 6d 5f 73 ARD);..................//....m_s
6a40 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 haredMaterial.DisableKeyword(Sha
6a60 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 53 4f 46 54 29 3b derUtilities.Keyword_MASK_SOFT);
6a80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 62 72 65 61 6b 3b 0d 0a ..................//....break;..
6aa0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 ............}..........}........
6ac0 20 20 20 20 20 20 2f 2f 20 4d 65 74 68 6f 64 20 75 73 65 64 20 74 6f 20 73 65 74 20 74 68 65 20 ......//.Method.used.to.set.the.
6ae0 6d 61 73 6b 69 6e 67 20 63 6f 6f 72 64 69 6e 61 74 65 73 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 masking.coordinates..........voi
6b00 64 20 53 65 74 4d 61 73 6b 43 6f 6f 72 64 69 6e 61 74 65 73 28 56 65 63 74 6f 72 34 20 63 6f 6f d.SetMaskCoordinates(Vector4.coo
6b20 72 64 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 rds)..........{..............m_s
6b40 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 56 65 63 74 6f 72 28 53 68 61 64 65 72 55 74 haredMaterial.SetVector(ShaderUt
6b60 69 6c 69 74 69 65 73 2e 49 44 5f 43 6c 69 70 52 65 63 74 2c 20 63 6f 6f 72 64 73 29 3b 0d 0a 20 ilities.ID_ClipRect,.coords);...
6b80 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4d 65 74 68 6f 64 20 75 73 .......}............//.Method.us
6ba0 65 64 20 74 6f 20 73 65 74 20 74 68 65 20 6d 61 73 6b 69 6e 67 20 63 6f 6f 72 64 69 6e 61 74 65 ed.to.set.the.masking.coordinate
6bc0 73 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 53 65 74 4d 61 73 6b 43 6f 6f 72 64 69 6e 61 74 s..........void.SetMaskCoordinat
6be0 65 73 28 56 65 63 74 6f 72 34 20 63 6f 6f 72 64 73 2c 20 66 6c 6f 61 74 20 73 6f 66 74 58 2c 20 es(Vector4.coords,.float.softX,.
6c00 66 6c 6f 61 74 20 73 6f 66 74 59 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 float.softY)..........{.........
6c20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 56 65 63 74 6f 72 28 .....m_sharedMaterial.SetVector(
6c40 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 43 6c 69 70 52 65 63 74 2c 20 63 6f 6f ShaderUtilities.ID_ClipRect,.coo
6c60 72 64 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 rds);..............m_sharedMater
6c80 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 44 5f ial.SetFloat(ShaderUtilities.ID_
6ca0 4d 61 73 6b 53 6f 66 74 6e 65 73 73 58 2c 20 73 6f 66 74 58 29 3b 0d 0a 20 20 20 20 20 20 20 20 MaskSoftnessX,.softX);..........
6cc0 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 ....m_sharedMaterial.SetFloat(Sh
6ce0 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 73 6b 53 6f 66 74 6e 65 73 73 59 2c 20 aderUtilities.ID_MaskSoftnessY,.
6d00 73 6f 66 74 59 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 softY);..........}..............
6d20 20 20 2f 2f 20 45 6e 61 62 6c 65 20 4d 61 73 6b 69 6e 67 20 69 6e 20 74 68 65 20 53 68 61 64 65 ..//.Enable.Masking.in.the.Shade
6d40 72 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 45 6e 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 0d r..........void.EnableMasking().
6d60 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 68 .........{..............if.(m_sh
6d80 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 48 61 73 50 72 6f 70 65 72 74 79 28 53 68 61 64 65 72 55 aredMaterial.HasProperty(ShaderU
6da0 74 69 6c 69 74 69 65 73 2e 49 44 5f 43 6c 69 70 52 65 63 74 29 29 0d 0a 20 20 20 20 20 20 20 20 tilities.ID_ClipRect))..........
6dc0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d ....{..................m_sharedM
6de0 61 74 65 72 69 61 6c 2e 45 6e 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c aterial.EnableKeyword(ShaderUtil
6e00 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 53 4f 46 54 29 3b 0d 0a 20 20 20 20 20 ities.Keyword_MASK_SOFT);.......
6e20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 ...........m_sharedMaterial.Disa
6e40 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f bleKeyword(ShaderUtilities.Keywo
6e60 72 64 5f 4d 41 53 4b 5f 48 41 52 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rd_MASK_HARD);..................
6e80 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 m_sharedMaterial.DisableKeyword(
6ea0 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 54 45 58 ShaderUtilities.Keyword_MASK_TEX
6ec0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4d 61 73 6b 69 6e );....................m_isMaskin
6ee0 67 45 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 gEnabled.=.true;................
6f00 20 20 55 70 64 61 74 65 4d 61 73 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ..UpdateMask();..............}..
6f20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 61 62 6c 65 ........}..............//.Enable
6f40 20 4d 61 73 6b 69 6e 67 20 69 6e 20 74 68 65 20 53 68 61 64 65 72 0d 0a 20 20 20 20 20 20 20 20 .Masking.in.the.Shader..........
6f60 76 6f 69 64 20 44 69 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b void.DisableMasking()..........{
6f80 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 ..............if.(m_sharedMateri
6fa0 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 49 al.HasProperty(ShaderUtilities.I
6fc0 44 5f 43 6c 69 70 52 65 63 74 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 D_ClipRect))..............{.....
6fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 .............m_sharedMaterial.Di
7000 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 sableKeyword(ShaderUtilities.Key
7020 77 6f 72 64 5f 4d 41 53 4b 5f 53 4f 46 54 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 word_MASK_SOFT);................
7040 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 ..m_sharedMaterial.DisableKeywor
7060 64 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 48 d(ShaderUtilities.Keyword_MASK_H
7080 41 52 44 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d ARD);..................m_sharedM
70a0 61 74 65 72 69 61 6c 2e 44 69 73 61 62 6c 65 4b 65 79 77 6f 72 64 28 53 68 61 64 65 72 55 74 69 aterial.DisableKeyword(ShaderUti
70c0 6c 69 74 69 65 73 2e 4b 65 79 77 6f 72 64 5f 4d 41 53 4b 5f 54 45 58 29 3b 0d 0a 0d 0a 20 20 20 lities.Keyword_MASK_TEX);.......
70e0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 20 .............m_isMaskingEnabled.
7100 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 =.false;..................Update
7120 4d 61 73 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 Mask();..............}..........
7140 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 55 70 64 61 74 65 4d 61 73 6b 28 29 }..............void.UpdateMask()
7160 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 ..........{..............//Debug
7180 2e 4c 6f 67 28 22 55 70 64 61 74 65 4d 61 73 6b 28 29 20 63 61 6c 6c 65 64 2e 22 29 3b 0d 0a 20 .Log("UpdateMask().called.");...
71a0 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f .........................if.(!m_
71c0 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b isMaskingEnabled)..............{
71e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 6c 65 61 73 65 20 4d 61 73 ..................//.Release.Mas
7200 6b 69 6e 67 20 4d 61 74 65 72 69 61 6c 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 king.Material...................
7220 20 2f 2f 20 52 65 2d 61 73 73 69 67 6e 20 42 61 73 65 20 4d 61 74 65 72 69 61 6c 0d 0a 0d 0a 20 .//.Re-assign.Base.Material.....
7240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 ...............return;..........
7260 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ....}...........................
7280 20 69 66 20 28 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 20 26 26 20 6d 5f 66 6f 6e .if.(m_isMaskingEnabled.&&.m_fon
72a0 74 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 tMaterial.==.null)..............
72c0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 72 65 61 74 65 4d 61 74 65 72 69 61 {..................CreateMateria
72e0 6c 49 6e 73 74 61 6e 63 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 lInstance();..............}.....
7300 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 0d 0a 20 20 20 ........................./*.....
7320 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 .........if.(!m_isMaskingEnabled
7340 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
7360 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 4d 61 73 6b 69 6e 67 20 69 73 20 6e 6f 74 20 65 6e ..//Debug.Log("Masking.is.not.en
7380 61 62 6c 65 64 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d abled.");..................if.(m
73a0 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 20 21 3d 20 6e 75 6c 6c 29 0d 0a _maskingPropertyBlock.!=.null)..
73c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
73e0 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 53 65 74 50 72 6f 70 65 72 74 79 42 6c 6f .......m_renderer.SetPropertyBlo
7400 63 6b 28 6e 75 6c 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ck(null);....................../
7420 2f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a /havePropertiesChanged.=.true;..
7440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
7460 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 ...return;..............}.......
7480 20 20 20 20 20 20 20 2f 2f 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 .......//else..............//...
74a0 20 44 65 62 75 67 2e 4c 6f 67 28 22 55 70 64 61 74 69 6e 67 20 4d 61 73 6b 69 6e 67 2e 2e 2e 22 .Debug.Log("Updating.Masking..."
74c0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 );..............*/..............
74e0 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 70 75 74 65 20 4d 61 73 6b 69 6e ...............//.Compute.Maskin
7500 67 20 43 6f 6f 72 64 69 6e 61 74 65 73 20 26 20 53 6f 66 74 6e 65 73 73 0d 0a 20 20 20 20 20 20 g.Coordinates.&.Softness........
7520 20 20 20 20 20 20 2f 2f 66 6c 6f 61 74 20 73 6f 66 74 6e 65 73 73 58 20 3d 20 4d 61 74 68 66 2e ......//float.softnessX.=.Mathf.
7540 4d 69 6e 28 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 Min(Mathf.Min(m_textContainer.ma
7560 72 67 69 6e 73 2e 78 2c 20 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 rgins.x,.m_textContainer.margins
7580 2e 7a 29 2c 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 46 6c 6f 61 74 28 53 .z),.m_sharedMaterial.GetFloat(S
75a0 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 73 6b 53 6f 66 74 6e 65 73 73 58 29 haderUtilities.ID_MaskSoftnessX)
75c0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 66 6c 6f 61 74 20 73 6f 66 74 6e 65 73 73 );..............//float.softness
75e0 59 20 3d 20 4d 61 74 68 66 2e 4d 69 6e 28 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 74 65 78 74 43 6f Y.=.Mathf.Min(Mathf.Min(m_textCo
7600 6e 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 2e 79 2c 20 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e ntainer.margins.y,.m_textContain
7620 65 72 2e 6d 61 72 67 69 6e 73 2e 77 29 2c 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e er.margins.w),.m_sharedMaterial.
7640 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 44 5f 4d 61 73 6b GetFloat(ShaderUtilities.ID_Mask
7660 53 6f 66 74 6e 65 73 73 59 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 73 6f SoftnessY));................//so
7680 66 74 6e 65 73 73 58 20 3d 20 73 6f 66 74 6e 65 73 73 58 20 3e 20 30 20 3f 20 73 6f 66 74 6e 65 ftnessX.=.softnessX.>.0.?.softne
76a0 73 73 58 20 3a 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 73 6f 66 74 6e 65 73 73 ssX.:.0;..............//softness
76c0 59 20 3d 20 73 6f 66 74 6e 65 73 73 59 20 3e 20 30 20 3f 20 73 6f 66 74 6e 65 73 73 59 20 3a 20 Y.=.softnessY.>.0.?.softnessY.:.
76e0 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 66 0;...........................//f
7700 6c 6f 61 74 20 77 69 64 74 68 20 3d 20 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 77 69 loat.width.=.(m_textContainer.wi
7720 64 74 68 20 2d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e dth.-.Mathf.Max(m_textContainer.
7740 6d 61 72 67 69 6e 73 2e 78 2c 20 30 29 20 2d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 65 78 74 margins.x,.0).-.Mathf.Max(m_text
7760 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 2e 7a 2c 20 30 29 29 20 2f 20 32 20 2b 20 73 Container.margins.z,.0))./.2.+.s
7780 6f 66 74 6e 65 73 73 58 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 66 6c 6f 61 74 20 68 oftnessX;..............//float.h
77a0 65 69 67 68 74 20 3d 20 20 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 68 65 69 67 68 74 eight.=..(m_textContainer.height
77c0 20 2d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 72 .-.Mathf.Max(m_textContainer.mar
77e0 67 69 6e 73 2e 79 2c 20 30 29 20 2d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 65 78 74 43 6f 6e gins.y,.0).-.Mathf.Max(m_textCon
7800 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 2e 77 2c 20 30 29 29 20 2f 20 32 20 2b 20 73 6f 66 74 tainer.margins.w,.0))./.2.+.soft
7820 6e 65 73 73 59 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nessY;..........................
7840 2f 2f 56 65 63 74 6f 72 32 20 63 65 6e 74 65 72 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 28 //Vector2.center.=.new.Vector2((
7860 30 2e 35 66 20 2d 20 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 70 69 76 6f 74 2e 78 29 20 0.5f.-.m_textContainer.pivot.x).
7880 2a 20 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 77 69 64 74 68 20 2b 20 28 4d 61 74 68 66 *.m_textContainer.width.+.(Mathf
78a0 2e 4d 61 78 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 2e 78 2c 20 .Max(m_textContainer.margins.x,.
78c0 30 29 20 2d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 0).-.Mathf.Max(m_textContainer.m
78e0 61 72 67 69 6e 73 2e 7a 2c 20 30 29 29 20 2f 20 32 2c 20 28 30 2e 35 66 20 2d 20 6d 5f 74 65 78 argins.z,.0))./.2,.(0.5f.-.m_tex
7900 74 43 6f 6e 74 61 69 6e 65 72 2e 70 69 76 6f 74 2e 79 29 20 2a 20 6d 5f 74 65 78 74 43 6f 6e 74 tContainer.pivot.y).*.m_textCont
7920 61 69 6e 65 72 2e 68 65 69 67 68 74 20 2b 20 28 2d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 65 ainer.height.+.(-.Mathf.Max(m_te
7940 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 2e 79 2c 20 30 29 20 2b 20 4d 61 74 68 xtContainer.margins.y,.0).+.Math
7960 66 2e 4d 61 78 28 6d 5f 74 65 78 74 43 6f 6e 74 61 69 6e 65 72 2e 6d 61 72 67 69 6e 73 2e 77 2c f.Max(m_textContainer.margins.w,
7980 20 30 29 29 20 2f 20 32 29 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .0))./.2);......................
79a0 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 56 65 63 74 6f 72 34 20 6d 61 73 ...................//Vector4.mas
79c0 6b 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 34 28 63 65 6e 74 65 72 2e 78 2c 20 63 65 6e 74 65 72 k.=.new.Vector4(center.x,.center
79e0 2e 79 2c 20 77 69 64 74 68 2c 20 68 65 69 67 68 74 29 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 .y,.width,.height);.............
7a00 20 20 20 20 20 2f 2f 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 2e 53 65 74 56 65 63 74 6f 72 28 .....//m_fontMaterial.SetVector(
7a20 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 43 6c 69 70 52 65 63 74 2c 20 6d 61 73 ShaderUtilities.ID_ClipRect,.mas
7a40 6b 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 k);..............//m_fontMateria
7a60 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 4d 61 l.SetFloat(ShaderUtilities.ID_Ma
7a80 73 6b 53 6f 66 74 6e 65 73 73 58 2c 20 73 6f 66 74 6e 65 73 73 58 29 3b 0d 0a 20 20 20 20 20 20 skSoftnessX,.softnessX);........
7aa0 20 20 20 20 20 20 2f 2f 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 ......//m_fontMaterial.SetFloat(
7ac0 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 73 6b 53 6f 66 74 6e 65 73 73 59 ShaderUtilities.ID_MaskSoftnessY
7ae0 2c 20 73 6f 66 74 6e 65 73 73 59 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 20 ,.softnessY);................/*.
7b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 ................................
7b20 20 20 69 66 28 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 20 3d 3d 20 6e ..if(m_maskingPropertyBlock.==.n
7b40 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 20 20 20 20 20 20 20 20 20 20 ull)..............{.............
7b60 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 73 6b 69 6e 67 50 72 .....................m_maskingPr
7b80 6f 70 65 72 74 79 42 6c 6f 63 6b 20 3d 20 6e 65 77 20 4d 61 74 65 72 69 61 6c 50 72 6f 70 65 72 opertyBlock.=.new.MaterialProper
7ba0 74 79 42 6c 6f 63 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 20 20 20 20 20 20 tyBlock();......................
7bc0 20 20 20 20 20 20 20 2f 2f 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 2e .......//m_maskingPropertyBlock.
7be0 41 64 64 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 56 65 72 74 AddFloat(ShaderUtilities.ID_Vert
7c00 65 78 4f 66 66 73 65 74 58 2c 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 exOffsetX,..m_sharedMaterial.Get
7c20 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 56 65 72 74 65 78 4f Float(ShaderUtilities.ID_VertexO
7c40 66 66 73 65 74 58 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 6d ffsetX));..................//m_m
7c60 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 2e 41 64 64 46 6c 6f 61 74 28 53 68 61 askingPropertyBlock.AddFloat(Sha
7c80 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 56 65 72 74 65 78 4f 66 66 73 65 74 59 2c 20 20 derUtilities.ID_VertexOffsetY,..
7ca0 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 m_sharedMaterial.GetFloat(Shader
7cc0 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 56 65 72 74 65 78 4f 66 66 73 65 74 59 29 29 3b 0d 0a 20 Utilities.ID_VertexOffsetY));...
7ce0 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 43 72 65 61 ...............//Debug.Log("Crea
7d00 74 69 6e 67 20 6e 65 77 20 4d 61 74 65 72 69 61 6c 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 2e 22 ting.new.MaterialPropertyBlock."
7d20 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 );..............}...............
7d40 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 55 70 64 61 74 69 6e 67 20 4d 61 74 65 72 69 61 6c 20 .//Debug.Log("Updating.Material.
7d60 50 72 6f 70 65 72 74 79 20 42 6c 6f 63 6b 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Property.Block.");..............
7d80 2f 2f 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 2e 43 6c 65 61 72 28 29 //m_maskingPropertyBlock.Clear()
7da0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 ;..............m_maskingProperty
7dc0 42 6c 6f 63 6b 2e 41 64 64 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 Block.AddFloat(ShaderUtilities.I
7de0 44 5f 4d 61 73 6b 49 44 2c 20 6d 5f 72 65 6e 64 65 72 65 72 2e 47 65 74 49 6e 73 74 61 6e 63 65 D_MaskID,.m_renderer.GetInstance
7e00 49 44 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f ID());..............m_maskingPro
7e20 70 65 72 74 79 42 6c 6f 63 6b 2e 41 64 64 56 65 63 74 6f 72 28 53 68 61 64 65 72 55 74 69 6c 69 pertyBlock.AddVector(ShaderUtili
7e40 74 69 65 73 2e 49 44 5f 4d 61 73 6b 43 6f 6f 72 64 2c 20 6d 61 73 6b 29 3b 0d 0a 20 20 20 20 20 ties.ID_MaskCoord,.mask);.......
7e60 20 20 20 20 20 20 20 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 2e 41 64 .......m_maskingPropertyBlock.Ad
7e80 64 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 4d 61 73 6b 53 6f dFloat(ShaderUtilities.ID_MaskSo
7ea0 66 74 6e 65 73 73 58 2c 20 73 6f 66 74 6e 65 73 73 58 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ftnessX,.softnessX);............
7ec0 20 20 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 2e 41 64 64 46 6c 6f 61 ..m_maskingPropertyBlock.AddFloa
7ee0 74 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 73 6b 53 6f 66 74 6e 65 73 t(ShaderUtilities.ID_MaskSoftnes
7f00 73 59 2c 20 73 6f 66 74 6e 65 73 73 59 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 sY,.softnessY);.................
7f20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 53 65 74 50 72 6f 70 65 72 74 79 ..........m_renderer.SetProperty
7f40 42 6c 6f 63 6b 28 6d 5f 6d 61 73 6b 69 6e 67 50 72 6f 70 65 72 74 79 42 6c 6f 63 6b 29 3b 0d 0a Block(m_maskingPropertyBlock);..
7f60 20 20 20 20 20 20 20 20 20 20 20 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 ............*/..........}.......
7f80 20 20 20 20 20 20 20 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 65 64 20 69 6e 74 65 72 6e .......//.Function.called.intern
7fa0 61 6c 6c 79 20 77 68 65 6e 20 61 20 6e 65 77 20 6d 61 74 65 72 69 61 6c 20 69 73 20 61 73 73 69 ally.when.a.new.material.is.assi
7fc0 67 6e 65 64 20 76 69 61 20 74 68 65 20 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 70 72 6f 70 65 72 gned.via.the.fontMaterial.proper
7fe0 74 79 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 ty...........protected.override.
8000 4d 61 74 65 72 69 61 6c 20 47 65 74 4d 61 74 65 72 69 61 6c 28 4d 61 74 65 72 69 61 6c 20 6d 61 Material.GetMaterial(Material.ma
8020 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 t)..........{..............//.Ch
8040 65 63 6b 20 69 6e 20 63 61 73 65 20 4f 62 6a 65 63 74 20 69 73 20 64 69 73 61 62 6c 65 64 2e 20 eck.in.case.Object.is.disabled..
8060 49 66 20 73 6f 2c 20 77 65 20 64 6f 6e 27 74 20 68 61 76 65 20 61 20 76 61 6c 69 64 20 72 65 66 If.so,.we.don't.have.a.valid.ref
8080 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 52 65 6e 64 65 72 65 72 2e 0d 0a 20 20 20 20 20 20 20 erence.to.the.Renderer..........
80a0 20 20 20 20 20 2f 2f 20 54 68 69 73 20 63 61 6e 20 6f 63 63 75 72 20 77 68 65 6e 20 74 68 65 20 .....//.This.can.occur.when.the.
80c0 44 75 70 6c 69 63 61 74 65 20 4d 61 74 65 72 69 61 6c 20 43 6f 6e 74 65 78 74 20 6d 65 6e 75 20 Duplicate.Material.Context.menu.
80e0 69 73 20 75 73 65 64 20 6f 6e 20 61 6e 20 69 6e 61 63 74 69 76 65 20 6f 62 6a 65 63 74 2e 0d 0a is.used.on.an.inactive.object...
8100 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 5f 72 65 6e 64 65 72 65 72 20 3d 3d 20 ............//if.(m_renderer.==.
8120 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 6d 5f 72 65 6e 64 65 null)..............//....m_rende
8140 72 65 72 20 3d 20 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 3c 52 65 6e 64 65 72 65 72 3e 28 29 3b 0d rer.=.GetComponent<Renderer>();.
8160 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 72 65 61 74 65 20 49 6e 73 74 61 6e 63 ...............//.Create.Instanc
8180 65 20 4d 61 74 65 72 69 61 6c 20 6f 6e 6c 79 20 69 66 20 74 68 65 20 6e 65 77 20 6d 61 74 65 72 e.Material.only.if.the.new.mater
81a0 69 61 6c 20 69 73 20 6e 6f 74 20 74 68 65 20 73 61 6d 65 20 69 6e 73 74 61 6e 63 65 20 70 72 65 ial.is.not.the.same.instance.pre
81c0 76 69 6f 75 73 6c 79 20 75 73 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d viously.used...............if.(m
81e0 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 66 6f 6e 74 4d _fontMaterial.==.null.||.m_fontM
8200 61 74 65 72 69 61 6c 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 6d 61 74 2e 47 aterial.GetInstanceID().!=.mat.G
8220 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 etInstanceID()).................
8240 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 43 72 65 61 74 65 4d 61 74 65 72 69 61 6c .m_fontMaterial.=.CreateMaterial
8260 49 6e 73 74 61 6e 63 65 28 6d 61 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f Instance(mat);................m_
8280 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 3b sharedMaterial.=.m_fontMaterial;
82a0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 47 65 74 50 ................m_padding.=.GetP
82c0 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 addingForMaterial();............
82e0 20 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 ....SetVerticesDirty();.........
8300 20 20 20 20 20 53 65 74 4d 61 74 65 72 69 61 6c 44 69 72 74 79 28 29 3b 0d 0a 0d 0a 20 20 20 20 .....SetMaterialDirty();........
8320 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b ........return.m_sharedMaterial;
8340 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 ..........}..............///.<su
8360 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 72 65 74 75 72 mmary>..........///.Method.retur
8380 6e 69 6e 67 20 69 6e 73 74 61 6e 63 65 73 20 6f 66 20 74 68 65 20 6d 61 74 65 72 69 61 6c 73 20 ning.instances.of.the.materials.
83a0 75 73 65 64 20 62 79 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 used.by.the.text.object.........
83c0 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 ..///.</summary>..........///.<r
83e0 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 eturns></returns>..........prote
8400 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 4d 61 74 65 72 69 61 6c 5b 5d 20 47 65 74 4d 61 74 65 cted.override.Material[].GetMate
8420 72 69 61 6c 73 28 4d 61 74 65 72 69 61 6c 5b 5d 20 6d 61 74 73 29 0d 0a 20 20 20 20 20 20 20 20 rials(Material[].mats)..........
8440 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 {..............int.materialCount
8460 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 3b 0d 0a 0d 0a .=.m_textInfo.materialCount;....
8480 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 73 20 ............if.(m_fontMaterials.
84a0 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 ==.null)..................m_font
84c0 4d 61 74 65 72 69 61 6c 73 20 3d 20 6e 65 77 20 4d 61 74 65 72 69 61 6c 5b 6d 61 74 65 72 69 61 Materials.=.new.Material[materia
84e0 6c 43 6f 75 6e 74 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d lCount];..............else.if.(m
8500 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 73 2e 4c 65 6e 67 74 68 20 21 3d 20 6d 61 74 65 72 69 61 _fontMaterials.Length.!=.materia
8520 6c 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 lCount)..................TMP_Tex
8540 74 49 6e 66 6f 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 73 tInfo.Resize(ref.m_fontMaterials
8560 2c 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 ,.materialCount,.false);........
8580 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 69 6e 73 74 61 6e 63 65 73 20 6f 66 20 74 68 65 20 ........//.Get.instances.of.the.
85a0 6d 61 74 65 72 69 61 6c 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 materials..............for.(int.
85c0 69 20 3d 20 30 3b 20 69 20 3c 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 3b 20 69 2b 2b 29 0d 0a i.=.0;.i.<.materialCount;.i++)..
85e0 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 ............{..................i
8600 66 20 28 69 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 f.(i.==.0)......................
8620 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 73 5b 69 5d 20 3d 20 66 6f 6e 74 4d 61 74 65 72 69 61 m_fontMaterials[i].=.fontMateria
8640 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 l;..................else........
8660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 73 5b 69 5d ..............m_fontMaterials[i]
8680 20 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 61 74 65 72 69 61 6c 3b .=.m_subTextObjects[i].material;
86a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d ..............}................m
86c0 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 20 3d 20 6d 5f 66 6f 6e 74 4d 61 74 _fontSharedMaterials.=.m_fontMat
86e0 65 72 69 61 6c 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f erials;................return.m_
8700 66 6f 6e 74 4d 61 74 65 72 69 61 6c 73 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 fontMaterials;..........}.......
8720 20 20 20 20 20 20 20 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 65 64 20 69 6e 74 65 72 6e .......//.Function.called.intern
8740 61 6c 6c 79 20 77 68 65 6e 20 61 20 6e 65 77 20 73 68 61 72 65 64 20 6d 61 74 65 72 69 61 6c 20 ally.when.a.new.shared.material.
8760 69 73 20 61 73 73 69 67 6e 65 64 20 76 69 61 20 74 68 65 20 66 6f 6e 74 53 68 61 72 65 64 4d 61 is.assigned.via.the.fontSharedMa
8780 74 65 72 69 61 6c 20 70 72 6f 70 65 72 74 79 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 terial.property...........protec
87a0 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 53 68 61 72 65 64 4d 61 74 65 72 ted.override.void.SetSharedMater
87c0 69 61 6c 28 4d 61 74 65 72 69 61 6c 20 6d 61 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ial(Material.mat)..........{....
87e0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 6e 20 63 61 73 65 20 4f 62 6a 65 63 ..........//.Check.in.case.Objec
8800 74 20 69 73 20 64 69 73 61 62 6c 65 64 2e 20 49 66 20 73 6f 2c 20 77 65 20 64 6f 6e 27 74 20 68 t.is.disabled..If.so,.we.don't.h
8820 61 76 65 20 61 20 76 61 6c 69 64 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 52 65 6e ave.a.valid.reference.to.the.Ren
8840 64 65 72 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 63 61 6e 20 derer...............//.This.can.
8860 6f 63 63 75 72 20 77 68 65 6e 20 74 68 65 20 44 75 70 6c 69 63 61 74 65 20 4d 61 74 65 72 69 61 occur.when.the.Duplicate.Materia
8880 6c 20 43 6f 6e 74 65 78 74 20 6d 65 6e 75 20 69 73 20 75 73 65 64 20 6f 6e 20 61 6e 20 69 6e 61 l.Context.menu.is.used.on.an.ina
88a0 63 74 69 76 65 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 ctive.object...............//if.
88c0 28 6d 5f 72 65 6e 64 65 72 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 (m_renderer.==.null)............
88e0 20 20 2f 2f 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 20 3d 20 47 65 74 43 6f 6d 70 6f 6e 65 6e ..//....m_renderer.=.GetComponen
8900 74 3c 52 65 6e 64 65 72 65 72 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f t<Renderer>();................m_
8920 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 61 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 sharedMaterial.=.mat;...........
8940 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 .....m_padding.=.GetPaddingForMa
8960 74 65 72 69 61 6c 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 4d 61 74 65 terial();................SetMate
8980 72 69 61 6c 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 rialDirty();..........}.........
89a0 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 .....///.<summary>..........///.
89c0 4d 65 74 68 6f 64 20 72 65 74 75 72 6e 69 6e 67 20 61 6e 20 61 72 72 61 79 20 63 6f 6e 74 61 69 Method.returning.an.array.contai
89e0 6e 69 6e 67 20 74 68 65 20 6d 61 74 65 72 69 61 6c 73 20 75 73 65 64 20 62 79 20 74 68 65 20 74 ning.the.materials.used.by.the.t
8a00 65 78 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 ext.object...........///.</summa
8a20 72 79 3e 0d 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 ry>..........///.<returns></retu
8a40 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 rns>..........protected.override
8a60 20 4d 61 74 65 72 69 61 6c 5b 5d 20 47 65 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 28 29 .Material[].GetSharedMaterials()
8a80 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d 61 74 ..........{..............int.mat
8aa0 65 72 69 61 6c 43 6f 75 6e 74 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 61 74 65 72 69 61 6c erialCount.=.m_textInfo.material
8ac0 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 Count;................if.(m_font
8ae0 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 SharedMaterials.==.null)........
8b00 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 20 ..........m_fontSharedMaterials.
8b20 3d 20 6e 65 77 20 4d 61 74 65 72 69 61 6c 5b 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 5d 3b 0d 0a =.new.Material[materialCount];..
8b40 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 66 6f 6e 74 53 68 61 72 65 ............else.if.(m_fontShare
8b60 64 4d 61 74 65 72 69 61 6c 73 2e 4c 65 6e 67 74 68 20 21 3d 20 6d 61 74 65 72 69 61 6c 43 6f 75 dMaterials.Length.!=.materialCou
8b80 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 49 6e 66 nt)..................TMP_TextInf
8ba0 6f 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 o.Resize(ref.m_fontSharedMateria
8bc0 6c 73 2c 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 ls,.materialCount,.false);......
8be0 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 6d 61 ..........for.(int.i.=.0;.i.<.ma
8c00 74 65 72 69 61 6c 43 6f 75 6e 74 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b terialCount;.i++)..............{
8c20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3d 3d 20 30 29 0d 0a 20 ..................if.(i.==.0)...
8c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d ...................m_fontSharedM
8c60 61 74 65 72 69 61 6c 73 5b 69 5d 20 3d 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b 0d aterials[i].=.m_sharedMaterial;.
8c80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 .................else...........
8ca0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 ...........m_fontSharedMaterials
8cc0 5b 69 5d 20 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 68 61 72 65 64 [i].=.m_subTextObjects[i].shared
8ce0 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 Material;..............}........
8d00 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 ........return.m_fontSharedMater
8d20 69 61 6c 73 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f ials;..........}..............//
8d40 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 /.<summary>..........///.Method.
8d60 75 73 65 64 20 74 6f 20 61 73 73 69 67 6e 20 6e 65 77 20 6d 61 74 65 72 69 61 6c 73 20 74 6f 20 used.to.assign.new.materials.to.
8d80 74 68 65 20 74 65 78 74 20 61 6e 64 20 73 75 62 20 74 65 78 74 20 6f 62 6a 65 63 74 73 2e 0d 0a the.text.and.sub.text.objects...
8da0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 ........///.</summary>..........
8dc0 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 53 68 61 72 65 protected.override.void.SetShare
8de0 64 4d 61 74 65 72 69 61 6c 73 28 4d 61 74 65 72 69 61 6c 5b 5d 20 6d 61 74 65 72 69 61 6c 73 29 dMaterials(Material[].materials)
8e00 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d 61 74 ..........{..............int.mat
8e20 65 72 69 61 6c 43 6f 75 6e 74 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 61 74 65 72 69 61 6c erialCount.=.m_textInfo.material
8e40 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 61 Count;................//.Check.a
8e60 6c 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 llocation.of.the.fontSharedMater
8e80 69 61 6c 73 20 61 72 72 61 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 ials.array...............if.(m_f
8ea0 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ontSharedMaterials.==.null).....
8ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 .............m_fontSharedMateria
8ee0 6c 73 20 3d 20 6e 65 77 20 4d 61 74 65 72 69 61 6c 5b 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 5d ls.=.new.Material[materialCount]
8f00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 66 6f 6e 74 53 68 ;..............else.if.(m_fontSh
8f20 61 72 65 64 4d 61 74 65 72 69 61 6c 73 2e 4c 65 6e 67 74 68 20 21 3d 20 6d 61 74 65 72 69 61 6c aredMaterials.Length.!=.material
8f40 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 Count)..................TMP_Text
8f60 49 6e 66 6f 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 Info.Resize(ref.m_fontSharedMate
8f80 72 69 61 6c 73 2c 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d rials,.materialCount,.false);...
8fa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 6e 6c 79 20 61 73 73 69 67 6e 20 61 73 20 6d .............//.Only.assign.as.m
8fc0 61 6e 79 20 6d 61 74 65 72 69 61 6c 73 20 61 73 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 any.materials.as.the.text.object
8fe0 20 63 6f 6e 74 61 69 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 .contains...............for.(int
9000 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 3b 20 69 2b 2b 29 0d .i.=.0;.i.<.materialCount;.i++).
9020 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
9040 54 65 78 74 75 72 65 20 6d 61 74 5f 4d 61 69 6e 54 65 78 20 3d 20 6d 61 74 65 72 69 61 6c 73 5b Texture.mat_MainTex.=.materials[
9060 69 5d 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 i].GetTexture(ShaderUtilities.ID
9080 5f 4d 61 69 6e 54 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 _MainTex);....................if
90a0 20 28 69 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 .(i.==.0)..................{....
90c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 6e 6c 79 20 61 73 73 69 67 6e ..................//.Only.assign
90e0 20 6e 65 77 20 6d 61 74 65 72 69 61 6c 20 69 66 20 74 68 65 20 66 6f 6e 74 20 61 74 6c 61 73 20 .new.material.if.the.font.atlas.
9100 74 65 78 74 75 72 65 73 20 6d 61 74 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 textures.match..................
9120 20 20 20 20 20 69 66 20 28 20 6d 61 74 5f 4d 61 69 6e 54 65 78 20 3d 3d 20 6e 75 6c 6c 20 7c 7c .....if.(.mat_MainTex.==.null.||
9140 20 6d 61 74 5f 4d 61 69 6e 54 65 78 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 .mat_MainTex.GetInstanceID().!=.
9160 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 m_sharedMaterial.GetTexture(Shad
9180 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 29 2e 47 65 74 49 6e 73 74 61 erUtilities.ID_MainTex).GetInsta
91a0 6e 63 65 49 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nceID())........................
91c0 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..continue;.....................
91e0 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 66 6f 6e 74 53 68 61 72 ...m_sharedMaterial.=.m_fontShar
9200 65 64 4d 61 74 65 72 69 61 6c 73 5b 69 5d 20 3d 20 6d 61 74 65 72 69 61 6c 73 5b 69 5d 3b 0d 0a edMaterials[i].=.materials[i];..
9220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 ....................m_padding.=.
9240 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 6d 5f 73 68 61 72 65 64 4d 61 GetPaddingForMaterial(m_sharedMa
9260 74 65 72 69 61 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 terial);..................}.....
9280 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .............else...............
92a0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 6e 6c ...{......................//.Onl
92c0 79 20 61 73 73 69 67 6e 20 6e 65 77 20 6d 61 74 65 72 69 61 6c 20 69 66 20 74 68 65 20 66 6f 6e y.assign.new.material.if.the.fon
92e0 74 20 61 74 6c 61 73 20 74 65 78 74 75 72 65 73 20 6d 61 74 63 68 2e 0d 0a 20 20 20 20 20 20 20 t.atlas.textures.match..........
9300 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 74 5f 4d 61 69 6e 54 65 78 20 3d 3d 20 .............if.(mat_MainTex.==.
9320 6e 75 6c 6c 20 7c 7c 20 6d 61 74 5f 4d 61 69 6e 54 65 78 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 null.||.mat_MainTex.GetInstanceI
9340 44 28 29 20 21 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 68 61 72 65 D().!=.m_subTextObjects[i].share
9360 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 65 72 55 74 69 6c 69 dMaterial.GetTexture(ShaderUtili
9380 74 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 29 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 ties.ID_MainTex).GetInstanceID()
93a0 29 0d 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 )..........................conti
93c0 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f nue;........................//.O
93e0 6e 6c 79 20 61 73 73 69 67 6e 20 61 20 6e 65 77 20 6d 61 74 65 72 69 61 6c 20 69 66 20 6e 6f 6e nly.assign.a.new.material.if.non
9400 65 20 77 65 72 65 20 73 70 65 63 69 66 69 65 64 20 69 6e 20 74 68 65 20 74 65 78 74 20 69 6e 70 e.were.specified.in.the.text.inp
9420 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 ut.......................if.(m_s
9440 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 69 73 44 65 66 61 75 6c 74 4d 61 74 65 72 69 ubTextObjects[i].isDefaultMateri
9460 61 6c 29 0d 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 6d 5f 73 al)..........................m_s
9480 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 ubTextObjects[i].sharedMaterial.
94a0 3d 20 6d 5f 66 6f 6e 74 53 68 61 72 65 64 4d 61 74 65 72 69 61 6c 73 5b 69 5d 20 3d 20 6d 61 74 =.m_fontSharedMaterials[i].=.mat
94c0 65 72 69 61 6c 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 erials[i];..................}...
94e0 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 ...........}..........}.........
9500 20 20 20 20 20 2f 2f 20 54 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 63 72 65 61 74 .....//.This.function.will.creat
9520 65 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 46 6f 6e 74 20 4d 61 74 65 72 69 e.an.instance.of.the.Font.Materi
9540 61 6c 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 al...........protected.override.
9560 76 6f 69 64 20 53 65 74 4f 75 74 6c 69 6e 65 54 68 69 63 6b 6e 65 73 73 28 66 6c 6f 61 74 20 74 void.SetOutlineThickness(float.t
9580 68 69 63 6b 6e 65 73 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 hickness)..........{............
95a0 20 20 74 68 69 63 6b 6e 65 73 73 20 3d 20 4d 61 74 68 66 2e 43 6c 61 6d 70 30 31 28 74 68 69 63 ..thickness.=.Mathf.Clamp01(thic
95c0 6b 6e 65 73 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e kness);..............m_renderer.
95e0 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 69 6c 69 74 69 65 material.SetFloat(ShaderUtilitie
9600 73 2e 49 44 5f 4f 75 74 6c 69 6e 65 57 69 64 74 68 2c 20 74 68 69 63 6b 6e 65 73 73 29 3b 0d 0a s.ID_OutlineWidth,.thickness);..
9620 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c ..............if.(m_fontMaterial
9640 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e .==.null)..................m_fon
9660 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 3b tMaterial.=.m_renderer.material;
9680 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 3d ................m_fontMaterial.=
96a0 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 .m_renderer.material;...........
96c0 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 66 6f 6e 74 4d 61 74 65 ...m_sharedMaterial.=.m_fontMate
96e0 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 47 rial;..............m_padding.=.G
9700 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 6c 28 29 3b 0d 0a 20 20 20 20 20 20 20 etPaddingForMaterial();.........
9720 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 66 75 6e 63 74 69 6f 6e .}..............//.This.function
9740 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 .will.create.an.instance.of.the.
9760 46 6f 6e 74 20 4d 61 74 65 72 69 61 6c 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 Font.Material...........protecte
9780 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 46 61 63 65 43 6f 6c 6f 72 28 43 6f 6c d.override.void.SetFaceColor(Col
97a0 6f 72 33 32 20 63 6f 6c 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 or32.color)..........{..........
97c0 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 2e 53 65 74 43 6f 6c 6f 72 ....m_renderer.material.SetColor
97e0 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 46 61 63 65 43 6f 6c 6f 72 2c 20 63 (ShaderUtilities.ID_FaceColor,.c
9800 6f 6c 6f 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e 74 olor);................if.(m_font
9820 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Material.==.null)...............
9840 20 20 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d ...m_fontMaterial.=.m_renderer.m
9860 61 74 65 72 69 61 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 aterial;................m_shared
9880 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 Material.=.m_fontMaterial;......
98a0 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 66 75 6e 63 74 ....}..............//.This.funct
98c0 69 6f 6e 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 ion.will.create.an.instance.of.t
98e0 68 65 20 46 6f 6e 74 20 4d 61 74 65 72 69 61 6c 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 he.Font.Material...........prote
9900 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 4f 75 74 6c 69 6e 65 43 6f 6c cted.override.void.SetOutlineCol
9920 6f 72 28 43 6f 6c 6f 72 33 32 20 63 6f 6c 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 or(Color32.color)..........{....
9940 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 2e 53 65 ..........m_renderer.material.Se
9960 74 43 6f 6c 6f 72 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4f 75 74 6c 69 6e tColor(ShaderUtilities.ID_Outlin
9980 65 43 6f 6c 6f 72 2c 20 63 6f 6c 6f 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 eColor,.color);................i
99a0 66 20 28 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 f.(m_fontMaterial.==.null)......
99c0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 72 ............m_fontMaterial.=.m_r
99e0 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 enderer.material;...............
9a00 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 4d 61 74 65 72 69 61 6c 20 49 44 3a 22 20 2b 20 6d 5f .//Debug.Log("Material.ID:".+.m_
9a20 66 6f 6e 74 4d 61 74 65 72 69 61 6c 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 3b 0d 0a fontMaterial.GetInstanceID());..
9a40 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 6d ............m_sharedMaterial.=.m
9a60 5f 66 6f 6e 74 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 _fontMaterial;..........}.......
9a80 20 20 20 20 20 20 20 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 75 73 65 64 20 74 6f 20 63 72 65 61 74 .......//.Function.used.to.creat
9aa0 65 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 74 68 65 20 6d 61 74 65 72 69 61 6c 0d 0a 20 e.an.instance.of.the.material...
9ac0 20 20 20 20 20 20 20 76 6f 69 64 20 43 72 65 61 74 65 4d 61 74 65 72 69 61 6c 49 6e 73 74 61 6e .......void.CreateMaterialInstan
9ae0 63 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 61 74 ce()..........{..............Mat
9b00 65 72 69 61 6c 20 6d 61 74 20 3d 20 6e 65 77 20 4d 61 74 65 72 69 61 6c 28 6d 5f 73 68 61 72 65 erial.mat.=.new.Material(m_share
9b20 64 4d 61 74 65 72 69 61 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 74 2e 73 68 61 dMaterial);..............mat.sha
9b40 64 65 72 4b 65 79 77 6f 72 64 73 20 3d 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 73 derKeywords.=.m_sharedMaterial.s
9b60 68 61 64 65 72 4b 65 79 77 6f 72 64 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f haderKeywords;................//
9b80 6d 61 74 2e 68 69 64 65 46 6c 61 67 73 20 3d 20 48 69 64 65 46 6c 61 67 73 2e 44 6f 6e 74 53 61 mat.hideFlags.=.HideFlags.DontSa
9ba0 76 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 74 2e 6e 61 6d 65 20 2b 3d 20 22 20 49 ve;..............mat.name.+=.".I
9bc0 6e 73 74 61 6e 63 65 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 4d nstance";................m_fontM
9be0 61 74 65 72 69 61 6c 20 3d 20 6d 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 aterial.=.mat;..........}.......
9c00 20 20 20 20 20 20 20 2f 2f 20 53 65 74 73 20 74 68 65 20 52 65 6e 64 65 72 20 51 75 65 75 65 20 .......//.Sets.the.Render.Queue.
9c20 61 6e 64 20 5a 74 65 73 74 20 6d 6f 64 65 20 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 and.Ztest.mode...........protect
9c40 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 53 68 61 64 65 72 44 65 70 74 68 28 ed.override.void.SetShaderDepth(
9c60 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f )..........{..............if.(m_
9c80 69 73 4f 76 65 72 6c 61 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 isOverlay)..............{.......
9ca0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 61 6e 67 69 6e 67 20 74 68 65 73 65 20 70 72 6f ...........//.Changing.these.pro
9cc0 70 65 72 74 69 65 73 20 72 65 73 75 6c 74 73 20 69 6e 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f perties.results.in.an.instance.o
9ce0 66 20 74 68 65 20 6d 61 74 65 72 69 61 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 f.the.material..................
9d00 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 m_sharedMaterial.SetFloat(Shader
9d20 55 74 69 6c 69 74 69 65 73 2e 53 68 61 64 65 72 54 61 67 5f 5a 54 65 73 74 4d 6f 64 65 2c 20 30 Utilities.ShaderTag_ZTestMode,.0
9d40 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 72 65 6e 64 65 72 65 72 );..................//m_renderer
9d60 2e 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 22 5f 5a 54 65 73 74 4d 6f 64 65 22 2c .material.SetFloat("_ZTestMode",
9d80 20 38 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 .8);..................m_renderer
9da0 2e 6d 61 74 65 72 69 61 6c 2e 72 65 6e 64 65 72 51 75 65 75 65 20 3d 20 34 30 30 30 3b 0d 0a 0d .material.renderQueue.=.4000;...
9dc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 .................m_sharedMateria
9de0 6c 20 3d 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 l.=.m_renderer.material;........
9e00 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 54 65 78 74 20 73 65 74 20 ..........//Debug.Log("Text.set.
9e20 74 6f 20 4f 76 65 72 6c 61 79 20 6d 6f 64 65 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 to.Overlay.mode.");.............
9e40 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 .}..............else............
9e60 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 68 6f 75 6c 64 20 74 ..{..................//.Should.t
9e80 68 69 73 20 75 73 65 20 61 6e 20 69 6e 73 74 61 6e 63 65 64 20 6d 61 74 65 72 69 61 6c 3f 0d 0a his.use.an.instanced.material?..
9ea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c ................m_sharedMaterial
9ec0 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 53 68 61 64 65 72 .SetFloat(ShaderUtilities.Shader
9ee0 54 61 67 5f 5a 54 65 73 74 4d 6f 64 65 2c 20 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Tag_ZTestMode,.4);..............
9f00 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 2e 72 65 6e 64 65 72 51 75 ....m_renderer.material.renderQu
9f20 65 75 65 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0d 0a 20 20 20 eue.=.-1;.......................
9f40 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 20 .............m_sharedMaterial.=.
9f60 6d 5f 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 m_renderer.material;............
9f80 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 54 65 78 74 20 73 65 74 20 74 6f 20 4e ......//Debug.Log("Text.set.to.N
9fa0 6f 72 6d 61 6c 20 6d 6f 64 65 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 ormal.mode.");..............}...
9fc0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 73 20 74 68 .......}..............//.Sets.th
9fe0 65 20 43 75 6c 6c 69 6e 67 20 6d 6f 64 65 20 6f 66 20 74 68 65 20 6d 61 74 65 72 69 61 6c 0d 0a e.Culling.mode.of.the.material..
a000 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 ........protected.override.void.
a020 53 65 74 43 75 6c 6c 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 SetCulling()..........{.........
a040 20 20 20 20 20 69 66 20 28 6d 5f 69 73 43 75 6c 6c 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 .....if.(m_isCullingEnabled)....
a060 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 ..........{..................m_r
a080 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 22 5f 43 75 6c 6c enderer.material.SetFloat("_Cull
a0a0 4d 6f 64 65 22 2c 20 32 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f Mode",.2);....................fo
a0c0 72 20 28 69 6e 74 20 69 20 3d 20 31 3b 20 69 20 3c 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 r.(int.i.=.1;.i.<.m_subTextObjec
a0e0 74 73 2e 4c 65 6e 67 74 68 20 26 26 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d ts.Length.&&.m_subTextObjects[i]
a100 20 21 3d 20 6e 75 6c 6c 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .!=.null;.i++)..................
a120 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 6e 64 65 72 65 72 20 {......................Renderer.
a140 72 65 6e 64 65 72 65 72 20 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 72 renderer.=.m_subTextObjects[i].r
a160 65 6e 64 65 72 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 enderer;........................
a180 69 66 20 28 72 65 6e 64 65 72 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 if.(renderer.!=.null)...........
a1a0 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
a1c0 20 20 20 20 20 20 72 65 6e 64 65 72 65 72 2e 6d 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 ......renderer.material.SetFloat
a1e0 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 53 68 61 64 65 72 54 61 67 5f 43 75 6c 6c 4d (ShaderUtilities.ShaderTag_CullM
a200 6f 64 65 2c 20 32 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ode,.2);......................}.
a220 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
a240 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 }..............else.............
a260 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 72 65 6e 64 65 72 65 72 2e 6d .{..................m_renderer.m
a280 61 74 65 72 69 61 6c 2e 53 65 74 46 6c 6f 61 74 28 22 5f 43 75 6c 6c 4d 6f 64 65 22 2c 20 30 29 aterial.SetFloat("_CullMode",.0)
a2a0 3b 0d 0a 0d 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 ;....................for.(int.i.
a2c0 3d 20 31 3b 20 69 20 3c 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 68 =.1;.i.<.m_subTextObjects.Length
a2e0 20 26 26 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b .&&.m_subTextObjects[i].!=.null;
a300 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 .i++)..................{........
a320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 6e 64 65 72 65 72 20 72 65 6e 64 65 72 65 72 20 ..............Renderer.renderer.
a340 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 72 65 6e 64 65 72 65 72 3b 0d =.m_subTextObjects[i].renderer;.
a360 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 72 65 6e 64 65 .......................if.(rende
a380 72 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rer.!=.null)....................
a3a0 20 20 7b 0d 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 72 65 6e ..{..........................ren
a3c0 64 65 72 65 72 2e 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 derer.material.SetFloat(ShaderUt
a3e0 69 6c 69 74 69 65 73 2e 53 68 61 64 65 72 54 61 67 5f 43 75 6c 6c 4d 6f 64 65 2c 20 30 29 3b 0d ilities.ShaderTag_CullMode,.0);.
a400 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 .....................}..........
a420 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ........}..............}........
a440 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 50 65 72 73 70 65 63 74 ..}..............//.Set.Perspect
a460 69 76 65 20 43 6f 72 72 65 63 74 69 6f 6e 20 4d 6f 64 65 20 62 61 73 65 64 20 6f 6e 20 77 68 65 ive.Correction.Mode.based.on.whe
a480 74 68 65 72 20 43 61 6d 65 72 61 20 69 73 20 4f 72 74 68 6f 67 72 61 70 68 69 63 20 6f 72 20 50 ther.Camera.is.Orthographic.or.P
a4a0 65 72 73 70 65 63 74 69 76 65 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 53 65 74 50 65 72 73 erspective..........void.SetPers
a4c0 70 65 63 74 69 76 65 43 6f 72 72 65 63 74 69 6f 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a pectiveCorrection()..........{..
a4e0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 4f 72 74 68 6f 67 72 61 70 68 69 63 ............if.(m_isOrthographic
a500 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 )..................m_sharedMater
a520 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 44 5f ial.SetFloat(ShaderUtilities.ID_
a540 50 65 72 73 70 65 63 74 69 76 65 46 69 6c 74 65 72 2c 20 30 2e 30 66 29 3b 0d 0a 20 20 20 20 20 PerspectiveFilter,.0.0f);.......
a560 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 .......else..................m_s
a580 68 61 72 65 64 4d 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 69 haredMaterial.SetFloat(ShaderUti
a5a0 6c 69 74 69 65 73 2e 49 44 5f 50 65 72 73 70 65 63 74 69 76 65 46 69 6c 74 65 72 2c 20 30 2e 38 lities.ID_PerspectiveFilter,.0.8
a5c0 37 35 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 75f);..........}..............//
a5e0 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 20 74 68 65 /.<summary>..........///.Get.the
a600 20 70 61 64 64 69 6e 67 20 76 61 6c 75 65 20 66 6f 72 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 .padding.value.for.the.currently
a620 20 61 73 73 69 67 6e 65 64 20 6d 61 74 65 72 69 61 6c 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f .assigned.material...........///
a640 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e .</summary>..........///.<return
a660 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 s></returns>..........protected.
a680 6f 76 65 72 72 69 64 65 20 66 6c 6f 61 74 20 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 override.float.GetPaddingForMate
a6a0 72 69 61 6c 28 4d 61 74 65 72 69 61 6c 20 6d 61 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 rial(Material.mat)..........{...
a6c0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 53 68 61 64 65 72 55 74 69 ...........m_padding.=.ShaderUti
a6e0 6c 69 74 69 65 73 2e 47 65 74 50 61 64 64 69 6e 67 28 6d 61 74 2c 20 6d 5f 65 6e 61 62 6c 65 45 lities.GetPadding(mat,.m_enableE
a700 78 74 72 61 50 61 64 64 69 6e 67 2c 20 6d 5f 69 73 55 73 69 6e 67 42 6f 6c 64 29 3b 0d 0a 20 20 xtraPadding,.m_isUsingBold);....
a720 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 53 ..........m_isMaskingEnabled.=.S
a740 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 28 haderUtilities.IsMaskingEnabled(
a760 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 m_sharedMaterial);..............
a780 6d 5f 69 73 53 44 46 53 68 61 64 65 72 20 3d 20 6d 61 74 2e 48 61 73 50 72 6f 70 65 72 74 79 28 m_isSDFShader.=.mat.HasProperty(
a7a0 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 57 65 69 67 68 74 4e 6f 72 6d 61 6c 29 ShaderUtilities.ID_WeightNormal)
a7c0 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 70 61 64 64 69 6e ;................return.m_paddin
a7e0 67 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c g;..........}..............///.<
a800 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 20 74 68 65 20 70 61 summary>..........///.Get.the.pa
a820 64 64 69 6e 67 20 76 61 6c 75 65 20 66 6f 72 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 61 73 dding.value.for.the.currently.as
a840 73 69 67 6e 65 64 20 6d 61 74 65 72 69 61 6c 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f signed.material...........///.</
a860 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c summary>..........///.<returns><
a880 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 /returns>..........protected.ove
a8a0 72 72 69 64 65 20 66 6c 6f 61 74 20 47 65 74 50 61 64 64 69 6e 67 46 6f 72 4d 61 74 65 72 69 61 rride.float.GetPaddingForMateria
a8c0 6c 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 68 61 64 l()..........{..............Shad
a8e0 65 72 55 74 69 6c 69 74 69 65 73 2e 47 65 74 53 68 61 64 65 72 50 72 6f 70 65 72 74 79 49 44 73 erUtilities.GetShaderPropertyIDs
a900 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 68 61 72 65 64 4d ();................if.(m_sharedM
a920 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 29 20 72 65 74 75 72 6e 20 30 3b 0d 0a 0d 0a 20 20 aterial.==.null).return.0;......
a940 20 20 20 20 20 20 20 20 20 20 6d 5f 70 61 64 64 69 6e 67 20 3d 20 53 68 61 64 65 72 55 74 69 6c ..........m_padding.=.ShaderUtil
a960 69 74 69 65 73 2e 47 65 74 50 61 64 64 69 6e 67 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 ities.GetPadding(m_sharedMateria
a980 6c 2c 20 6d 5f 65 6e 61 62 6c 65 45 78 74 72 61 50 61 64 64 69 6e 67 2c 20 6d 5f 69 73 55 73 69 l,.m_enableExtraPadding,.m_isUsi
a9a0 6e 67 42 6f 6c 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4d 61 73 6b 69 6e ngBold);..............m_isMaskin
a9c0 67 45 6e 61 62 6c 65 64 20 3d 20 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 73 4d 61 73 gEnabled.=.ShaderUtilities.IsMas
a9e0 6b 69 6e 67 45 6e 61 62 6c 65 64 28 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 3b 0d 0a kingEnabled(m_sharedMaterial);..
aa00 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 53 44 46 53 68 61 64 65 72 20 3d 20 6d 5f 73 68 ............m_isSDFShader.=.m_sh
aa20 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 48 61 73 50 72 6f 70 65 72 74 79 28 53 68 61 64 65 72 55 aredMaterial.HasProperty(ShaderU
aa40 74 69 6c 69 74 69 65 73 2e 49 44 5f 57 65 69 67 68 74 4e 6f 72 6d 61 6c 29 3b 0d 0a 0d 0a 20 20 tilities.ID_WeightNormal);......
aa60 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 70 61 64 64 69 6e 67 3b 0d 0a 20 20 20 ..........return.m_padding;.....
aa80 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 66 75 6e 63 .....}..............//.This.func
aaa0 74 69 6f 6e 20 70 61 72 73 65 73 20 74 68 72 6f 75 67 68 20 74 68 65 20 43 68 61 72 5b 5d 20 74 tion.parses.through.the.Char[].t
aac0 6f 20 64 65 74 65 72 6d 69 6e 65 20 68 6f 77 20 6d 61 6e 79 20 63 68 61 72 61 63 74 65 72 73 20 o.determine.how.many.characters.
aae0 77 69 6c 6c 20 62 65 20 76 69 73 69 62 6c 65 2e 20 49 74 20 74 68 65 6e 20 6d 61 6b 65 73 20 73 will.be.visible..It.then.makes.s
ab00 75 72 65 20 74 68 65 20 61 72 72 61 79 73 20 61 72 65 20 6c 61 72 67 65 20 65 6e 6f 75 67 68 20 ure.the.arrays.are.large.enough.
ab20 66 6f 72 20 61 6c 6c 20 74 68 6f 73 65 20 63 68 61 72 61 63 74 65 72 73 2e 0d 0a 20 20 20 20 20 for.all.those.characters........
ab40 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 69 6e 74 20 53 65 74 41 72 72 ...protected.override.int.SetArr
ab60 61 79 53 69 7a 65 73 28 55 6e 69 63 6f 64 65 43 68 61 72 5b 5d 20 63 68 61 72 73 29 0d 0a 20 20 aySizes(UnicodeChar[].chars)....
ab80 20 20 20 20 20 20 7b 0d 0a 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
aba0 28 22 2a 2a 2a 20 53 65 74 41 72 72 61 79 53 69 7a 65 73 28 29 20 2a 2a 2a 22 29 3b 0d 0a 0d 0a ("***.SetArraySizes().***");....
abc0 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 73 70 72 69 74 65 43 6f 75 6e 74 20 3d 20 30 3b ............int.spriteCount.=.0;
abe0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 ................m_totalCharacter
ac00 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 55 73 69 6e Count.=.0;..............m_isUsin
ac20 67 42 6f 6c 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 gBold.=.false;..............m_is
ac40 50 61 72 73 69 6e 67 54 65 78 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ParsingText.=.false;............
ac60 20 20 74 61 67 5f 4e 6f 50 61 72 73 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 ..tag_NoParsing.=.false;........
ac80 20 20 20 20 20 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 3d 20 6d 5f 66 6f ......m_FontStyleInternal.=.m_fo
aca0 6e 74 53 74 79 6c 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 57 65 ntStyle;................m_FontWe
acc0 69 67 68 74 49 6e 74 65 72 6e 61 6c 20 3d 20 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 ightInternal.=.(m_FontStyleInter
ace0 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 53 74 nal.&.FontStyles.Bold).==.FontSt
ad00 79 6c 65 73 2e 42 6f 6c 64 20 3f 20 46 6f 6e 74 57 65 69 67 68 74 2e 42 6f 6c 64 20 3a 20 6d 5f yles.Bold.?.FontWeight.Bold.:.m_
ad20 66 6f 6e 74 57 65 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 57 fontWeight;..............m_FontW
ad40 65 69 67 68 74 53 74 61 63 6b 2e 53 65 74 44 65 66 61 75 6c 74 28 6d 5f 46 6f 6e 74 57 65 69 67 eightStack.SetDefault(m_FontWeig
ad60 68 74 49 6e 74 65 72 6e 61 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 htInternal);................m_cu
ad80 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 rrentFontAsset.=.m_fontAsset;...
ada0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d ...........m_currentMaterial.=.m
adc0 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f _sharedMaterial;..............m_
ade0 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 currentMaterialIndex.=.0;.......
ae00 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 53 74 61 63 .........m_materialReferenceStac
ae20 6b 2e 53 65 74 44 65 66 61 75 6c 74 28 6e 65 77 20 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e k.SetDefault(new.MaterialReferen
ae40 63 65 28 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 2c 20 6d 5f 63 75 72 ce(m_currentMaterialIndex,.m_cur
ae60 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2c 20 6e 75 6c 6c 2c 20 6d 5f 63 75 72 72 65 6e 74 4d 61 rentFontAsset,.null,.m_currentMa
ae80 74 65 72 69 61 6c 2c 20 6d 5f 70 61 64 64 69 6e 67 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 terial,.m_padding));............
aea0 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 4c 6f 6f 6b ....m_materialReferenceIndexLook
aec0 75 70 2e 43 6c 65 61 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4d 61 74 65 72 69 61 up.Clear();..............Materia
aee0 6c 52 65 66 65 72 65 6e 63 65 2e 41 64 64 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 28 lReference.AddMaterialReference(
af00 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2c 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 m_currentMaterial,.m_currentFont
af20 41 73 73 65 74 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 2c 20 6d 5f 6d Asset,.m_materialReferences,.m_m
af40 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 4c 6f 6f 6b 75 70 29 3b 0d 0a 0d aterialReferenceIndexLookup);...
af60 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 20 3d 3d 20 6e .............if.(m_textInfo.==.n
af80 75 6c 6c 29 20 6d 5f 74 65 78 74 49 6e 66 6f 20 3d 20 6e 65 77 20 54 4d 50 5f 54 65 78 74 49 6e ull).m_textInfo.=.new.TMP_TextIn
afa0 66 6f 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 fo();..............m_textElement
afc0 54 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 Type.=.TMP_TextElementType.Chara
afe0 63 74 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 4c 69 cter;................//.Clear.Li
b000 6e 6b 65 64 20 54 65 78 74 20 6f 62 6a 65 63 74 20 69 66 20 77 65 20 68 61 76 65 20 6f 6e 65 2e nked.Text.object.if.we.have.one.
b020 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 6b 65 64 54 65 78 74 43 6f ..............if.(m_linkedTextCo
b040 6d 70 6f 6e 65 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d mponent.!=.null)..............{.
b060 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 6b 65 64 54 65 78 74 43 6f 6d .................m_linkedTextCom
b080 70 6f 6e 65 6e 74 2e 74 65 78 74 20 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a 20 20 20 ponent.text.=.string.Empty;.....
b0a0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 6b 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 .............m_linkedTextCompone
b0c0 6e 74 2e 46 6f 72 63 65 4d 65 73 68 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 nt.ForceMeshUpdate();...........
b0e0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 72 73 69 6e 67 20 58 ...}................//.Parsing.X
b100 4d 4c 20 74 61 67 73 20 69 6e 20 74 68 65 20 74 65 78 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ML.tags.in.the.text.............
b120 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 63 68 61 72 73 2e 4c 65 6e 67 74 .for.(int.i.=.0;.i.<.chars.Lengt
b140 68 20 26 26 20 63 68 61 72 73 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 21 3d 20 30 3b 20 69 2b 2b 29 h.&&.chars[i].unicode.!=.0;.i++)
b160 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
b180 20 2f 2f 4d 61 6b 65 20 73 75 72 65 20 74 68 65 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 20 61 .//Make.sure.the.characterInfo.a
b1a0 72 72 61 79 20 63 61 6e 20 68 6f 6c 64 20 74 68 65 20 6e 65 78 74 20 74 65 78 74 20 65 6c 65 6d rray.can.hold.the.next.text.elem
b1c0 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 ent...................if.(m_text
b1e0 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f Info.characterInfo.==.null.||.m_
b200 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3e 3d 20 6d 5f 74 65 78 74 49 6e 66 totalCharacterCount.>=.m_textInf
b220 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 20 o.characterInfo.Length).........
b240 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 49 6e 66 6f 2e 52 65 73 69 7a 65 .............TMP_TextInfo.Resize
b260 28 72 65 66 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 2c 20 6d (ref.m_textInfo.characterInfo,.m
b280 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 20 31 2c 20 74 72 75 65 29 3b _totalCharacterCount.+.1,.true);
b2a0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 75 6e 69 63 6f 64 65 20 ....................int.unicode.
b2c0 3d 20 28 69 6e 74 29 63 68 61 72 73 5b 69 5d 2e 75 6e 69 63 6f 64 65 3b 0d 0a 0d 0a 20 20 20 20 =.(int)chars[i].unicode;........
b2e0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 41 52 53 45 20 58 4d 4c 20 54 41 47 53 0d 0a 20 ............//.PARSE.XML.TAGS...
b300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 50 41 52 53 45 20 58 4d 4c ...............#region.PARSE.XML
b320 20 54 41 47 53 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 52 .TAGS..................if.(m_isR
b340 69 63 68 54 65 78 74 20 26 26 20 75 6e 69 63 6f 64 65 20 3d 3d 20 36 30 29 20 2f 2f 20 69 66 20 ichText.&&.unicode.==.60).//.if.
b360 43 68 61 72 20 27 3c 27 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 Char.'<'..................{.....
b380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 70 72 65 76 5f 4d 61 74 65 72 69 .................int.prev_Materi
b3a0 61 6c 49 6e 64 65 78 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 alIndex.=.m_currentMaterialIndex
b3c0 3b 0d 0a 0d 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 68 65 63 ;........................//.Chec
b3e0 6b 20 69 66 20 54 61 67 20 69 73 20 56 61 6c 69 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 k.if.Tag.is.Valid...............
b400 20 20 20 20 20 20 20 69 66 20 28 56 61 6c 69 64 61 74 65 48 74 6d 6c 54 61 67 28 63 68 61 72 73 .......if.(ValidateHtmlTag(chars
b420 2c 20 69 20 2b 20 31 2c 20 6f 75 74 20 69 6e 74 20 74 61 67 45 6e 64 29 29 0d 0a 20 20 20 20 20 ,.i.+.1,.out.int.tagEnd)).......
b440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
b460 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 74 61 67 53 74 61 72 74 49 6e 64 65 78 20 3d 20 63 68 ..........int.tagStartIndex.=.ch
b480 61 72 73 5b 69 5d 2e 73 74 72 69 6e 67 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ars[i].stringIndex;.............
b4a0 20 20 20 20 20 20 20 20 20 20 20 20 20 69 20 3d 20 74 61 67 45 6e 64 3b 0d 0a 0d 0a 20 20 20 20 .............i.=.tagEnd;........
b4c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6f 6e 74 53 ....................if.((m_FontS
b4e0 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 20 tyleInternal.&.FontStyles.Bold).
b500 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 20 6d 5f 69 73 55 73 69 6e 67 42 6f 6c ==.FontStyles.Bold).m_isUsingBol
b520 64 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 d.=.true;.......................
b540 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d .....if.(m_textElementType.==.TM
b560 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 53 70 72 69 74 65 29 0d 0a 20 20 20 20 20 P_TextElementType.Sprite).......
b580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
b5a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 ..................m_materialRefe
b5c0 72 65 6e 63 65 73 5b 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 72 rences[m_currentMaterialIndex].r
b5e0 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 eferenceCount.+=.1;.............
b600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 ...................m_textInfo.ch
b620 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e aracterInfo[m_totalCharacterCoun
b640 74 5d 2e 63 68 61 72 61 63 74 65 72 20 3d 20 28 63 68 61 72 29 28 35 37 33 34 34 20 2b 20 6d 5f t].character.=.(char)(57344.+.m_
b660 73 70 72 69 74 65 49 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 spriteIndex);...................
b680 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 ...........m_textInfo.characterI
b6a0 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 nfo[m_totalCharacterCount].sprit
b6c0 65 49 6e 64 65 78 20 3d 20 6d 5f 73 70 72 69 74 65 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 eIndex.=.m_spriteIndex;.........
b6e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e .....................m_textInfo.
b700 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f characterInfo[m_totalCharacterCo
b720 75 6e 74 5d 2e 66 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 unt].fontAsset.=.m_currentFontAs
b740 73 65 74 3b 0d 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 set;............................
b760 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 ..m_textInfo.characterInfo[m_tot
b780 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 65 41 73 73 65 74 20 3d 20 alCharacterCount].spriteAsset.=.
b7a0 6d 5f 63 75 72 72 65 6e 74 53 70 72 69 74 65 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 m_currentSpriteAsset;...........
b7c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 ...................m_textInfo.ch
b7e0 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e aracterInfo[m_totalCharacterCoun
b800 74 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 20 3d 20 6d 5f 63 75 t].materialReferenceIndex.=.m_cu
b820 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rrentMaterialIndex;.............
b840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 .................m_textInfo.char
b860 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d acterInfo[m_totalCharacterCount]
b880 2e 74 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 6d 5f 63 75 72 72 65 6e 74 53 70 72 69 74 65 41 73 .textElement.=.m_currentSpriteAs
b8a0 73 65 74 2e 73 70 72 69 74 65 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 5b 6d 5f 73 70 72 69 74 set.spriteCharacterTable[m_sprit
b8c0 65 49 6e 64 65 78 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eIndex];........................
b8e0 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d ......m_textInfo.characterInfo[m
b900 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 65 6c 65 6d 65 6e 74 54 79 70 _totalCharacterCount].elementTyp
b920 65 20 3d 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 e.=.m_textElementType;..........
b940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 ....................m_textInfo.c
b960 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 haracterInfo[m_totalCharacterCou
b980 6e 74 5d 2e 69 6e 64 65 78 20 3d 20 74 61 67 53 74 61 72 74 49 6e 64 65 78 3b 0d 0a 20 20 20 20 nt].index.=.tagStartIndex;......
b9a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e ........................m_textIn
b9c0 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 fo.characterInfo[m_totalCharacte
b9e0 72 43 6f 75 6e 74 5d 2e 73 74 72 69 6e 67 4c 65 6e 67 74 68 20 3d 20 63 68 61 72 73 5b 69 5d 2e rCount].stringLength.=.chars[i].
ba00 73 74 72 69 6e 67 49 6e 64 65 78 20 2d 20 74 61 67 53 74 61 72 74 49 6e 64 65 78 20 2b 20 31 3b stringIndex.-.tagStartIndex.+.1;
ba20 0d 0a 0d 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 20 20 ................................
ba40 2f 2f 20 52 65 73 74 6f 72 65 20 65 6c 65 6d 65 6e 74 20 74 79 70 65 20 61 6e 64 20 6d 61 74 65 //.Restore.element.type.and.mate
ba60 72 69 61 6c 20 69 6e 64 65 78 20 74 6f 20 70 72 65 76 69 6f 75 73 20 76 61 6c 75 65 73 2e 0d 0a rial.index.to.previous.values...
ba80 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 20 6d 5f 74 65 ............................m_te
baa0 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 xtElementType.=.TMP_TextElementT
bac0 79 70 65 2e 43 68 61 72 61 63 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ype.Character;..................
bae0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 ............m_currentMaterialInd
bb00 65 78 20 3d 20 70 72 65 76 5f 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 ex.=.prev_MaterialIndex;........
bb20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 70 72 69 74 65 43 6f ........................spriteCo
bb40 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 unt.+=.1;.......................
bb60 20 20 20 20 20 20 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 .......m_totalCharacterCount.+=.
bb80 31 3b 0d 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 7d 0d 0a 0d 1;..........................}...
bba0 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
bbc0 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 e;......................}.......
bbe0 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 ...........}..................#e
bc00 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c ndregion....................bool
bc20 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 20 3d 20 66 61 .isUsingAlternativeTypeface.=.fa
bc40 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 55 73 69 lse;..................bool.isUsi
bc60 6e 67 46 61 6c 6c 62 61 63 6b 4f 72 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 20 ngFallbackOrAlternativeTypeface.
bc80 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f =.false;....................TMP_
bca0 43 68 61 72 61 63 74 65 72 20 63 68 61 72 61 63 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 Character.character;............
bcc0 20 20 20 20 20 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 ......TMP_FontAsset.tempFontAsse
bce0 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 t;..................TMP_FontAsse
bd00 74 20 70 72 65 76 5f 66 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 t.prev_fontAsset.=.m_currentFont
bd20 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 61 74 65 72 69 61 6c Asset;..................Material
bd40 20 70 72 65 76 5f 6d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 .prev_material.=.m_currentMateri
bd60 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 70 72 65 76 5f 6d 61 al;..................int.prev_ma
bd80 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 terialIndex.=.m_currentMaterialI
bda0 6e 64 65 78 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 ndex;......................//.Ha
bdc0 6e 64 6c 65 20 46 6f 6e 74 20 53 74 79 6c 65 73 20 6c 69 6b 65 20 4c 6f 77 65 72 43 61 73 65 2c ndle.Font.Styles.like.LowerCase,
bde0 20 55 70 70 65 72 43 61 73 65 20 61 6e 64 20 53 6d 61 6c 6c 43 61 70 73 2e 0d 0a 20 20 20 20 20 .UpperCase.and.SmallCaps........
be00 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 69 6e 67 20 6f 66 20 4c ...........#region.Handling.of.L
be20 6f 77 65 72 43 61 73 65 2c 20 55 70 70 65 72 43 61 73 65 20 61 6e 64 20 53 6d 61 6c 6c 43 61 70 owerCase,.UpperCase.and.SmallCap
be40 73 20 46 6f 6e 74 20 53 74 79 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 s.Font.Styles..................i
be60 66 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 f.(m_textElementType.==.TMP_Text
be80 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 ElementType.Character)..........
bea0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 ........{......................i
bec0 66 20 28 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 f.((m_FontStyleInternal.&.FontSt
bee0 79 6c 65 73 2e 55 70 70 65 72 43 61 73 65 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 55 70 yles.UpperCase).==.FontStyles.Up
bf00 70 65 72 43 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d perCase)......................{.
bf20 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 2f 2f 20 49 66 20 74 .........................//.If.t
bf40 68 69 73 20 63 68 61 72 61 63 74 65 72 20 69 73 20 6c 6f 77 65 72 63 61 73 65 2c 20 73 77 69 74 his.character.is.lowercase,.swit
bf60 63 68 20 74 6f 20 75 70 70 65 72 63 61 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ch.to.uppercase.................
bf80 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 4c 6f 77 65 72 28 28 63 68 61 72 ..........if.(char.IsLower((char
bfa0 29 75 6e 69 63 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )unicode))......................
bfc0 20 20 20 20 20 20 20 20 75 6e 69 63 6f 64 65 20 3d 20 63 68 61 72 2e 54 6f 55 70 70 65 72 28 28 ........unicode.=.char.ToUpper((
bfe0 63 68 61 72 29 75 6e 69 63 6f 64 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 char)unicode);..................
c000 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 ......}......................els
c020 65 20 69 66 20 28 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e e.if.((m_FontStyleInternal.&.Fon
c040 74 53 74 79 6c 65 73 2e 4c 6f 77 65 72 43 61 73 65 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 tStyles.LowerCase).==.FontStyles
c060 2e 4c 6f 77 65 72 43 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .LowerCase).....................
c080 20 7b 0d 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 2f 2f 20 49 .{..........................//.I
c0a0 66 20 74 68 69 73 20 63 68 61 72 61 63 74 65 72 20 69 73 20 75 70 70 65 72 63 61 73 65 2c 20 73 f.this.character.is.uppercase,.s
c0c0 77 69 74 63 68 20 74 6f 20 6c 6f 77 65 72 63 61 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 witch.to.lowercase..............
c0e0 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 55 70 70 65 72 28 28 63 .............if.(char.IsUpper((c
c100 68 61 72 29 75 6e 69 63 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 har)unicode))...................
c120 20 20 20 20 20 20 20 20 20 20 20 75 6e 69 63 6f 64 65 20 3d 20 63 68 61 72 2e 54 6f 4c 6f 77 65 ...........unicode.=.char.ToLowe
c140 72 28 28 63 68 61 72 29 75 6e 69 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 r((char)unicode);...............
c160 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c .......}......................el
c180 73 65 20 69 66 20 28 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f se.if.((m_FontStyleInternal.&.Fo
c1a0 6e 74 53 74 79 6c 65 73 2e 53 6d 61 6c 6c 43 61 70 73 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 ntStyles.SmallCaps).==.FontStyle
c1c0 73 2e 53 6d 61 6c 6c 43 61 70 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.SmallCaps)....................
c1e0 20 20 7b 0d 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 2f 2f 20 ..{..........................//.
c200 4f 6e 6c 79 20 63 6f 6e 76 65 72 74 20 6c 6f 77 65 72 63 61 73 65 20 63 68 61 72 61 63 74 65 72 Only.convert.lowercase.character
c220 73 20 74 6f 20 75 70 70 65 72 63 61 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.to.uppercase..................
c240 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 4c 6f 77 65 72 28 28 63 68 61 72 29 .........if.(char.IsLower((char)
c260 75 6e 69 63 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 unicode)).......................
c280 20 20 20 20 20 20 20 75 6e 69 63 6f 64 65 20 3d 20 63 68 61 72 2e 54 6f 55 70 70 65 72 28 28 63 .......unicode.=.char.ToUpper((c
c2a0 68 61 72 29 75 6e 69 63 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 har)unicode);...................
c2c0 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ...}..................}.........
c2e0 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 .........#endregion.............
c300 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 6f 6f 6b 75 70 20 74 68 65 20 47 6c 79 70 68 20 64 61 74 .........//.Lookup.the.Glyph.dat
c320 61 20 66 6f 72 20 65 61 63 68 20 63 68 61 72 61 63 74 65 72 20 61 6e 64 20 63 61 63 68 65 20 69 a.for.each.character.and.cache.i
c340 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 4c 4f 4f 4b t...................#region.LOOK
c360 55 50 20 47 4c 59 50 48 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 UP.GLYPH..................charac
c380 74 65 72 20 3d 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 ter.=.TMP_FontAssetUtilities.Get
c3a0 43 68 61 72 61 63 74 65 72 46 72 6f 6d 46 6f 6e 74 41 73 73 65 74 28 28 75 69 6e 74 29 75 6e 69 CharacterFromFontAsset((uint)uni
c3c0 63 6f 64 65 2c 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2c 20 66 61 6c 73 65 2c code,.m_currentFontAsset,.false,
c3e0 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 .m_FontStyleInternal,.m_FontWeig
c400 68 74 49 6e 74 65 72 6e 61 6c 2c 20 6f 75 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 htInternal,.out.isUsingAlternati
c420 76 65 54 79 70 65 66 61 63 65 2c 20 6f 75 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d veTypeface,.out.tempFontAsset);.
c440 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 61 72 63 68 20 66 6f 72 ...................//.Search.for
c460 20 74 68 65 20 67 6c 79 70 68 20 69 6e 20 74 68 65 20 6c 69 73 74 20 6f 66 20 66 61 6c 6c 62 61 .the.glyph.in.the.list.of.fallba
c480 63 6b 20 61 73 73 69 67 6e 65 64 20 74 6f 20 74 68 65 20 70 72 69 6d 61 72 79 20 66 6f 6e 74 20 ck.assigned.to.the.primary.font.
c4a0 61 73 73 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 asset...................if.(char
c4c0 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 acter.==.null)..................
c4e0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 75 72 {......................if.(m_cur
c500 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 rentFontAsset.fallbackFontAssetT
c520 61 62 6c 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 able.!=.null.&&.m_currentFontAss
c540 65 74 2e 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 et.fallbackFontAssetTable.Count.
c560 3e 20 30 29 0d 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 68 >.0)..........................ch
c580 61 72 61 63 74 65 72 20 3d 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 65 73 aracter.=.TMP_FontAssetUtilities
c5a0 2e 47 65 74 43 68 61 72 61 63 74 65 72 46 72 6f 6d 46 6f 6e 74 41 73 73 65 74 73 28 28 75 69 6e .GetCharacterFromFontAssets((uin
c5c0 74 29 75 6e 69 63 6f 64 65 2c 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 t)unicode,.m_currentFontAsset.fa
c5e0 6c 6c 62 61 63 6b 46 6f 6e 74 41 73 73 65 74 54 61 62 6c 65 2c 20 74 72 75 65 2c 20 6d 5f 46 6f llbackFontAssetTable,.true,.m_Fo
c600 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 ntStyleInternal,.m_FontWeightInt
c620 65 72 6e 61 6c 2c 20 6f 75 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 ernal,.out.isUsingAlternativeTyp
c640 65 66 61 63 65 2c 20 6f 75 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d 0a 20 20 20 20 eface,.out.tempFontAsset);......
c660 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............}...................
c680 20 2f 2f 20 53 65 61 72 63 68 20 66 6f 72 20 74 68 65 20 67 6c 79 70 68 20 69 6e 20 74 68 65 20 .//.Search.for.the.glyph.in.the.
c6a0 53 70 72 69 74 65 20 41 73 73 65 74 20 61 73 73 69 67 6e 65 64 20 74 6f 20 74 68 65 20 74 65 78 Sprite.Asset.assigned.to.the.tex
c6c0 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 t.object...................if.(c
c6e0 68 61 72 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 haracter.==.null)...............
c700 20 20 20 7b 0d 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 53 70 ...{......................TMP_Sp
c720 72 69 74 65 41 73 73 65 74 20 73 70 72 69 74 65 41 73 73 65 74 20 3d 20 74 68 69 73 2e 73 70 72 riteAsset.spriteAsset.=.this.spr
c740 69 74 65 41 73 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 iteAsset;.......................
c760 20 69 66 20 28 73 70 72 69 74 65 41 73 73 65 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 .if.(spriteAsset.!=.null).......
c780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
c7a0 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 73 70 72 69 74 65 49 6e 64 65 78 20 3d 20 2d 31 3b 0d ..........int.spriteIndex.=.-1;.
c7c0 0a 0d 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 2f 2f 20 43 68 ...........................//.Ch
c7e0 65 63 6b 20 44 65 66 61 75 6c 74 20 53 70 72 69 74 65 20 41 73 73 65 74 20 61 6e 64 20 69 74 73 eck.Default.Sprite.Asset.and.its
c800 20 46 61 6c 6c 62 61 63 6b 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Fallbacks......................
c820 20 20 20 20 73 70 72 69 74 65 41 73 73 65 74 20 3d 20 54 4d 50 5f 53 70 72 69 74 65 41 73 73 65 ....spriteAsset.=.TMP_SpriteAsse
c840 74 2e 53 65 61 72 63 68 46 6f 72 53 70 72 69 74 65 42 79 55 6e 69 63 6f 64 65 28 73 70 72 69 74 t.SearchForSpriteByUnicode(sprit
c860 65 41 73 73 65 74 2c 20 28 75 69 6e 74 29 75 6e 69 63 6f 64 65 2c 20 74 72 75 65 2c 20 6f 75 74 eAsset,.(uint)unicode,.true,.out
c880 20 73 70 72 69 74 65 49 6e 64 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .spriteIndex);..................
c8a0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 70 72 69 74 65 49 6e 64 65 78 20 21 3d 20 2d 31 29 ..........if.(spriteIndex.!=.-1)
c8c0 0d 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 7b 0d 0a 20 20 20 ..........................{.....
c8e0 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 6d 5f 74 65 78 74 45 .........................m_textE
c900 6c 65 6d 65 6e 74 54 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 lementType.=.TMP_TextElementType
c920 2e 53 70 72 69 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Sprite;........................
c940 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d ......m_textInfo.characterInfo[m
c960 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 65 6c 65 6d 65 6e 74 54 79 70 _totalCharacterCount].elementTyp
c980 65 20 3d 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 e.=.m_textElementType;..........
c9a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d ......................m_currentM
c9c0 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 aterialIndex.=.MaterialReference
c9e0 2e 41 64 64 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 28 73 70 72 69 74 65 41 73 73 65 .AddMaterialReference(spriteAsse
ca00 74 2e 6d 61 74 65 72 69 61 6c 2c 20 73 70 72 69 74 65 41 73 73 65 74 2c 20 6d 5f 6d 61 74 65 72 t.material,.spriteAsset,.m_mater
ca20 69 61 6c 52 65 66 65 72 65 6e 63 65 73 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e ialReferences,.m_materialReferen
ca40 63 65 49 6e 64 65 78 4c 6f 6f 6b 75 70 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ceIndexLookup);.................
ca60 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 .............m_materialReference
ca80 73 5b 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 72 65 66 65 72 65 s[m_currentMaterialIndex].refere
caa0 6e 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nceCount.+=.1;..................
cac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 ..............m_textInfo.charact
cae0 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 63 68 erInfo[m_totalCharacterCount].ch
cb00 61 72 61 63 74 65 72 20 3d 20 28 63 68 61 72 29 75 6e 69 63 6f 64 65 3b 0d 0a 20 20 20 20 20 20 aracter.=.(char)unicode;........
cb20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f ......................m_textInfo
cb40 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 .characterInfo[m_totalCharacterC
cb60 6f 75 6e 74 5d 2e 73 70 72 69 74 65 49 6e 64 65 78 20 3d 20 73 70 72 69 74 65 49 6e 64 65 78 3b ount].spriteIndex.=.spriteIndex;
cb80 0d 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 20 20 6d 5f ..............................m_
cba0 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 textInfo.characterInfo[m_totalCh
cbc0 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 66 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 63 75 72 72 aracterCount].fontAsset.=.m_curr
cbe0 65 6e 74 46 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 entFontAsset;...................
cc00 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 ...........m_textInfo.characterI
cc20 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 nfo[m_totalCharacterCount].sprit
cc40 65 41 73 73 65 74 20 3d 20 73 70 72 69 74 65 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 eAsset.=.spriteAsset;...........
cc60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 ...................m_textInfo.ch
cc80 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e aracterInfo[m_totalCharacterCoun
cca0 74 5d 2e 74 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 73 70 72 69 74 65 41 73 73 65 74 2e 73 70 72 t].textElement.=.spriteAsset.spr
ccc0 69 74 65 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 5b 6d 5f 73 70 72 69 74 65 49 6e 64 65 78 5d iteCharacterTable[m_spriteIndex]
cce0 3b 0d 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 20 20 6d ;..............................m
cd00 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 _textInfo.characterInfo[m_totalC
cd20 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 haracterCount].materialReference
cd40 49 6e 64 65 78 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d Index.=.m_currentMaterialIndex;.
cd60 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 20 20 6d 5f 74 .............................m_t
cd80 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 extInfo.characterInfo[m_totalCha
cda0 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 6e 64 65 78 20 3d 20 63 68 61 72 73 5b 69 5d 2e 73 74 racterCount].index.=.chars[i].st
cdc0 72 69 6e 67 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ringIndex;......................
cde0 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f ........m_textInfo.characterInfo
ce00 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 74 72 69 6e 67 4c 65 [m_totalCharacterCount].stringLe
ce20 6e 67 74 68 20 3d 20 63 68 61 72 73 5b 69 5d 2e 6c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 ngth.=.chars[i].length;.........
ce40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 74 6f 72 .......................//.Restor
ce60 65 20 65 6c 65 6d 65 6e 74 20 74 79 70 65 20 61 6e 64 20 6d 61 74 65 72 69 61 6c 20 69 6e 64 65 e.element.type.and.material.inde
ce80 78 20 74 6f 20 70 72 65 76 69 6f 75 73 20 76 61 6c 75 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 x.to.previous.values............
cea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 ...................m_textElement
cec0 54 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 Type.=.TMP_TextElementType.Chara
cee0 63 74 65 72 3b 0d 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 cter;...........................
cf00 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 70 72 65 76 ...m_currentMaterialIndex.=.prev
cf20 5f 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 _materialIndex;.................
cf40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 70 72 69 74 65 43 6f 75 6e 74 20 2b 3d 20 31 3b ...............spriteCount.+=.1;
cf60 0d 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 20 20 6d 5f ..............................m_
cf80 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 totalCharacterCount.+=.1;.......
cfa0 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 63 6f 6e 74 69 6e 75 .........................continu
cfc0 65 3b 0d 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 7d 0d 0a 20 e;..........................}...
cfe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................}............
d000 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 ......}....................//.Se
d020 61 72 63 68 20 66 6f 72 20 74 68 65 20 67 6c 79 70 68 20 69 6e 20 74 68 65 20 6c 69 73 74 20 6f arch.for.the.glyph.in.the.list.o
d040 66 20 66 61 6c 6c 62 61 63 6b 20 61 73 73 69 67 6e 65 64 20 69 6e 20 74 68 65 20 54 4d 50 20 53 f.fallback.assigned.in.the.TMP.S
d060 65 74 74 69 6e 67 73 20 28 47 65 6e 65 72 61 6c 20 46 61 6c 6c 62 61 63 6b 73 29 2e 0d 0a 20 20 ettings.(General.Fallbacks).....
d080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d 20 6e ..............if.(character.==.n
d0a0 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ull)..................{.........
d0c0 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 66 61 .............if.(TMP_Settings.fa
d0e0 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 54 4d 50 5f llbackFontAssets.!=.null.&&.TMP_
d100 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 2e 43 6f 75 6e Settings.fallbackFontAssets.Coun
d120 74 20 3e 20 30 29 0d 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 t.>.0)..........................
d140 63 68 61 72 61 63 74 65 72 20 3d 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 character.=.TMP_FontAssetUtiliti
d160 65 73 2e 47 65 74 43 68 61 72 61 63 74 65 72 46 72 6f 6d 46 6f 6e 74 41 73 73 65 74 73 28 28 75 es.GetCharacterFromFontAssets((u
d180 69 6e 74 29 75 6e 69 63 6f 64 65 2c 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 66 61 6c 6c 62 61 int)unicode,.TMP_Settings.fallba
d1a0 63 6b 46 6f 6e 74 41 73 73 65 74 73 2c 20 74 72 75 65 2c 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 ckFontAssets,.true,.m_FontStyleI
d1c0 6e 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 65 72 6e 61 6c 2c 20 6f nternal,.m_FontWeightInternal,.o
d1e0 75 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 2c 20 6f ut.isUsingAlternativeTypeface,.o
d200 75 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ut.tempFontAsset);..............
d220 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 61 72 ....}....................//.Sear
d240 63 68 20 66 6f 72 20 74 68 65 20 67 6c 79 70 68 20 69 6e 20 74 68 65 20 44 65 66 61 75 6c 74 20 ch.for.the.glyph.in.the.Default.
d260 46 6f 6e 74 20 41 73 73 65 74 20 61 73 73 69 67 6e 65 64 20 69 6e 20 74 68 65 20 54 4d 50 20 53 Font.Asset.assigned.in.the.TMP.S
d280 65 74 74 69 6e 67 73 20 66 69 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 ettings.file...................i
d2a0 66 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 f.(character.==.null)...........
d2c0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .......{......................if
d2e0 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 73 65 74 20 .(TMP_Settings.defaultFontAsset.
d300 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 !=.null)........................
d320 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 ..character.=.TMP_FontAssetUtili
d340 74 69 65 73 2e 47 65 74 43 68 61 72 61 63 74 65 72 46 72 6f 6d 46 6f 6e 74 41 73 73 65 74 28 28 ties.GetCharacterFromFontAsset((
d360 75 69 6e 74 29 75 6e 69 63 6f 64 65 2c 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 64 65 66 61 75 uint)unicode,.TMP_Settings.defau
d380 6c 74 46 6f 6e 74 41 73 73 65 74 2c 20 74 72 75 65 2c 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e ltFontAsset,.true,.m_FontStyleIn
d3a0 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 65 72 6e 61 6c 2c 20 6f 75 ternal,.m_FontWeightInternal,.ou
d3c0 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 2c 20 6f 75 t.isUsingAlternativeTypeface,.ou
d3e0 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 t.tempFontAsset);...............
d400 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 3a ...}....................//.TODO:
d420 20 41 64 64 20 73 75 70 70 6f 72 74 20 66 6f 72 20 75 73 69 6e 67 20 53 70 72 69 74 65 20 41 73 .Add.support.for.using.Sprite.As
d440 73 65 74 73 20 6c 69 6b 65 20 61 20 73 70 65 63 69 61 6c 20 45 6d 6f 6a 69 20 6f 6e 6c 79 20 53 sets.like.a.special.Emoji.only.S
d460 70 72 69 74 65 20 41 73 73 65 74 20 77 68 65 6e 20 55 54 46 31 36 20 6f 72 20 55 54 46 33 32 20 prite.Asset.when.UTF16.or.UTF32.
d480 67 6c 79 70 68 73 20 61 72 65 20 72 65 71 75 65 73 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 glyphs.are.requested............
d4a0 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 20 77 6f 75 6c 64 20 6b 69 6e 64 20 6f 66 20 6d 69 72 .......//.This.would.kind.of.mir
d4c0 72 6f 72 20 6e 61 74 69 76 65 20 45 6d 6f 6a 69 20 73 75 70 70 6f 72 74 2e 0d 0a 20 20 20 20 20 ror.native.Emoji.support........
d4e0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c ...........if.(character.==.null
d500 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 )..................{............
d520 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 53 70 72 69 74 65 41 73 73 65 74 20 73 70 72 69 74 65 ..........TMP_SpriteAsset.sprite
d540 41 73 73 65 74 20 3d 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 64 65 66 61 75 6c 74 53 70 72 69 Asset.=.TMP_Settings.defaultSpri
d560 74 65 41 73 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 teAsset;........................
d580 69 66 20 28 73 70 72 69 74 65 41 73 73 65 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 if.(spriteAsset.!=.null)........
d5a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
d5c0 20 20 20 20 20 20 20 20 20 69 6e 74 20 73 70 72 69 74 65 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a .........int.spriteIndex.=.-1;..
d5e0 0d 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 2f 2f 20 43 68 65 ..........................//.Che
d600 63 6b 20 44 65 66 61 75 6c 74 20 53 70 72 69 74 65 20 41 73 73 65 74 20 61 6e 64 20 69 74 73 20 ck.Default.Sprite.Asset.and.its.
d620 46 61 6c 6c 62 61 63 6b 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Fallbacks.......................
d640 20 20 20 73 70 72 69 74 65 41 73 73 65 74 20 3d 20 54 4d 50 5f 53 70 72 69 74 65 41 73 73 65 74 ...spriteAsset.=.TMP_SpriteAsset
d660 2e 53 65 61 72 63 68 46 6f 72 53 70 72 69 74 65 42 79 55 6e 69 63 6f 64 65 28 73 70 72 69 74 65 .SearchForSpriteByUnicode(sprite
d680 41 73 73 65 74 2c 20 28 75 69 6e 74 29 75 6e 69 63 6f 64 65 2c 20 74 72 75 65 2c 20 6f 75 74 20 Asset,.(uint)unicode,.true,.out.
d6a0 73 70 72 69 74 65 49 6e 64 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 spriteIndex);...................
d6c0 20 20 20 20 20 20 20 20 20 69 66 20 28 73 70 72 69 74 65 49 6e 64 65 78 20 21 3d 20 2d 31 29 0d .........if.(spriteIndex.!=.-1).
d6e0 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 7b 0d 0a 20 20 20 20 .........................{......
d700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 45 6c ........................m_textEl
d720 65 6d 65 6e 74 54 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e ementType.=.TMP_TextElementType.
d740 53 70 72 69 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Sprite;.........................
d760 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f .....m_textInfo.characterInfo[m_
d780 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 65 6c 65 6d 65 6e 74 54 79 70 65 totalCharacterCount].elementType
d7a0 20 3d 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 .=.m_textElementType;...........
d7c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 .....................m_currentMa
d7e0 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 2e terialIndex.=.MaterialReference.
d800 41 64 64 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 28 73 70 72 69 74 65 41 73 73 65 74 AddMaterialReference(spriteAsset
d820 2e 6d 61 74 65 72 69 61 6c 2c 20 73 70 72 69 74 65 41 73 73 65 74 2c 20 6d 5f 6d 61 74 65 72 69 .material,.spriteAsset,.m_materi
d840 61 6c 52 65 66 65 72 65 6e 63 65 73 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 alReferences,.m_materialReferenc
d860 65 49 6e 64 65 78 4c 6f 6f 6b 75 70 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eIndexLookup);..................
d880 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 ............m_materialReferences
d8a0 5b 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 72 65 66 65 72 65 6e [m_currentMaterialIndex].referen
d8c0 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ceCount.+=.1;...................
d8e0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .............m_textInfo.characte
d900 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 63 68 61 rInfo[m_totalCharacterCount].cha
d920 72 61 63 74 65 72 20 3d 20 28 63 68 61 72 29 75 6e 69 63 6f 64 65 3b 0d 0a 20 20 20 20 20 20 20 racter.=.(char)unicode;.........
d940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e .....................m_textInfo.
d960 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f characterInfo[m_totalCharacterCo
d980 75 6e 74 5d 2e 73 70 72 69 74 65 49 6e 64 65 78 20 3d 20 73 70 72 69 74 65 49 6e 64 65 78 3b 0d unt].spriteIndex.=.spriteIndex;.
d9a0 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 20 20 6d 5f 74 .............................m_t
d9c0 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 extInfo.characterInfo[m_totalCha
d9e0 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 66 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 63 75 72 72 65 racterCount].fontAsset.=.m_curre
da00 6e 74 46 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntFontAsset;....................
da20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e ..........m_textInfo.characterIn
da40 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 65 fo[m_totalCharacterCount].sprite
da60 41 73 73 65 74 20 3d 20 73 70 72 69 74 65 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 Asset.=.spriteAsset;............
da80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 ..................m_textInfo.cha
daa0 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 racterInfo[m_totalCharacterCount
dac0 5d 2e 74 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 73 70 72 69 74 65 41 73 73 65 74 2e 73 70 72 69 ].textElement.=.spriteAsset.spri
dae0 74 65 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 5b 6d 5f 73 70 72 69 74 65 49 6e 64 65 78 5d 3b teCharacterTable[m_spriteIndex];
db00 0d 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 20 20 6d 5f ..............................m_
db20 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 textInfo.characterInfo[m_totalCh
db40 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 aracterCount].materialReferenceI
db60 6e 64 65 78 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a ndex.=.m_currentMaterialIndex;..
db80 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 20 6d 5f 74 65 ............................m_te
dba0 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 xtInfo.characterInfo[m_totalChar
dbc0 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 6e 64 65 78 20 3d 20 63 68 61 72 73 5b 69 5d 2e 73 74 72 acterCount].index.=.chars[i].str
dbe0 69 6e 67 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ingIndex;.......................
dc00 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b .......m_textInfo.characterInfo[
dc20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 74 72 69 6e 67 4c 65 6e m_totalCharacterCount].stringLen
dc40 67 74 68 20 3d 20 63 68 61 72 73 5b 69 5d 2e 6c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 gth.=.chars[i].length;..........
dc60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 74 6f 72 65 ......................//.Restore
dc80 20 65 6c 65 6d 65 6e 74 20 74 79 70 65 20 61 6e 64 20 6d 61 74 65 72 69 61 6c 20 69 6e 64 65 78 .element.type.and.material.index
dca0 20 74 6f 20 70 72 65 76 69 6f 75 73 20 76 61 6c 75 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 .to.previous.values.............
dcc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 ..................m_textElementT
dce0 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 ype.=.TMP_TextElementType.Charac
dd00 74 65 72 3b 0d 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 ter;............................
dd20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 70 72 65 76 5f ..m_currentMaterialIndex.=.prev_
dd40 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 materialIndex;..................
dd60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 70 72 69 74 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d ..............spriteCount.+=.1;.
dd80 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 20 20 6d 5f 74 .............................m_t
dda0 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 otalCharacterCount.+=.1;........
ddc0 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 65 ........................continue
dde0 3b 0d 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 7d 0d 0a 0d 0a ;..........................}....
de00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 ....................}...........
de20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 43 68 .......}....................//Ch
de40 65 63 6b 20 69 66 20 4c 6f 77 65 72 63 61 73 65 20 6f 72 20 55 70 70 65 72 63 61 73 65 20 76 61 eck.if.Lowercase.or.Uppercase.va
de60 72 69 61 6e 74 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 69 73 20 61 76 61 69 6c 61 riant.of.the.character.is.availa
de80 62 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 74 20 73 75 72 ble...................//.Not.sur
dea0 65 20 74 68 69 73 20 69 73 20 6e 65 63 65 73 73 61 72 79 20 61 6e 79 6f 6e 65 20 61 73 20 69 74 e.this.is.necessary.anyone.as.it
dec0 20 69 73 20 76 65 72 79 20 75 6e 6c 69 6b 65 6c 79 20 77 69 74 68 20 72 65 63 75 72 73 69 76 65 .is.very.unlikely.with.recursive
dee0 20 73 65 61 72 63 68 20 74 68 72 6f 75 67 68 20 66 61 6c 6c 62 61 63 6b 20 66 6f 6e 74 73 2e 0d .search.through.fallback.fonts..
df00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 67 6c 79 70 68 20 3d 3d 20 .................//if.(glyph.==.
df20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 null)..................//{......
df40 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 4c 6f 77 ............//....if.(char.IsLow
df60 65 72 28 28 63 68 61 72 29 63 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f er((char)c))..................//
df80 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 ....{..................//.......
dfa0 20 69 66 20 28 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 63 68 61 72 61 63 74 65 .if.(m_currentFontAsset.characte
dfc0 72 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 2e 54 6f 55 rDictionary.TryGetValue(char.ToU
dfe0 70 70 65 72 28 28 63 68 61 72 29 63 29 2c 20 6f 75 74 20 67 6c 79 70 68 29 29 0d 0a 20 20 20 20 pper((char)c),.out.glyph))......
e000 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 63 20 3d 20 63 68 ............//............c.=.ch
e020 61 72 73 5b 69 5d 20 3d 20 63 68 61 72 2e 54 6f 55 70 70 65 72 28 28 63 68 61 72 29 63 29 3b 0d ars[i].=.char.ToUpper((char)c);.
e040 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 .................//....}........
e060 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 65 6c 73 65 20 69 66 20 28 63 68 61 72 2e 49 73 ..........//....else.if.(char.Is
e080 55 70 70 65 72 28 28 63 68 61 72 29 63 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Upper((char)c)).................
e0a0 20 2f 2f 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 .//....{..................//....
e0c0 20 20 20 20 69 66 20 28 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 63 68 61 72 61 ....if.(m_currentFontAsset.chara
e0e0 63 74 65 72 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 2e cterDictionary.TryGetValue(char.
e100 54 6f 4c 6f 77 65 72 28 28 63 68 61 72 29 63 29 2c 20 6f 75 74 20 67 6c 79 70 68 29 29 0d 0a 20 ToLower((char)c),.out.glyph))...
e120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 63 20 3d ...............//............c.=
e140 20 63 68 61 72 73 5b 69 5d 20 3d 20 63 68 61 72 2e 54 6f 4c 6f 77 65 72 28 28 63 68 61 72 29 63 .chars[i].=.char.ToLower((char)c
e160 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 7d 0d 0a 20 20 20 );..................//....}.....
e180 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .............//}................
e1a0 20 20 20 20 2f 2f 20 52 65 70 6c 61 63 65 20 6d 69 73 73 69 6e 67 20 67 6c 79 70 68 20 62 79 20 ....//.Replace.missing.glyph.by.
e1c0 74 68 65 20 53 71 75 61 72 65 20 28 39 36 33 33 29 20 67 6c 79 70 68 20 6f 72 20 70 6f 73 73 69 the.Square.(9633).glyph.or.possi
e1e0 62 6c 79 20 74 68 65 20 53 70 61 63 65 20 28 33 32 29 20 67 6c 79 70 68 2e 0d 0a 20 20 20 20 20 bly.the.Space.(32).glyph........
e200 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c ...........if.(character.==.null
e220 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 )..................{............
e240 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 61 76 65 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 75 ..........//.Save.the.original.u
e260 6e 69 63 6f 64 65 20 63 68 61 72 61 63 74 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nicode.character................
e280 20 20 20 20 20 20 69 6e 74 20 73 72 63 47 6c 79 70 68 20 3d 20 75 6e 69 63 6f 64 65 3b 0d 0a 0d ......int.srcGlyph.=.unicode;...
e2a0 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 72 79 20 72 65 70 6c .....................//.Try.repl
e2c0 61 63 69 6e 67 20 74 68 65 20 6d 69 73 73 69 6e 67 20 67 6c 79 70 68 20 63 68 61 72 61 63 74 65 acing.the.missing.glyph.characte
e2e0 72 20 62 79 20 54 4d 50 20 53 65 74 74 69 6e 67 73 20 4d 69 73 73 69 6e 67 20 47 6c 79 70 68 20 r.by.TMP.Settings.Missing.Glyph.
e300 6f 72 20 53 71 75 61 72 65 20 28 39 36 33 33 29 20 63 68 61 72 61 63 74 65 72 2e 0d 0a 20 20 20 or.Square.(9633).character......
e320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 69 63 6f 64 65 20 3d 20 63 68 61 72 73 .................unicode.=.chars
e340 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 3d 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 6d 69 73 73 69 [i].unicode.=.TMP_Settings.missi
e360 6e 67 47 6c 79 70 68 43 68 61 72 61 63 74 65 72 20 3d 3d 20 30 20 3f 20 39 36 33 33 20 3a 20 54 ngGlyphCharacter.==.0.?.9633.:.T
e380 4d 50 5f 53 65 74 74 69 6e 67 73 2e 6d 69 73 73 69 6e 67 47 6c 79 70 68 43 68 61 72 61 63 74 65 MP_Settings.missingGlyphCharacte
e3a0 72 3b 0d 0a 0d 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 68 65 r;........................//.Che
e3c0 63 6b 20 66 6f 72 20 74 68 65 20 6d 69 73 73 69 6e 67 20 67 6c 79 70 68 20 63 68 61 72 61 63 74 ck.for.the.missing.glyph.charact
e3e0 65 72 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 61 73 73 69 67 6e 65 64 20 66 6f 6e er.in.the.currently.assigned.fon
e400 74 20 61 73 73 65 74 20 61 6e 64 20 69 74 73 20 66 61 6c 6c 62 61 63 6b 73 0d 0a 20 20 20 20 20 t.asset.and.its.fallbacks.......
e420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 54 4d 50 5f 46 ...............character.=.TMP_F
e440 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 43 68 61 72 61 63 74 65 72 46 72 ontAssetUtilities.GetCharacterFr
e460 6f 6d 46 6f 6e 74 41 73 73 65 74 28 28 75 69 6e 74 29 75 6e 69 63 6f 64 65 2c 20 6d 5f 63 75 72 omFontAsset((uint)unicode,.m_cur
e480 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2c 20 74 72 75 65 2c 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 rentFontAsset,.true,.m_FontStyle
e4a0 49 6e 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 65 72 6e 61 6c 2c 20 Internal,.m_FontWeightInternal,.
e4c0 6f 75 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 2c 20 out.isUsingAlternativeTypeface,.
e4e0 6f 75 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 out.tempFontAsset);.............
e500 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c ...........if.(character.==.null
e520 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 )......................{........
e540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 61 72 63 68 20 66 6f 72 20 ..................//.Search.for.
e560 74 68 65 20 6d 69 73 73 69 6e 67 20 67 6c 79 70 68 20 63 68 61 72 61 63 74 65 72 20 69 6e 20 74 the.missing.glyph.character.in.t
e580 68 65 20 54 4d 50 20 53 65 74 74 69 6e 67 73 20 46 61 6c 6c 62 61 63 6b 20 6c 69 73 74 2e 0d 0a he.TMP.Settings.Fallback.list...
e5a0 20 20 20 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 54 4d 50 5f ........................if.(TMP_
e5c0 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 20 21 3d 20 6e Settings.fallbackFontAssets.!=.n
e5e0 75 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 ull.&&.TMP_Settings.fallbackFont
e600 41 73 73 65 74 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Assets.Count.>.0)...............
e620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 20 3d 20 54 4d 50 5f 46 ...............character.=.TMP_F
e640 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 43 68 61 72 61 63 74 65 72 46 72 ontAssetUtilities.GetCharacterFr
e660 6f 6d 46 6f 6e 74 41 73 73 65 74 73 28 28 75 69 6e 74 29 75 6e 69 63 6f 64 65 2c 20 54 4d 50 5f omFontAssets((uint)unicode,.TMP_
e680 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 2c 20 74 72 75 Settings.fallbackFontAssets,.tru
e6a0 65 2c 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 e,.m_FontStyleInternal,.m_FontWe
e6c0 69 67 68 74 49 6e 74 65 72 6e 61 6c 2c 20 6f 75 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 ightInternal,.out.isUsingAlterna
e6e0 74 69 76 65 54 79 70 65 66 61 63 65 2c 20 6f 75 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 tiveTypeface,.out.tempFontAsset)
e700 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ;......................}........
e720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d ................if.(character.==
e740 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 .null)......................{...
e760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 61 72 63 68 .......................//.Search
e780 20 66 6f 72 20 74 68 65 20 6d 69 73 73 69 6e 67 20 67 6c 79 70 68 20 69 6e 20 74 68 65 20 54 4d .for.the.missing.glyph.in.the.TM
e7a0 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 2e 0d 0a P.Settings.Default.Font.Asset...
e7c0 20 20 20 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 54 4d 50 5f ........................if.(TMP_
e7e0 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 20 21 3d 20 6e 75 6c Settings.defaultFontAsset.!=.nul
e800 6c 29 0d 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 20 20 l)..............................
e820 63 68 61 72 61 63 74 65 72 20 3d 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 character.=.TMP_FontAssetUtiliti
e840 65 73 2e 47 65 74 43 68 61 72 61 63 74 65 72 46 72 6f 6d 46 6f 6e 74 41 73 73 65 74 28 28 75 69 es.GetCharacterFromFontAsset((ui
e860 6e 74 29 75 6e 69 63 6f 64 65 2c 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 64 65 66 61 75 6c 74 nt)unicode,.TMP_Settings.default
e880 46 6f 6e 74 41 73 73 65 74 2c 20 74 72 75 65 2c 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 FontAsset,.true,.m_FontStyleInte
e8a0 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 65 72 6e 61 6c 2c 20 6f 75 74 20 rnal,.m_FontWeightInternal,.out.
e8c0 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 2c 20 6f 75 74 20 isUsingAlternativeTypeface,.out.
e8e0 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tempFontAsset);.................
e900 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .....}........................if
e920 20 28 63 68 61 72 61 63 74 65 72 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .(character.==.null)............
e940 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
e960 20 20 20 20 20 2f 2f 20 55 73 65 20 53 70 61 63 65 20 28 33 32 29 20 47 6c 79 70 68 20 66 72 6f .....//.Use.Space.(32).Glyph.fro
e980 6d 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 61 73 73 69 67 6e 65 64 20 66 6f 6e 74 20 61 73 m.the.currently.assigned.font.as
e9a0 73 65 74 2e 0d 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 75 6e set...........................un
e9c0 69 63 6f 64 65 20 3d 20 63 68 61 72 73 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 3d 20 33 32 3b 0d 0a icode.=.chars[i].unicode.=.32;..
e9e0 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 68 61 72 61 63 74 65 ........................characte
ea00 72 20 3d 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 55 74 69 6c 69 74 69 65 73 2e 47 65 74 43 68 r.=.TMP_FontAssetUtilities.GetCh
ea20 61 72 61 63 74 65 72 46 72 6f 6d 46 6f 6e 74 41 73 73 65 74 28 28 75 69 6e 74 29 75 6e 69 63 6f aracterFromFontAsset((uint)unico
ea40 64 65 2c 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2c 20 74 72 75 65 2c 20 6d 5f de,.m_currentFontAsset,.true,.m_
ea60 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 2c 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 FontStyleInternal,.m_FontWeightI
ea80 6e 74 65 72 6e 61 6c 2c 20 6f 75 74 20 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 69 76 65 54 nternal,.out.isUsingAlternativeT
eaa0 79 70 65 66 61 63 65 2c 20 6f 75 74 20 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 29 3b 0d 0a 20 20 ypeface,.out.tempFontAsset);....
eac0 20 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 21 54 4d 50 5f 53 ......................if.(!TMP_S
eae0 65 74 74 69 6e 67 73 2e 77 61 72 6e 69 6e 67 73 44 69 73 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 ettings.warningsDisabled).......
eb00 20 20 20 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 .......................Debug.Log
eb20 57 61 72 6e 69 6e 67 28 22 43 68 61 72 61 63 74 65 72 20 77 69 74 68 20 41 53 43 49 49 20 76 61 Warning("Character.with.ASCII.va
eb40 6c 75 65 20 6f 66 20 22 20 2b 20 73 72 63 47 6c 79 70 68 20 2b 20 22 20 77 61 73 20 6e 6f 74 20 lue.of.".+.srcGlyph.+.".was.not.
eb60 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 46 6f 6e 74 20 41 73 73 65 74 20 47 6c 79 70 68 20 54 61 found.in.the.Font.Asset.Glyph.Ta
eb80 62 6c 65 2e 20 49 74 20 77 61 73 20 72 65 70 6c 61 63 65 64 20 62 79 20 61 20 73 70 61 63 65 2e ble..It.was.replaced.by.a.space.
eba0 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ",.this);......................}
ebc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ..................}.............
ebe0 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 69 66 20 74 68 65 20 66 6f 6e 74 20 .......//.Determine.if.the.font.
ec00 61 73 73 65 74 20 69 73 20 73 74 69 6c 6c 20 74 68 65 20 63 75 72 72 65 6e 74 20 66 6f 6e 74 20 asset.is.still.the.current.font.
ec20 61 73 73 65 74 20 6f 72 20 61 20 66 61 6c 6c 62 61 63 6b 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 asset.or.a.fallback.............
ec40 20 20 20 20 20 20 69 66 20 28 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 20 21 3d 20 6e 75 6c 6c 29 ......if.(tempFontAsset.!=.null)
ec60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
ec80 20 20 20 20 20 20 20 20 20 69 66 20 28 74 65 6d 70 46 6f 6e 74 41 73 73 65 74 2e 47 65 74 49 6e .........if.(tempFontAsset.GetIn
eca0 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 stanceID().!=.m_currentFontAsset
ecc0 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .GetInstanceID())...............
ece0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......{........................
ed00 20 20 69 73 55 73 69 6e 67 46 61 6c 6c 62 61 63 6b 4f 72 41 6c 74 65 72 6e 61 74 69 76 65 54 79 ..isUsingFallbackOrAlternativeTy
ed20 70 65 66 61 63 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 peface.=.true;..................
ed40 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 20 3d 20 74 65 6d ........m_currentFontAsset.=.tem
ed60 70 46 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 pFontAsset;.....................
ed80 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 .}..................}...........
eda0 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .......#endregion...............
edc0 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f .....m_textInfo.characterInfo[m_
ede0 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 65 6c 65 6d 65 6e 74 54 79 70 65 totalCharacterCount].elementType
ee00 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 .=.TMP_TextElementType.Character
ee20 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 ;..................m_textInfo.ch
ee40 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e aracterInfo[m_totalCharacterCoun
ee60 74 5d 2e 74 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 63 68 61 72 61 63 74 65 72 3b 0d 0a 20 20 20 t].textElement.=.character;.....
ee80 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .............m_textInfo.characte
eea0 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 55 rInfo[m_totalCharacterCount].isU
eec0 73 69 6e 67 41 6c 74 65 72 6e 61 74 65 54 79 70 65 66 61 63 65 20 3d 20 69 73 55 73 69 6e 67 41 singAlternateTypeface.=.isUsingA
eee0 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 lternativeTypeface;.............
ef00 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f .....m_textInfo.characterInfo[m_
ef20 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 63 68 61 72 61 63 74 65 72 20 3d totalCharacterCount].character.=
ef40 20 28 63 68 61 72 29 75 6e 69 63 6f 64 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .(char)unicode;.................
ef60 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 .m_textInfo.characterInfo[m_tota
ef80 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 66 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 63 lCharacterCount].fontAsset.=.m_c
efa0 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 urrentFontAsset;................
efc0 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 ..m_textInfo.characterInfo[m_tot
efe0 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 6e 64 65 78 20 3d 20 63 68 61 72 73 5b alCharacterCount].index.=.chars[
f000 69 5d 2e 73 74 72 69 6e 67 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 i].stringIndex;.................
f020 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 .m_textInfo.characterInfo[m_tota
f040 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 74 72 69 6e 67 4c 65 6e 67 74 68 20 3d 20 lCharacterCount].stringLength.=.
f060 63 68 61 72 73 5b 69 5d 2e 6c 65 6e 67 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 chars[i].length;................
f080 20 20 20 20 69 66 20 28 69 73 55 73 69 6e 67 46 61 6c 6c 62 61 63 6b 4f 72 41 6c 74 65 72 6e 61 ....if.(isUsingFallbackOrAlterna
f0a0 74 69 76 65 54 79 70 65 66 61 63 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b tiveTypeface)..................{
f0c0 0d 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 72 65 61 74 65 20 ......................//.Create.
f0e0 46 61 6c 6c 62 61 63 6b 20 6d 61 74 65 72 69 61 6c 20 69 6e 73 74 61 6e 63 65 20 6d 61 74 63 68 Fallback.material.instance.match
f100 69 6e 67 20 63 75 72 72 65 6e 74 20 6d 61 74 65 72 69 61 6c 20 70 72 65 73 65 74 20 69 66 20 6e ing.current.material.preset.if.n
f120 65 63 65 73 73 61 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 ecessary......................if
f140 20 28 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 6d 61 74 63 68 4d 61 74 65 72 69 61 6c 50 72 65 73 .(TMP_Settings.matchMaterialPres
f160 65 74 29 0d 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 6d 5f 63 et)..........................m_c
f180 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 54 4d 50 5f 4d 61 74 65 72 69 61 6c 4d 61 6e urrentMaterial.=.TMP_MaterialMan
f1a0 61 67 65 72 2e 47 65 74 46 61 6c 6c 62 61 63 6b 4d 61 74 65 72 69 61 6c 28 6d 5f 63 75 72 72 65 ager.GetFallbackMaterial(m_curre
f1c0 6e 74 4d 61 74 65 72 69 61 6c 2c 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 6d ntMaterial,.m_currentFontAsset.m
f1e0 61 74 65 72 69 61 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 aterial);......................e
f200 6c 73 65 0d 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 6d 5f 63 lse..........................m_c
f220 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 urrentMaterial.=.m_currentFontAs
f240 73 65 74 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 set.material;...................
f260 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 4d 61 .....m_currentMaterialIndex.=.Ma
f280 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 2e 41 64 64 4d 61 74 65 72 69 61 6c 52 65 66 65 72 terialReference.AddMaterialRefer
f2a0 65 6e 63 65 28 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2c 20 6d 5f 63 75 72 72 65 6e ence(m_currentMaterial,.m_curren
f2c0 74 46 6f 6e 74 41 73 73 65 74 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 tFontAsset,.m_materialReferences
f2e0 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 4c 6f 6f 6b 75 70 ,.m_materialReferenceIndexLookup
f300 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 );..................}...........
f320 20 20 20 20 20 20 20 20 20 69 66 20 28 21 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 .........if.(!char.IsWhiteSpace(
f340 28 63 68 61 72 29 75 6e 69 63 6f 64 65 29 20 26 26 20 75 6e 69 63 6f 64 65 20 21 3d 20 30 78 32 (char)unicode).&&.unicode.!=.0x2
f360 30 30 42 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 00B)..................{.........
f380 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4c 69 6d 69 74 20 74 68 65 20 6d 65 73 68 20 6f .............//.Limit.the.mesh.o
f3a0 66 20 74 68 65 20 6d 61 69 6e 20 74 65 78 74 20 6f 62 6a 65 63 74 20 74 6f 20 36 35 35 33 35 20 f.the.main.text.object.to.65535.
f3c0 76 65 72 74 69 63 65 73 20 61 6e 64 20 75 73 65 20 73 75 62 20 6f 62 6a 65 63 74 73 20 66 6f 72 vertices.and.use.sub.objects.for
f3e0 20 74 68 65 20 6f 76 65 72 66 6c 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .the.overflow...................
f400 20 20 20 20 69 66 20 28 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 6d 5f 63 ....if.(m_materialReferences[m_c
f420 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 72 65 66 65 72 65 6e 63 65 43 6f urrentMaterialIndex].referenceCo
f440 75 6e 74 20 3c 20 31 36 33 38 33 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 unt.<.16383)....................
f460 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 6d 5f 63 75 72 ......m_materialReferences[m_cur
f480 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 72 65 66 65 72 65 6e 63 65 43 6f 75 6e rentMaterialIndex].referenceCoun
f4a0 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 t.+=.1;......................els
f4c0 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 e......................{........
f4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 ..................m_currentMater
f500 69 61 6c 49 6e 64 65 78 20 3d 20 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 2e 41 64 64 ialIndex.=.MaterialReference.Add
f520 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 28 6e 65 77 20 4d 61 74 65 72 69 61 6c 28 6d MaterialReference(new.Material(m
f540 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 29 2c 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 _currentMaterial),.m_currentFont
f560 41 73 73 65 74 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 2c 20 6d 5f 6d Asset,.m_materialReferences,.m_m
f580 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 4c 6f 6f 6b 75 70 29 3b 0d 0a 20 aterialReferenceIndexLookup);...
f5a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 .......................m_materia
f5c0 6c 52 65 66 65 72 65 6e 63 65 73 5b 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 lReferences[m_currentMaterialInd
f5e0 65 78 5d 2e 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 ex].referenceCount.+=.1;........
f600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
f620 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f .}....................m_textInfo
f640 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 .characterInfo[m_totalCharacterC
f660 6f 75 6e 74 5d 2e 6d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 ount].material.=.m_currentMateri
f680 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e al;..................m_textInfo.
f6a0 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f characterInfo[m_totalCharacterCo
f6c0 75 6e 74 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 20 3d 20 6d 5f unt].materialReferenceIndex.=.m_
f6e0 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 currentMaterialIndex;...........
f700 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 6d 5f 63 75 .......m_materialReferences[m_cu
f720 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 69 73 46 61 6c 6c 62 61 63 6b 4d 61 rrentMaterialIndex].isFallbackMa
f740 74 65 72 69 61 6c 20 3d 20 69 73 55 73 69 6e 67 46 61 6c 6c 62 61 63 6b 4f 72 41 6c 74 65 72 6e terial.=.isUsingFallbackOrAltern
f760 61 74 69 76 65 54 79 70 65 66 61 63 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ativeTypeface;..................
f780 20 20 2f 2f 20 52 65 73 74 6f 72 65 20 70 72 65 76 69 6f 75 73 20 66 6f 6e 74 20 61 73 73 65 74 ..//.Restore.previous.font.asset
f7a0 20 61 6e 64 20 6d 61 74 65 72 69 61 6c 20 69 66 20 66 61 6c 6c 62 61 63 6b 20 66 6f 6e 74 20 77 .and.material.if.fallback.font.w
f7c0 61 73 20 75 73 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 as.used...................if.(is
f7e0 55 73 69 6e 67 46 61 6c 6c 62 61 63 6b 4f 72 41 6c 74 65 72 6e 61 74 69 76 65 54 79 70 65 66 61 UsingFallbackOrAlternativeTypefa
f800 63 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 ce)..................{..........
f820 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 ............m_materialReferences
f840 5b 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 66 61 6c 6c 62 61 63 [m_currentMaterialIndex].fallbac
f860 6b 4d 61 74 65 72 69 61 6c 20 3d 20 70 72 65 76 5f 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 kMaterial.=.prev_material;......
f880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 ................m_currentFontAss
f8a0 65 74 20 3d 20 70 72 65 76 5f 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 et.=.prev_fontAsset;............
f8c0 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 70 72 ..........m_currentMaterial.=.pr
f8e0 65 76 5f 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ev_material;....................
f900 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 70 72 65 76 5f ..m_currentMaterialIndex.=.prev_
f920 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 materialIndex;..................
f940 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 6f 74 61 6c 43 68 61 72 }....................m_totalChar
f960 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d acterCount.+=.1;..............}.
f980 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 61 72 6c 79 20 72 65 74 75 72 6e 20 69 ...............//.Early.return.i
f9a0 66 20 77 65 20 61 72 65 20 63 61 6c 63 75 6c 61 74 69 6e 67 20 74 68 65 20 70 72 65 66 65 72 72 f.we.are.calculating.the.preferr
f9c0 65 64 20 76 61 6c 75 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 ed.values...............if.(m_is
f9e0 43 61 6c 63 75 6c 61 74 69 6e 67 50 72 65 66 65 72 72 65 64 56 61 6c 75 65 73 29 0d 0a 20 20 20 CalculatingPreferredValues).....
fa00 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 .........{..................m_is
fa20 43 61 6c 63 75 6c 61 74 69 6e 67 50 72 65 66 65 72 72 65 64 56 61 6c 75 65 73 20 3d 20 66 61 6c CalculatingPreferredValues.=.fal
fa40 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 49 6e 70 75 74 50 61 se;..................m_isInputPa
fa60 72 73 69 6e 67 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 rsingRequired.=.true;...........
fa80 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f .......return.m_totalCharacterCo
faa0 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 unt;..............}.............
fac0 20 20 20 2f 2f 20 53 61 76 65 20 6d 61 74 65 72 69 61 6c 20 61 6e 64 20 73 70 72 69 74 65 20 63 ...//.Save.material.and.sprite.c
fae0 6f 75 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 73 70 ount...............m_textInfo.sp
fb00 72 69 74 65 43 6f 75 6e 74 20 3d 20 73 70 72 69 74 65 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 riteCount.=.spriteCount;........
fb20 20 20 20 20 20 20 69 6e 74 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 20 3d 20 6d 5f 74 65 78 74 ......int.materialCount.=.m_text
fb40 49 6e 66 6f 2e 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 Info.materialCount.=.m_materialR
fb60 65 66 65 72 65 6e 63 65 49 6e 64 65 78 4c 6f 6f 6b 75 70 2e 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 eferenceIndexLookup.Count;......
fb80 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 77 65 20 6e 65 65 64 20 74 6f ..........//.Check.if.we.need.to
fba0 20 72 65 73 69 7a 65 20 74 68 65 20 4d 65 73 68 49 6e 66 6f 20 61 72 72 61 79 20 66 6f 72 20 68 .resize.the.MeshInfo.array.for.h
fbc0 61 6e 64 6c 69 6e 67 20 64 69 66 66 65 72 65 6e 74 20 6d 61 74 65 72 69 61 6c 73 2e 0d 0a 20 20 andling.different.materials.....
fbe0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 20 3e 20 6d 5f ..........if.(materialCount.>.m_
fc00 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 textInfo.meshInfo.Length).......
fc20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 49 6e 66 6f 2e 52 65 73 69 7a 65 28 72 ...........TMP_TextInfo.Resize(r
fc40 65 66 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 2c 20 6d 61 74 65 72 69 61 6c ef.m_textInfo.meshInfo,.material
fc60 43 6f 75 6e 74 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f Count,.false);................//
fc80 20 52 65 73 69 7a 65 20 53 75 62 54 65 78 74 4f 62 6a 65 63 74 20 61 72 72 61 79 20 69 66 20 6e .Resize.SubTextObject.array.if.n
fca0 65 63 65 73 73 61 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 61 74 65 72 69 ecessary..............if.(materi
fcc0 61 6c 43 6f 75 6e 74 20 3e 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 alCount.>.m_subTextObjects.Lengt
fce0 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 49 6e 66 6f h)..................TMP_TextInfo
fd00 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2c 20 4d 61 .Resize(ref.m_subTextObjects,.Ma
fd20 74 68 66 2e 4e 65 78 74 50 6f 77 65 72 4f 66 54 77 6f 28 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 thf.NextPowerOfTwo(materialCount
fd40 20 2b 20 31 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 69 7a 65 .+.1));................//.Resize
fd60 20 43 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 5d 20 69 66 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 20 .CharacterInfo[].if.allocations.
fd80 61 72 65 20 65 78 63 65 73 73 69 76 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d are.excessive..............if.(m
fda0 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 2e 4c 65 6e 67 74 68 20 2d _textInfo.characterInfo.Length.-
fdc0 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3e 20 32 35 36 29 0d 0a 20 .m_totalCharacterCount.>.256)...
fde0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 49 6e 66 6f 2e 52 65 73 69 ...............TMP_TextInfo.Resi
fe00 7a 65 28 72 65 66 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 2c ze(ref.m_textInfo.characterInfo,
fe20 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 .Mathf.Max(m_totalCharacterCount
fe40 20 2b 20 31 2c 20 32 35 36 29 2c 20 74 72 75 65 29 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .+.1,.256),.true);..............
fe60 20 20 20 20 2f 2f 20 49 74 65 72 61 74 65 20 74 68 72 6f 75 67 68 20 74 68 65 20 6d 61 74 65 72 ....//.Iterate.through.the.mater
fe80 69 61 6c 20 72 65 66 65 72 65 6e 63 65 73 20 74 6f 20 73 65 74 20 74 68 65 20 6d 65 73 68 20 62 ial.references.to.set.the.mesh.b
fea0 75 66 66 65 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 uffer.allocations..............f
fec0 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 or.(int.i.=.0;.i.<.materialCount
fee0 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ;.i++)..............{...........
ff00 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 6e 65 77 20 73 75 62 20 74 65 78 74 20 6f 62 6a 65 63 .......//.Add.new.sub.text.objec
ff20 74 20 66 6f 72 20 65 61 63 68 20 6d 61 74 65 72 69 61 6c 20 72 65 66 65 72 65 6e 63 65 0d 0a 20 t.for.each.material.reference...
ff40 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 0d 0a 20 20 20 20 20 ...............if.(i.>.0).......
ff60 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
ff80 20 20 69 66 20 28 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 20 3d 3d 20 6e 75 6c ..if.(m_subTextObjects[i].==.nul
ffa0 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 l)......................{.......
ffc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 ...................m_subTextObje
ffe0 63 74 73 5b 69 5d 20 3d 20 54 4d 50 5f 53 75 62 4d 65 73 68 2e 41 64 64 53 75 62 54 65 78 74 4f cts[i].=.TMP_SubMesh.AddSubTextO
10000 62 6a 65 63 74 28 74 68 69 73 2c 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 bject(this,.m_materialReferences
10020 5b 69 5d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 [i]);...........................
10040 20 2f 2f 20 4e 6f 74 20 73 75 72 65 20 74 68 69 73 20 69 73 20 6e 65 63 65 73 73 61 72 79 0d 0a .//.Not.sure.this.is.necessary..
10060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e ........................m_textIn
10080 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 69 63 65 73 20 3d 20 6e 75 6c 6c 3b 0d fo.meshInfo[i].vertices.=.null;.
100a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 .....................}..........
100c0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 65 6c 73 65 20 69 66 20 28 6d 5f 73 75 62 54 65 78 74 ............//else.if.(m_subText
100e0 4f 62 6a 65 63 74 73 5b 69 5d 2e 67 61 6d 65 4f 62 6a 65 63 74 2e 61 63 74 69 76 65 49 6e 48 69 Objects[i].gameObject.activeInHi
10100 65 72 61 72 63 68 79 20 3d 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 erarchy.==.false)...............
10120 20 20 20 20 20 20 20 2f 2f 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d .......//....m_subTextObjects[i]
10140 2e 67 61 6d 65 4f 62 6a 65 63 74 2e 53 65 74 41 63 74 69 76 65 28 74 72 75 65 29 3b 0d 0a 0d 0a .gameObject.SetActive(true);....
10160 20 20 20 20 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 69 66 20 ....................//.Check.if.
10180 74 68 65 20 6d 61 74 65 72 69 61 6c 20 68 61 73 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 the.material.has.changed........
101a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 ...............if.(m_subTextObje
101c0 63 74 73 5b 69 5d 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 20 7c 7c cts[i].sharedMaterial.==.null.||
101e0 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 68 61 72 65 64 4d 61 74 65 72 .m_subTextObjects[i].sharedMater
10200 69 61 6c 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 6d 5f 6d 61 74 65 72 69 61 ial.GetInstanceID().!=.m_materia
10220 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 6d 61 74 65 72 69 61 6c 2e 47 65 74 49 6e 73 74 61 lReferences[i].material.GetInsta
10240 6e 63 65 49 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d nceID())......................{.
10260 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 62 6f 6f 6c 20 69 73 .........................bool.is
10280 44 65 66 61 75 6c 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 DefaultMaterial.=.m_materialRefe
102a0 72 65 6e 63 65 73 5b 69 5d 2e 69 73 44 65 66 61 75 6c 74 4d 61 74 65 72 69 61 6c 3b 0d 0a 0d 0a rences[i].isDefaultMaterial;....
102c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 ........................m_subTex
102e0 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 69 73 44 65 66 61 75 6c 74 4d 61 74 65 72 69 61 6c 20 3d 20 tObjects[i].isDefaultMaterial.=.
10300 69 73 44 65 66 61 75 6c 74 4d 61 74 65 72 69 61 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 isDefaultMaterial;..............
10320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 73 73 69 67 6e 20 6e 65 77 20 6d 61 74 65 ..............//.Assign.new.mate
10340 72 69 61 6c 20 69 66 20 77 65 20 61 72 65 20 6e 6f 74 20 75 73 69 6e 67 20 74 68 65 20 64 65 66 rial.if.we.are.not.using.the.def
10360 61 75 6c 74 20 6d 61 74 65 72 69 61 6c 20 6f 72 20 69 66 20 74 68 65 20 66 6f 6e 74 20 61 73 73 ault.material.or.if.the.font.ass
10380 65 74 20 68 61 73 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 et.has.changed..................
103a0 20 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 44 65 66 61 75 6c 74 4d 61 74 65 72 69 61 6c 20 .........if.(!isDefaultMaterial.
103c0 7c 7c 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 68 61 72 65 64 4d 61 74 ||.m_subTextObjects[i].sharedMat
103e0 65 72 69 61 6c 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 erial.==.null.||.m_subTextObject
10400 73 5b 69 5d 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 s[i].sharedMaterial.GetTexture(S
10420 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 29 2e 47 65 74 49 6e haderUtilities.ID_MainTex).GetIn
10440 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 stanceID().!=.m_materialReferenc
10460 65 73 5b 69 5d 2e 6d 61 74 65 72 69 61 6c 2e 47 65 74 54 65 78 74 75 72 65 28 53 68 61 64 65 72 es[i].material.GetTexture(Shader
10480 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 4d 61 69 6e 54 65 78 29 2e 47 65 74 49 6e 73 74 61 6e 63 Utilities.ID_MainTex).GetInstanc
104a0 65 49 44 28 29 29 0d 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 eID())..........................
104c0 7b 0d 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 20 20 6d {..............................m
104e0 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 68 61 72 65 64 4d 61 74 65 72 69 61 _subTextObjects[i].sharedMateria
10500 6c 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 6d 61 74 65 l.=.m_materialReferences[i].mate
10520 72 69 61 6c 3b 0d 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 rial;...........................
10540 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 66 6f 6e 74 41 73 73 65 74 ...m_subTextObjects[i].fontAsset
10560 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 66 6f 6e 74 41 .=.m_materialReferences[i].fontA
10580 73 73 65 74 3b 0d 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 sset;...........................
105a0 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 73 70 72 69 74 65 41 73 73 ...m_subTextObjects[i].spriteAss
105c0 65 74 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 73 70 72 et.=.m_materialReferences[i].spr
105e0 69 74 65 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 iteAsset;.......................
10600 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ...}......................}.....
10620 20 20 20 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 69 66 20 77 ...................//.Check.if.w
10640 65 20 6e 65 65 64 20 74 6f 20 75 73 65 20 61 20 46 61 6c 6c 62 61 63 6b 20 4d 61 74 65 72 69 61 e.need.to.use.a.Fallback.Materia
10660 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6d 61 74 l......................if.(m_mat
10680 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 69 73 46 61 6c 6c 62 61 63 6b 4d 61 74 erialReferences[i].isFallbackMat
106a0 65 72 69 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 erial)......................{...
106c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 .......................m_subText
106e0 4f 62 6a 65 63 74 73 5b 69 5d 2e 66 61 6c 6c 62 61 63 6b 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f Objects[i].fallbackMaterial.=.m_
10700 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 6d 61 74 65 72 69 61 6c 3b 0d materialReferences[i].material;.
10720 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 6d 5f 73 75 62 54 65 .........................m_subTe
10740 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 66 61 6c 6c 62 61 63 6b 53 6f 75 72 63 65 4d 61 74 65 72 xtObjects[i].fallbackSourceMater
10760 69 61 6c 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 66 61 ial.=.m_materialReferences[i].fa
10780 6c 6c 62 61 63 6b 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 llbackMaterial;.................
107a0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 .....}....................}.....
107c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e ...............int.referenceCoun
107e0 74 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 69 5d 2e 72 65 66 65 t.=.m_materialReferences[i].refe
10800 72 65 6e 63 65 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f renceCount;..................../
10820 2f 20 43 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 6f 75 72 20 62 75 66 66 65 72 73 /.Check.to.make.sure.our.buffers
10840 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 20 63 61 6e 20 61 63 63 6f 6d 6d 6f 64 61 74 65 20 74 68 65 .allocations.can.accommodate.the
10860 20 72 65 71 75 69 72 65 64 20 74 65 78 74 20 65 6c 65 6d 65 6e 74 73 2e 0d 0a 20 20 20 20 20 20 .required.text.elements.........
10880 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 ..........if.(m_textInfo.meshInf
108a0 6f 5b 69 5d 2e 76 65 72 74 69 63 65 73 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 74 65 78 74 49 o[i].vertices.==.null.||.m_textI
108c0 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 69 63 65 73 2e 4c 65 6e 67 74 68 20 nfo.meshInfo[i].vertices.Length.
108e0 3c 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 2a 20 28 21 6d 5f 69 73 56 6f 6c 75 6d 65 74 <.referenceCount.*.(!m_isVolumet
10900 72 69 63 54 65 78 74 20 3f 20 34 20 3a 20 38 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ricText.?.4.:.8))...............
10920 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f ...{......................if.(m_
10940 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 69 63 65 73 20 3d 3d textInfo.meshInfo[i].vertices.==
10960 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 .null)......................{...
10980 20 20 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 69 20 3d 3d 20 .......................if.(i.==.
109a0 30 29 0d 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 20 20 0)..............................
109c0 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 20 3d 20 6e 65 77 20 54 4d 50 m_textInfo.meshInfo[i].=.new.TMP
109e0 5f 4d 65 73 68 49 6e 66 6f 28 6d 5f 6d 65 73 68 2c 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 _MeshInfo(m_mesh,.referenceCount
10a00 20 2b 20 31 2c 20 6d 5f 69 73 56 6f 6c 75 6d 65 74 72 69 63 54 65 78 74 29 3b 0d 0a 20 20 20 20 .+.1,.m_isVolumetricText);......
10a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 ....................else........
10a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f ......................m_textInfo
10a60 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 20 3d 20 6e 65 77 20 54 4d 50 5f 4d 65 73 68 49 6e 66 6f 28 .meshInfo[i].=.new.TMP_MeshInfo(
10a80 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 2c 20 72 65 66 65 72 65 m_subTextObjects[i].mesh,.refere
10aa0 6e 63 65 43 6f 75 6e 74 20 2b 20 31 2c 20 6d 5f 69 73 56 6f 6c 75 6d 65 74 72 69 63 54 65 78 74 nceCount.+.1,.m_isVolumetricText
10ac0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 );......................}.......
10ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ...............else.............
10b00 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f .............m_textInfo.meshInfo
10b20 5b 69 5d 2e 52 65 73 69 7a 65 4d 65 73 68 49 6e 66 6f 28 72 65 66 65 72 65 6e 63 65 43 6f 75 6e [i].ResizeMeshInfo(referenceCoun
10b40 74 20 3e 20 31 30 32 34 20 3f 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 2b 20 32 35 36 20 t.>.1024.?.referenceCount.+.256.
10b60 3a 20 4d 61 74 68 66 2e 4e 65 78 74 50 6f 77 65 72 4f 66 54 77 6f 28 72 65 66 65 72 65 6e 63 65 :.Mathf.NextPowerOfTwo(reference
10b80 43 6f 75 6e 74 20 2b 20 31 29 2c 20 6d 5f 69 73 56 6f 6c 75 6d 65 74 72 69 63 54 65 78 74 29 3b Count.+.1),.m_isVolumetricText);
10ba0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
10bc0 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 56 65 72 74 65 78 42 75 66 66 65 72 41 75 74 6f .....else.if.(m_VertexBufferAuto
10be0 53 69 7a 65 52 65 64 75 63 74 69 6f 6e 20 26 26 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 SizeReduction.&&.referenceCount.
10c00 3e 20 30 20 26 26 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 76 65 >.0.&&.m_textInfo.meshInfo[i].ve
10c20 72 74 69 63 65 73 2e 4c 65 6e 67 74 68 20 2d 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 2a rtices.Length.-.referenceCount.*
10c40 20 28 21 6d 5f 69 73 56 6f 6c 75 6d 65 74 72 69 63 54 65 78 74 20 3f 20 34 20 3a 20 38 29 20 3e .(!m_isVolumetricText.?.4.:.8).>
10c60 20 31 30 32 34 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .1024)..................{.......
10c80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 69 7a 65 20 76 65 72 74 65 78 20 ...............//.Resize.vertex.
10ca0 62 75 66 66 65 72 73 20 69 66 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 20 61 72 65 20 65 78 63 65 73 buffers.if.allocations.are.exces
10cc0 73 69 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 sive.......................//Deb
10ce0 75 67 2e 4c 6f 67 28 22 52 65 64 75 63 69 6e 67 20 74 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 ug.Log("Reducing.the.size.of.the
10d00 20 76 65 72 74 65 78 20 62 75 66 66 65 72 73 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .vertex.buffers.");.............
10d20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e .........m_textInfo.meshInfo[i].
10d40 52 65 73 69 7a 65 4d 65 73 68 49 6e 66 6f 28 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 3e 20 ResizeMeshInfo(referenceCount.>.
10d60 31 30 32 34 20 3f 20 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 20 2b 20 32 35 36 20 3a 20 4d 61 1024.?.referenceCount.+.256.:.Ma
10d80 74 68 66 2e 4e 65 78 74 50 6f 77 65 72 4f 66 54 77 6f 28 72 65 66 65 72 65 6e 63 65 43 6f 75 6e thf.NextPowerOfTwo(referenceCoun
10da0 74 20 2b 20 31 29 2c 20 6d 5f 69 73 56 6f 6c 75 6d 65 74 72 69 63 54 65 78 74 29 3b 0d 0a 20 20 t.+.1),.m_isVolumetricText);....
10dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ..............}..............}..
10de0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 54 4d 50 5f 4d 61 74 65 72 69 61 6c 4d 61 6e 61 ..............//TMP_MaterialMana
10e00 67 65 72 2e 43 6c 65 61 6e 75 70 46 61 6c 6c 62 61 63 6b 4d 61 74 65 72 69 61 6c 73 28 29 3b 0d ger.CleanupFallbackMaterials();.
10e20 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 6e 20 75 70 20 75 6e 75 73 65 ...............//.Clean.up.unuse
10e40 64 20 53 75 62 4d 65 73 68 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e d.SubMeshes..............for.(in
10e60 74 20 69 20 3d 20 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 3b 20 69 20 3c 20 6d 5f 73 75 62 54 65 t.i.=.materialCount;.i.<.m_subTe
10e80 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 68 20 26 26 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a xtObjects.Length.&&.m_subTextObj
10ea0 65 63 74 73 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 ects[i].!=.null;.i++)...........
10ec0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3c 20 6d 5f ...{..................if.(i.<.m_
10ee0 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 textInfo.meshInfo.Length).......
10f00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e ...............m_textInfo.meshIn
10f20 66 6f 5b 69 5d 2e 43 6c 65 61 72 55 6e 75 73 65 64 56 65 72 74 69 63 65 73 28 30 2c 20 74 72 75 fo[i].ClearUnusedVertices(0,.tru
10f40 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 73 75 62 54 65 e);....................//m_subTe
10f60 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 67 61 6d 65 4f 62 6a 65 63 74 2e 53 65 74 41 63 74 69 76 xtObjects[i].gameObject.SetActiv
10f80 65 28 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 e(false);..............}........
10fa0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 ........return.m_totalCharacterC
10fc0 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f ount;..........}..............//
10fe0 20 41 64 64 65 64 20 74 6f 20 73 6f 72 74 20 68 61 6e 64 6c 65 20 74 68 65 20 70 6f 74 65 6e 74 .Added.to.sort.handle.the.potent
11000 69 61 6c 20 69 73 73 75 65 20 77 69 74 68 20 4f 6e 57 69 6c 6c 52 65 6e 64 65 72 4f 62 6a 65 63 ial.issue.with.OnWillRenderObjec
11020 74 28 29 20 6e 6f 74 20 67 65 74 74 69 6e 67 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 6f 62 6a 65 t().not.getting.called.when.obje
11040 63 74 73 20 61 72 65 20 6e 6f 74 20 76 69 73 69 62 6c 65 20 62 79 20 63 61 6d 65 72 61 2e 0d 0a cts.are.not.visible.by.camera...
11060 20 20 20 20 20 20 20 20 2f 2f 76 6f 69 64 20 4f 6e 42 65 63 61 6d 65 49 6e 76 69 73 69 62 6c 65 ........//void.OnBecameInvisible
11080 28 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 ()..........//{..........//....i
110a0 66 20 28 6d 5f 6d 65 73 68 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 f.(m_mesh.!=.null)..........//..
110c0 20 20 20 20 20 20 6d 5f 6d 65 73 68 2e 62 6f 75 6e 64 73 20 3d 20 6e 65 77 20 42 6f 75 6e 64 73 ......m_mesh.bounds.=.new.Bounds
110e0 28 74 72 61 6e 73 66 6f 72 6d 2e 70 6f 73 69 74 69 6f 6e 2c 20 6e 65 77 20 56 65 63 74 6f 72 33 (transform.position,.new.Vector3
11100 28 31 30 30 30 2c 20 31 30 30 30 2c 20 30 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 7d 0d 0a (1000,.1000,.0));..........//}..
11120 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 ............///.<summary>.......
11140 20 20 20 2f 2f 2f 20 55 70 64 61 74 65 20 74 68 65 20 6d 61 72 67 69 6e 20 77 69 64 74 68 20 61 ...///.Update.the.margin.width.a
11160 6e 64 20 68 65 69 67 68 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 nd.height..........///.</summary
11180 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 >..........public.override.void.
111a0 43 6f 6d 70 75 74 65 4d 61 72 67 69 6e 53 69 7a 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a ComputeMarginSize()..........{..
111c0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 68 69 73 2e 72 65 63 74 54 72 61 6e 73 66 6f ............if.(this.rectTransfo
111e0 72 6d 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 rm.!=.null)..............{......
11200 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 2a 2a 2a 20 43 6f 6d ............//Debug.Log("***.Com
11220 70 75 74 65 4d 61 72 67 69 6e 53 69 7a 65 28 29 20 2a 2a 2a 20 43 75 72 72 65 6e 74 20 52 65 63 puteMarginSize().***.Current.Rec
11240 74 54 72 61 6e 73 66 6f 72 6d 27 73 20 57 69 64 74 68 20 69 73 20 22 20 2b 20 6d 5f 72 65 63 74 tTransform's.Width.is.".+.m_rect
11260 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 77 69 64 74 68 20 2b 20 22 20 61 6e 64 20 48 65 69 Transform.rect.width.+.".and.Hei
11280 67 68 74 20 69 73 20 22 20 2b 20 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e ght.is.".+.m_rectTransform.rect.
112a0 68 65 69 67 68 74 29 3b 20 2f 2f 20 2b 20 22 20 61 6e 64 20 73 69 7a 65 20 64 65 6c 74 61 20 69 height);.//.+.".and.size.delta.i
112c0 73 20 22 20 20 2b 20 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 73 69 7a 65 44 65 6c 74 61 s."..+.m_rectTransform.sizeDelta
112e0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 72 67 69 6e 57 69 );....................m_marginWi
11300 64 74 68 20 3d 20 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 77 69 64 74 68 dth.=.m_rectTransform.rect.width
11320 20 2d 20 6d 5f 6d 61 72 67 69 6e 2e 78 20 2d 20 6d 5f 6d 61 72 67 69 6e 2e 7a 3b 0d 0a 20 20 20 .-.m_margin.x.-.m_margin.z;.....
11340 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 72 67 69 6e 48 65 69 67 68 74 20 3d 20 6d 5f .............m_marginHeight.=.m_
11360 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 72 65 63 74 2e 68 65 69 67 68 74 20 2d 20 6d 5f 6d 61 rectTransform.rect.height.-.m_ma
11380 72 67 69 6e 2e 79 20 2d 20 6d 5f 6d 61 72 67 69 6e 2e 77 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 rgin.y.-.m_margin.w;............
113a0 20 20 20 20 20 20 20 20 2f 2f 20 55 70 64 61 74 65 20 74 68 65 20 63 6f 72 6e 65 72 73 20 6f 66 ........//.Update.the.corners.of
113c0 20 74 68 65 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .the.RectTransform..............
113e0 20 20 20 20 6d 5f 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 43 6f 72 6e 65 72 73 20 3d 20 47 65 74 ....m_RectTransformCorners.=.Get
11400 54 65 78 74 43 6f 6e 74 61 69 6e 65 72 4c 6f 63 61 6c 43 6f 72 6e 65 72 73 28 29 3b 0d 0a 20 20 TextContainerLocalCorners();....
11420 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 ..........}..........}..........
11440 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 44 69 ....protected.override.void.OnDi
11460 64 41 70 70 6c 79 41 6e 69 6d 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 65 73 28 29 0d 0a 20 20 20 dApplyAnimationProperties().....
11480 20 20 20 20 20 7b 0d 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 .....{..............//Debug.Log(
114a0 22 2a 2a 2a 20 4f 6e 44 69 64 41 70 70 6c 79 41 6e 69 6d 61 74 69 6f 6e 50 72 6f 70 65 72 74 69 "***.OnDidApplyAnimationProperti
114c0 65 73 28 29 20 2a 2a 2a 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 es().***");..............m_haveP
114e0 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 ropertiesChanged.=.true;........
11500 20 20 20 20 20 20 69 73 4d 61 73 6b 55 70 64 61 74 65 52 65 71 75 69 72 65 64 20 3d 20 74 72 75 ......isMaskUpdateRequired.=.tru
11520 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 69 72 e;................SetVerticesDir
11540 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 ty();..........}..............pr
11560 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 54 72 61 6e 73 66 6f 72 otected.override.void.OnTransfor
11580 6d 50 61 72 65 6e 74 43 68 61 6e 67 65 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 mParentChanged()..........{.....
115a0 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 2a 2a 2a 20 4f 6e 54 72 61 6e .........//Debug.Log("***.OnTran
115c0 73 66 6f 72 6d 50 61 72 65 6e 74 43 68 61 6e 67 65 64 28 29 20 2a 2a 2a 22 29 3b 0d 0a 20 20 20 sformParentChanged().***");.....
115e0 20 20 20 20 20 20 20 20 20 2f 2f 43 6f 6d 70 75 74 65 4d 61 72 67 69 6e 53 69 7a 65 28 29 3b 0d .........//ComputeMarginSize();.
11600 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 74 69 63 65 73 44 69 72 74 79 28 ...............SetVerticesDirty(
11620 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 4c 61 79 6f 75 74 44 69 72 74 79 28 29 );..............SetLayoutDirty()
11640 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 ;..........}..............protec
11660 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 4f 6e 52 65 63 74 54 72 61 6e 73 66 6f 72 ted.override.void.OnRectTransfor
11680 6d 44 69 6d 65 6e 73 69 6f 6e 73 43 68 61 6e 67 65 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a mDimensionsChange()..........{..
116a0 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 2a 2a 2a 20 4f 6e 52 ............//Debug.Log("***.OnR
116c0 65 63 74 54 72 61 6e 73 66 6f 72 6d 44 69 6d 65 6e 73 69 6f 6e 73 43 68 61 6e 67 65 28 29 20 2a ectTransformDimensionsChange().*
116e0 2a 2a 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6d 70 75 74 65 4d 61 72 67 69 6e **");..............ComputeMargin
11700 53 69 7a 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 56 65 72 74 69 63 Size();................SetVertic
11720 65 73 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 4c 61 79 6f 75 esDirty();..............SetLayou
11740 74 44 69 72 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 tDirty();..........}............
11760 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 75 6e ..///.<summary>..........///.Fun
11780 63 74 69 6f 6e 20 75 73 65 64 20 61 73 20 61 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 66 6f 72 20 ction.used.as.a.replacement.for.
117a0 4c 61 74 65 55 70 64 61 74 65 20 74 6f 20 63 68 65 63 6b 20 69 66 20 74 68 65 20 74 72 61 6e 73 LateUpdate.to.check.if.the.trans
117c0 66 6f 72 6d 20 6f 72 20 73 63 61 6c 65 20 6f 66 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 form.or.scale.of.the.text.object
117e0 20 68 61 73 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d .has.changed...........///.</sum
11800 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 6f 76 65 72 72 69 64 65 mary>..........internal.override
11820 20 76 6f 69 64 20 49 6e 74 65 72 6e 61 6c 55 70 64 61 74 65 28 29 0d 0a 20 20 20 20 20 20 20 20 .void.InternalUpdate()..........
11840 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6e 65 65 64 20 74 6f 20 75 70 64 {..............//.We.need.to.upd
11860 61 74 65 20 74 68 65 20 53 44 46 20 73 63 61 6c 65 20 6f 72 20 70 6f 73 73 69 62 6c 79 20 72 65 ate.the.SDF.scale.or.possibly.re
11880 67 65 6e 65 72 61 74 65 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 20 69 66 20 6c 6f 73 73 generate.the.text.object.if.loss
118a0 79 20 73 63 61 6c 65 20 68 61 73 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 y.scale.has.changed.............
118c0 20 20 69 66 20 28 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 3d ..if.(m_havePropertiesChanged.==
118e0 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .false)..............{..........
11900 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6c 6f 73 73 79 53 63 61 6c 65 59 20 3d 20 6d 5f 72 65 ........float.lossyScaleY.=.m_re
11920 63 74 54 72 61 6e 73 66 6f 72 6d 2e 6c 6f 73 73 79 53 63 61 6c 65 2e 79 3b 0d 0a 20 20 20 20 20 ctTransform.lossyScale.y;.......
11940 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 6f 73 73 79 53 63 61 6c 65 59 20 21 3d 20 6d 5f ...........if.(lossyScaleY.!=.m_
11960 70 72 65 76 69 6f 75 73 4c 6f 73 73 79 53 63 61 6c 65 59 20 26 26 20 6d 5f 74 65 78 74 20 21 3d previousLossyScaleY.&&.m_text.!=
11980 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 20 26 26 20 6d 5f 74 65 78 74 20 21 3d 20 6e 75 6c 6c 29 .string.Empty.&&.m_text.!=.null)
119a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
119c0 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 63 61 6c 65 44 65 6c 74 61 20 3d 20 6c 6f 73 73 .........float.scaleDelta.=.loss
119e0 79 53 63 61 6c 65 59 20 2f 20 6d 5f 70 72 65 76 69 6f 75 73 4c 6f 73 73 79 53 63 61 6c 65 59 3b yScaleY./.m_previousLossyScaleY;
11a00 0d 0a 0d 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 53 44 ........................UpdateSD
11a20 46 53 63 61 6c 65 28 73 63 61 6c 65 44 65 6c 74 61 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 FScale(scaleDelta);.............
11a40 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 72 65 76 69 6f 75 73 4c 6f 73 73 79 53 63 61 6c 65 59 ...........m_previousLossyScaleY
11a60 20 3d 20 6c 6f 73 73 79 53 63 61 6c 65 59 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.lossyScaleY;.................
11a80 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .}..............}...............
11aa0 20 2f 2f 20 41 64 64 65 64 20 74 6f 20 68 61 6e 64 6c 65 20 6c 65 67 61 63 79 20 61 6e 69 6d 61 .//.Added.to.handle.legacy.anima
11ac0 74 69 6f 6e 20 6d 6f 64 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 tion.mode...............if.(m_is
11ae0 55 73 69 6e 67 4c 65 67 61 63 79 41 6e 69 6d 61 74 69 6f 6e 43 6f 6d 70 6f 6e 65 6e 74 29 0d 0a UsingLegacyAnimationComponent)..
11b00 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ............{................../
11b20 2f 69 66 20 28 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 29 0d 0a 20 /if.(m_havePropertiesChanged)...
11b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 ...............m_havePropertiesC
11b60 68 61 6e 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hanged.=.true;..................
11b80 4f 6e 50 72 65 52 65 6e 64 65 72 4f 62 6a 65 63 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 OnPreRenderObject();............
11ba0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ..}..........}..............///.
11bc0 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 75 6e 63 74 69 6f 6e 20 <summary>..........///.Function.
11be0 63 61 6c 6c 65 64 20 77 68 65 6e 20 74 68 65 20 74 65 78 74 20 6e 65 65 64 73 20 74 6f 20 62 65 called.when.the.text.needs.to.be
11c00 20 75 70 64 61 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 .updated...........///.</summary
11c20 3e 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 4f 6e 50 72 65 52 65 6e 64 65 72 4f 62 6a 65 63 >..........void.OnPreRenderObjec
11c40 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 t()..........{..............//De
11c60 62 75 67 2e 4c 6f 67 28 22 2a 2a 2a 20 4f 6e 50 72 65 52 65 6e 64 65 72 4f 62 6a 65 63 74 28 29 bug.Log("***.OnPreRenderObject()
11c80 20 2a 2a 2a 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 69 73 .***");................if.(!m_is
11ca0 41 77 61 6b 65 20 7c 7c 20 28 74 68 69 73 2e 49 73 41 63 74 69 76 65 28 29 20 3d 3d 20 66 61 6c Awake.||.(this.IsActive().==.fal
11cc0 73 65 20 26 26 20 6d 5f 69 67 6e 6f 72 65 41 63 74 69 76 65 53 74 61 74 65 20 3d 3d 20 66 61 6c se.&&.m_ignoreActiveState.==.fal
11ce0 73 65 29 29 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 se)).return;................//.D
11d00 65 62 75 67 20 56 61 72 69 61 62 6c 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 6f 70 ebug.Variables..............loop
11d20 43 6f 75 6e 74 41 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6c 6f 6f 70 43 CountA.=.0;..............//loopC
11d40 6f 75 6e 74 42 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6c 6f 6f 70 43 6f ountB.=.0;..............//loopCo
11d60 75 6e 74 43 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6c 6f 6f 70 43 6f 75 untC.=.0;..............//loopCou
11d80 6e 74 44 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6c 6f 6f 70 43 6f 75 6e ntD.=.0;..............//loopCoun
11da0 74 45 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 68 61 76 tE.=.0;................if.(m_hav
11dc0 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 7c 7c 20 6d 5f 69 73 4c 61 79 6f 75 74 ePropertiesChanged.||.m_isLayout
11de0 44 69 72 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 Dirty)..............{...........
11e00 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 50 72 6f 70 65 72 74 69 65 73 20 68 .......//Debug.Log("Properties.h
11e20 61 76 65 20 63 68 61 6e 67 65 64 21 22 29 3b 20 2f 2f 20 41 73 73 69 67 6e 65 64 20 4d 61 74 65 ave.changed!");.//.Assigned.Mate
11e40 72 69 61 6c 20 69 73 3a 22 20 2b 20 6d 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 29 3b 20 2f rial.is:".+.m_sharedMaterial);./
11e60 2f 20 4e 65 77 20 54 65 78 74 20 69 73 3a 20 22 20 2b 20 6d 5f 74 65 78 74 20 2b 20 22 2e 22 29 /.New.Text.is:.".+.m_text.+.".")
11e80 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 4d 61 73 6b 55 ;....................if.(isMaskU
11ea0 70 64 61 74 65 52 65 71 75 69 72 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 pdateRequired)..................
11ec0 7b 0d 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 4d 61 73 {......................UpdateMas
11ee0 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4d 61 73 6b k();......................isMask
11f00 55 70 64 61 74 65 52 65 71 75 69 72 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 UpdateRequired.=.false;.........
11f20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .........}....................//
11f40 20 55 70 64 61 74 65 20 6d 65 73 68 20 70 61 64 64 69 6e 67 20 69 66 20 6e 65 63 65 73 73 61 72 .Update.mesh.padding.if.necessar
11f60 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 65 63 6b 50 61 64 y...................if.(checkPad
11f80 64 69 6e 67 52 65 71 75 69 72 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dingRequired)...................
11fa0 20 20 20 55 70 64 61 74 65 4d 65 73 68 50 61 64 64 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 ...UpdateMeshPadding();.........
11fc0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 70 61 72 73 65 20 74 68 65 20 74 65 78 74 20 69 ...........//.Reparse.the.text.i
11fe0 66 20 74 68 65 20 69 6e 70 75 74 20 68 61 73 20 63 68 61 6e 67 65 64 20 6f 72 20 74 65 78 74 20 f.the.input.has.changed.or.text.
12000 77 61 73 20 74 72 75 6e 63 61 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 was.truncated...................
12020 69 66 20 28 6d 5f 69 73 49 6e 70 75 74 50 61 72 73 69 6e 67 52 65 71 75 69 72 65 64 20 7c 7c 20 if.(m_isInputParsingRequired.||.
12040 6d 5f 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 m_isTextTruncated)..............
12060 20 20 20 20 20 20 20 20 50 61 72 73 65 49 6e 70 75 74 54 65 78 74 28 29 3b 0d 0a 0d 0a 20 20 20 ........ParseInputText();.......
12080 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 65 74 20 46 6f 6e 74 20 6d 69 6e 20 2f .............//.Reset.Font.min./
120a0 20 6d 61 78 20 75 73 65 64 20 77 69 74 68 20 41 75 74 6f 2d 73 69 7a 69 6e 67 0d 0a 20 20 20 20 .max.used.with.Auto-sizing......
120c0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 65 6e 61 62 6c 65 41 75 74 6f 53 69 7a 69 ............if.(m_enableAutoSizi
120e0 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 ng)......................m_fontS
12100 69 7a 65 20 3d 20 4d 61 74 68 66 2e 43 6c 61 6d 70 28 6d 5f 66 6f 6e 74 53 69 7a 65 42 61 73 65 ize.=.Mathf.Clamp(m_fontSizeBase
12120 2c 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 6e 2c 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 61 78 29 3b ,.m_fontSizeMin,.m_fontSizeMax);
12140 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 46 6f 6e 74 53 69 7a ....................m_maxFontSiz
12160 65 20 3d 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 61 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 e.=.m_fontSizeMax;..............
12180 20 20 20 20 6d 5f 6d 69 6e 46 6f 6e 74 53 69 7a 65 20 3d 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 ....m_minFontSize.=.m_fontSizeMi
121a0 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 53 70 61 63 69 6e n;..................m_lineSpacin
121c0 67 44 65 6c 74 61 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 gDelta.=.0;..................m_c
121e0 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 harWidthAdjDelta.=.0;...........
12200 20 20 20 20 20 20 20 2f 2f 6d 5f 72 65 63 75 72 73 69 76 65 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a .......//m_recursiveCount.=.0;..
12220 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 43 68 61 72 61 63 74 65 72 57 ..................m_isCharacterW
12240 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 rappingEnabled.=.false;.........
12260 20 20 20 20 20 20 20 20 20 6d 5f 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 20 3d 20 66 61 6c .........m_isTextTruncated.=.fal
12280 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f se;....................m_havePro
122a0 70 65 72 74 69 65 73 43 68 61 6e 67 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 pertiesChanged.=.false;.........
122c0 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4c 61 79 6f 75 74 44 69 72 74 79 20 3d 20 66 61 6c 73 65 .........m_isLayoutDirty.=.false
122e0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 67 6e 6f 72 65 41 63 74 69 76 ;..................m_ignoreActiv
12300 65 53 74 61 74 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 eState.=.false;.................
12320 20 20 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 ...GenerateTextMesh();..........
12340 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f ....}..........}..............//
12360 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 /.<summary>..........///.This.is
12380 20 74 68 65 20 6d 61 69 6e 20 66 75 6e 63 74 69 6f 6e 20 74 68 61 74 20 69 73 20 72 65 73 70 6f .the.main.function.that.is.respo
123a0 6e 73 69 62 6c 65 20 66 6f 72 20 63 72 65 61 74 69 6e 67 20 2f 20 64 69 73 70 6c 61 79 69 6e 67 nsible.for.creating./.displaying
123c0 20 74 68 65 20 74 65 78 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 .the.text...........///.</summar
123e0 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 y>..........protected.override.v
12400 6f 69 64 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 0d 0a 20 20 20 20 20 20 20 20 oid.GenerateTextMesh()..........
12420 7b 0d 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 22 2a 2a 2a 2a {..............//Debug.Log("****
12440 2a 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 20 2a 2a 2a 2a 2a 22 29 3b 20 2f 2f *.GenerateTextMesh().*****");.//
12460 20 2a 2a 2a 2a 2a 20 46 72 61 6d 65 3a 20 22 20 2b 20 54 69 6d 65 2e 66 72 61 6d 65 43 6f 75 6e .*****.Frame:.".+.Time.frameCoun
12480 74 29 3b 20 2f 2f 20 2b 20 22 2e 20 50 6f 69 6e 74 20 53 69 7a 65 3a 20 22 20 2b 20 6d 5f 66 6f t);.//.+."..Point.Size:.".+.m_fo
124a0 6e 74 53 69 7a 65 20 2b 20 22 2e 20 4d 61 72 67 69 6e 73 20 61 72 65 20 28 57 29 20 22 20 2b 20 ntSize.+."..Margins.are.(W).".+.
124c0 6d 5f 6d 61 72 67 69 6e 57 69 64 74 68 20 2b 20 22 20 20 28 48 29 20 22 20 2b 20 6d 5f 6d 61 72 m_marginWidth.+."..(H).".+.m_mar
124e0 67 69 6e 48 65 69 67 68 74 29 3b 20 2f 2f 20 22 2e 20 49 74 65 72 61 74 69 6f 6e 20 43 6f 75 6e ginHeight);.//."..Iteration.Coun
12500 74 3a 20 22 20 2b 20 6c 6f 6f 70 43 6f 75 6e 74 41 20 2b 20 22 2e 20 20 4d 69 6e 3a 20 22 20 2b t:.".+.loopCountA.+."...Min:.".+
12520 20 6d 5f 6d 69 6e 46 6f 6e 74 53 69 7a 65 20 2b 20 22 20 20 4d 61 78 3a 20 22 20 2b 20 6d 5f 6d .m_minFontSize.+."..Max:.".+.m_m
12540 61 78 46 6f 6e 74 53 69 7a 65 20 2b 20 22 20 20 44 65 6c 74 61 3a 20 22 20 2b 20 28 6d 5f 6d 61 axFontSize.+."..Delta:.".+.(m_ma
12560 78 46 6f 6e 74 53 69 7a 65 20 2d 20 6d 5f 6d 69 6e 46 6f 6e 74 53 69 7a 65 29 20 2b 20 22 20 20 xFontSize.-.m_minFontSize).+."..
12580 46 6f 6e 74 20 73 69 7a 65 20 69 73 20 22 20 2b 20 6d 5f 66 6f 6e 74 53 69 7a 65 29 3b 20 2f 2f Font.size.is.".+.m_fontSize);.//
125a0 63 61 6c 6c 65 64 20 66 6f 72 20 4f 62 6a 65 63 74 20 77 69 74 68 20 49 44 20 22 20 2b 20 47 65 called.for.Object.with.ID.".+.Ge
125c0 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 3b 20 2f 2f 20 41 73 73 69 67 6e 65 64 20 4d 61 74 65 tInstanceID());.//.Assigned.Mate
125e0 72 69 61 6c 20 69 73 20 22 20 2b 20 6d 5f 75 69 52 65 6e 64 65 72 65 72 2e 47 65 74 4d 61 74 65 rial.is.".+.m_uiRenderer.GetMate
12600 72 69 61 6c 28 29 2e 6e 61 6d 65 29 3b 20 2f 2f 20 49 6e 63 6c 75 64 65 46 6f 72 4d 61 73 6b 69 rial().name);.//.IncludeForMaski
12620 6e 67 20 22 20 2b 20 74 68 69 73 2e 6d 5f 49 6e 63 6c 75 64 65 46 6f 72 4d 61 73 6b 69 6e 67 29 ng.".+.this.m_IncludeForMasking)
12640 3b 20 2f 2f 20 61 6e 64 20 74 65 78 74 20 69 73 20 22 20 2b 20 6d 5f 74 65 78 74 29 3b 0d 0a 0d ;.//.and.text.is.".+.m_text);...
12660 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 61 72 6c 79 20 65 78 69 74 20 69 66 20 6e 6f .............//.Early.exit.if.no
12680 20 66 6f 6e 74 20 61 73 73 65 74 20 77 61 73 20 61 73 73 69 67 6e 65 64 2e 20 54 68 69 73 20 73 .font.asset.was.assigned..This.s
126a0 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 6e 65 65 64 65 64 20 73 69 6e 63 65 20 4c 69 62 65 72 61 hould.not.be.needed.since.Libera
126c0 74 69 6f 6e 53 61 6e 73 20 53 44 46 20 77 69 6c 6c 20 62 65 20 61 73 73 69 67 6e 65 64 20 62 79 tionSans.SDF.will.be.assigned.by
126e0 20 64 65 66 61 75 6c 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 66 6f 6e .default...............if.(m_fon
12700 74 41 73 73 65 74 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 63 68 tAsset.==.null.||.m_fontAsset.ch
12720 61 72 61 63 74 65 72 4c 6f 6f 6b 75 70 54 61 62 6c 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 aracterLookupTable.==.null).....
12740 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 .........{..................Debu
12760 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 43 61 6e 27 74 20 47 65 6e 65 72 61 74 65 20 4d 65 73 g.LogWarning("Can't.Generate.Mes
12780 68 21 20 4e 6f 20 46 6f 6e 74 20 41 73 73 65 74 20 68 61 73 20 62 65 65 6e 20 61 73 73 69 67 6e h!.No.Font.Asset.has.been.assign
127a0 65 64 20 74 6f 20 4f 62 6a 65 63 74 20 49 44 3a 20 22 20 2b 20 74 68 69 73 2e 47 65 74 49 6e 73 ed.to.Object.ID:.".+.this.GetIns
127c0 74 61 6e 63 65 49 44 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 tanceID());..................ret
127e0 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 urn;..............}.............
12800 20 20 20 2f 2f 20 43 6c 65 61 72 20 54 65 78 74 49 6e 66 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 ...//.Clear.TextInfo............
12820 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 ..if.(m_textInfo.!=.null).......
12840 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 43 6c 65 61 72 28 29 3b 0d 0a ...........m_textInfo.Clear();..
12860 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 61 72 6c 79 20 65 78 69 74 20 69 66 20 77 ..............//.Early.exit.if.w
12880 65 20 64 6f 6e 27 74 20 68 61 76 65 20 61 6e 79 20 54 65 78 74 20 74 6f 20 67 65 6e 65 72 61 74 e.don't.have.any.Text.to.generat
128a0 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 50 61 72 73 69 6e e...............if.(m_TextParsin
128c0 67 42 75 66 66 65 72 20 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 gBuffer.==.null.||.m_TextParsing
128e0 42 75 66 66 65 72 2e 4c 65 6e 67 74 68 20 3d 3d 20 30 20 7c 7c 20 6d 5f 54 65 78 74 50 61 72 73 Buffer.Length.==.0.||.m_TextPars
12900 69 6e 67 42 75 66 66 65 72 5b 30 5d 2e 75 6e 69 63 6f 64 65 20 3d 3d 20 28 63 68 61 72 29 30 29 ingBuffer[0].unicode.==.(char)0)
12920 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
12940 20 2f 2f 20 43 6c 65 61 72 20 6d 65 73 68 20 61 6e 64 20 75 70 6c 6f 61 64 20 63 68 61 6e 67 65 .//.Clear.mesh.and.upload.change
12960 73 20 74 6f 20 74 68 65 20 6d 65 73 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.to.the.mesh...................
12980 43 6c 65 61 72 4d 65 73 68 28 74 72 75 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ClearMesh(true);................
129a0 20 20 20 20 6d 5f 70 72 65 66 65 72 72 65 64 57 69 64 74 68 20 3d 20 30 3b 0d 0a 20 20 20 20 20 ....m_preferredWidth.=.0;.......
129c0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 70 72 65 66 65 72 72 65 64 48 65 69 67 68 74 20 3d 20 30 ...........m_preferredHeight.=.0
129e0 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 69 6e ;....................//.Event.in
12a00 64 69 63 61 74 69 6e 67 20 74 68 65 20 74 65 78 74 20 68 61 73 20 62 65 65 6e 20 72 65 67 65 6e dicating.the.text.has.been.regen
12a20 65 72 61 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 erated...................TMPro_E
12a40 76 65 6e 74 4d 61 6e 61 67 65 72 2e 4f 4e 5f 54 45 58 54 5f 43 48 41 4e 47 45 44 28 74 68 69 73 ventManager.ON_TEXT_CHANGED(this
12a60 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 );....................return;...
12a80 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 ...........}................m_cu
12aa0 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 rrentFontAsset.=.m_fontAsset;...
12ac0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d ...........m_currentMaterial.=.m
12ae0 5f 73 68 61 72 65 64 4d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f _sharedMaterial;..............m_
12b00 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 currentMaterialIndex.=.0;.......
12b20 20 20 20 20 20 20 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 53 74 61 63 6b 2e .......m_materialReferenceStack.
12b40 53 65 74 44 65 66 61 75 6c 74 28 6e 65 77 20 4d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 SetDefault(new.MaterialReference
12b60 28 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 2c 20 6d 5f 63 75 72 72 65 (m_currentMaterialIndex,.m_curre
12b80 6e 74 46 6f 6e 74 41 73 73 65 74 2c 20 6e 75 6c 6c 2c 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 ntFontAsset,.null,.m_currentMate
12ba0 72 69 61 6c 2c 20 6d 5f 70 61 64 64 69 6e 67 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 rial,.m_padding));..............
12bc0 20 20 6d 5f 63 75 72 72 65 6e 74 53 70 72 69 74 65 41 73 73 65 74 20 3d 20 6d 5f 73 70 72 69 74 ..m_currentSpriteAsset.=.m_sprit
12be0 65 41 73 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 70 20 20 eAsset;................//.Stop..
12c00 61 6c 6c 20 53 70 72 69 74 65 20 41 6e 69 6d 61 74 69 6f 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 all.Sprite.Animations...........
12c20 20 20 20 69 66 20 28 6d 5f 73 70 72 69 74 65 41 6e 69 6d 61 74 6f 72 20 21 3d 20 6e 75 6c 6c 29 ...if.(m_spriteAnimator.!=.null)
12c40 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 70 72 69 74 65 41 6e 69 6d 61 74 ..................m_spriteAnimat
12c60 6f 72 2e 53 74 6f 70 41 6c 6c 41 6e 69 6d 61 74 69 6f 6e 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 or.StopAllAnimations();.........
12c80 20 20 20 20 20 20 20 2f 2f 20 54 6f 74 61 6c 20 63 68 61 72 61 63 74 65 72 20 63 6f 75 6e 74 20 .......//.Total.character.count.
12ca0 69 73 20 63 6f 6d 70 75 74 65 64 20 77 68 65 6e 20 74 68 65 20 74 65 78 74 20 69 73 20 70 61 72 is.computed.when.the.text.is.par
12cc0 73 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 74 6f 74 61 6c 43 68 61 72 61 sed...............int.totalChara
12ce0 63 74 65 72 43 6f 75 6e 74 20 3d 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e cterCount.=.m_totalCharacterCoun
12d00 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 61 6c 63 75 6c 61 74 65 20 74 t;................//.Calculate.t
12d20 68 65 20 73 63 61 6c 65 20 6f 66 20 74 68 65 20 66 6f 6e 74 20 62 61 73 65 64 20 6f 6e 20 73 65 he.scale.of.the.font.based.on.se
12d40 6c 65 63 74 65 64 20 66 6f 6e 74 20 73 69 7a 65 20 61 6e 64 20 73 61 6d 70 6c 69 6e 67 20 70 6f lected.font.size.and.sampling.po
12d60 69 6e 74 20 73 69 7a 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 62 61 73 65 53 63 int.size...............//.baseSc
12d80 61 6c 65 20 69 73 20 63 61 6c 63 75 6c 61 74 65 64 20 75 73 69 6e 67 20 74 68 65 20 66 6f 6e 74 ale.is.calculated.using.the.font
12da0 20 61 73 73 65 74 20 61 73 73 69 67 6e 65 64 20 74 6f 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 .asset.assigned.to.the.text.obje
12dc0 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 62 61 73 65 53 63 61 6c 65 ct...............float.baseScale
12de0 20 3d 20 6d 5f 66 6f 6e 74 53 63 61 6c 65 20 3d 20 28 6d 5f 66 6f 6e 74 53 69 7a 65 20 2f 20 6d .=.m_fontScale.=.(m_fontSize./.m
12e00 5f 66 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 70 6f 69 6e 74 53 69 7a 65 20 2a 20 _fontAsset.faceInfo.pointSize.*.
12e20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 73 63 61 6c 65 20 2a 20 28 6d 5f m_fontAsset.faceInfo.scale.*.(m_
12e40 69 73 4f 72 74 68 6f 67 72 61 70 68 69 63 20 3f 20 31 20 3a 20 30 2e 31 66 29 29 3b 0d 0a 20 20 isOrthographic.?.1.:.0.1f));....
12e60 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 ..........float.currentElementSc
12e80 61 6c 65 20 3d 20 62 61 73 65 53 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f ale.=.baseScale;..............m_
12ea0 66 6f 6e 74 53 63 61 6c 65 4d 75 6c 74 69 70 6c 69 65 72 20 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 fontScaleMultiplier.=.1;........
12ec0 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 53 69 7a 65 20 3d 20 6d 5f 66 6f ........m_currentFontSize.=.m_fo
12ee0 6e 74 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 69 7a 65 53 74 61 63 6b ntSize;..............m_sizeStack
12f00 2e 53 65 74 44 65 66 61 75 6c 74 28 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 53 69 7a 65 29 3b 0d .SetDefault(m_currentFontSize);.
12f20 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 66 6f 6e 74 53 69 7a 65 44 65 6c 74 61 .............float.fontSizeDelta
12f40 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 63 68 61 72 43 6f 64 .=.0;................int.charCod
12f60 65 20 3d 20 30 3b 20 2f 2f 20 48 6f 6c 64 73 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 63 6f e.=.0;.//.Holds.the.character.co
12f80 64 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 62 65 69 6e 67 20 70 72 6f 63 65 73 de.of.the.currently.being.proces
12fa0 73 65 64 20 63 68 61 72 61 63 74 65 72 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f sed.character.................m_
12fc0 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 3d 20 6d 5f 66 6f 6e 74 53 74 79 6c 65 3b FontStyleInternal.=.m_fontStyle;
12fe0 20 2f 2f 20 53 65 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 73 74 79 6c 65 2e 0d 0a 20 20 20 20 .//.Set.the.default.style.......
13000 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 65 72 6e 61 6c 20 3d 20 28 ........m_FontWeightInternal.=.(
13020 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 m_FontStyleInternal.&.FontStyles
13040 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 20 3f 20 46 6f 6e 74 .Bold).==.FontStyles.Bold.?.Font
13060 57 65 69 67 68 74 2e 42 6f 6c 64 20 3a 20 6d 5f 66 6f 6e 74 57 65 69 67 68 74 3b 0d 0a 20 20 20 Weight.Bold.:.m_fontWeight;.....
13080 20 20 20 20 20 20 20 20 20 6d 5f 46 6f 6e 74 57 65 69 67 68 74 53 74 61 63 6b 2e 53 65 74 44 65 .........m_FontWeightStack.SetDe
130a0 66 61 75 6c 74 28 6d 5f 46 6f 6e 74 57 65 69 67 68 74 49 6e 74 65 72 6e 61 6c 29 3b 0d 0a 20 20 fault(m_FontWeightInternal);....
130c0 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 74 79 6c 65 53 74 61 63 6b 2e 43 6c 65 61 72 ..........m_fontStyleStack.Clear
130e0 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 ();................m_lineJustifi
13100 63 61 74 69 6f 6e 20 3d 20 6d 5f 74 65 78 74 41 6c 69 67 6e 6d 65 6e 74 3b 20 2f 2f 20 53 65 74 cation.=.m_textAlignment;.//.Set
13120 73 20 74 68 65 20 6c 69 6e 65 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 6d 6f 64 65 20 74 6f s.the.line.justification.mode.to
13140 20 6d 61 74 63 68 20 65 64 69 74 6f 72 20 61 6c 69 67 6e 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 .match.editor.alignment.........
13160 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 53 74 61 63 6b 2e 53 ......m_lineJustificationStack.S
13180 65 74 44 65 66 61 75 6c 74 28 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 29 3b 0d etDefault(m_lineJustification);.
131a0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 70 61 64 64 69 6e 67 20 3d 20 30 ...............float.padding.=.0
131c0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 74 79 6c 65 5f 70 61 64 64 69 ;..............float.style_paddi
131e0 6e 67 20 3d 20 30 3b 20 2f 2f 20 45 78 74 72 61 20 70 61 64 64 69 6e 67 20 72 65 71 75 69 72 65 ng.=.0;.//.Extra.padding.require
13200 64 20 74 6f 20 61 63 63 6f 6d 6d 6f 64 61 74 65 20 42 6f 6c 64 20 73 74 79 6c 65 2e 0d 0a 20 20 d.to.accommodate.Bold.style.....
13220 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 62 6f 6c 64 5f 78 41 64 76 61 6e 63 65 5f 6d 75 ..........float.bold_xAdvance_mu
13240 6c 74 69 70 6c 69 65 72 20 3d 20 31 3b 20 2f 2f 20 55 73 65 64 20 74 6f 20 69 6e 63 72 65 61 73 ltiplier.=.1;.//.Used.to.increas
13260 65 20 73 70 61 63 69 6e 67 20 62 65 74 77 65 65 6e 20 63 68 61 72 61 63 74 65 72 20 77 68 65 6e e.spacing.between.character.when
13280 20 73 74 79 6c 65 20 69 73 20 62 6f 6c 64 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d .style.is.bold.................m
132a0 5f 62 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 20 3d 20 30 3b 20 2f 2f 20 55 73 65 64 20 62 79 20 _baselineOffset.=.0;.//.Used.by.
132c0 73 75 62 73 63 72 69 70 74 20 63 68 61 72 61 63 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 subscript.characters............
132e0 20 20 20 6d 5f 62 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 53 74 61 63 6b 2e 43 6c 65 61 72 28 29 ...m_baselineOffsetStack.Clear()
13300 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 6e 64 65 72 6c 69 6e 65 0d 0a 20 ;................//.Underline...
13320 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 3d ...........bool.beginUnderline.=
13340 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 75 6e 64 .false;..............Vector3.und
13360 65 72 6c 69 6e 65 5f 73 74 61 72 74 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 20 2f 2f 20 erline_start.=.Vector3.zero;.//.
13380 55 73 65 64 20 74 6f 20 74 72 61 63 6b 20 77 68 65 72 65 20 75 6e 64 65 72 6c 69 6e 65 20 73 74 Used.to.track.where.underline.st
133a0 61 72 74 73 20 26 20 65 6e 64 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 arts.&.ends...............Vector
133c0 33 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 3.underline_end.=.Vector3.zero;.
133e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 72 69 6b 65 2d 74 68 72 6f 75 67 68 ...............//.Strike-through
13400 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 ..............bool.beginStriketh
13420 72 6f 75 67 68 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 rough.=.false;..............Vect
13440 6f 72 33 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 74 20 3d 20 56 65 63 74 6f 72 or3.strikethrough_start.=.Vector
13460 33 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 73 74 72 3.zero;..............Vector3.str
13480 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a ikethrough_end.=.Vector3.zero;..
134a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 65 78 74 20 48 69 67 68 6c 69 67 68 74 0d ..............//.Text.Highlight.
134c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 .............bool.beginHighlight
134e0 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 68 .=.false;..............Vector3.h
13500 69 67 68 6c 69 67 68 74 5f 73 74 61 72 74 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a ighlight_start.=.Vector3.zero;..
13520 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 68 69 67 68 6c 69 67 68 74 5f 65 6e ............Vector3.highlight_en
13540 64 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 d.=.Vector3.zero;...............
13560 20 6d 5f 66 6f 6e 74 43 6f 6c 6f 72 33 32 20 3d 20 6d 5f 66 6f 6e 74 43 6f 6c 6f 72 3b 0d 0a 20 .m_fontColor32.=.m_fontColor;...
13580 20 20 20 20 20 20 20 20 20 20 20 43 6f 6c 6f 72 33 32 20 76 65 72 74 65 78 43 6f 6c 6f 72 3b 0d ...........Color32.vertexColor;.
135a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 20 3d 20 6d 5f 66 6f 6e .............m_htmlColor.=.m_fon
135c0 74 43 6f 6c 6f 72 33 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 75 6e 64 65 72 6c 69 tColor32;..............m_underli
135e0 6e 65 43 6f 6c 6f 72 20 3d 20 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 neColor.=.m_htmlColor;..........
13600 20 20 20 20 6d 5f 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 20 3d 20 6d 5f 68 74 6d ....m_strikethroughColor.=.m_htm
13620 6c 43 6f 6c 6f 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 6f 6c 6f 72 53 74 lColor;................m_colorSt
13640 61 63 6b 2e 53 65 74 44 65 66 61 75 6c 74 28 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 29 3b 0d 0a 20 20 ack.SetDefault(m_htmlColor);....
13660 20 20 20 20 20 20 20 20 20 20 6d 5f 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 53 74 61 63 6b 2e ..........m_underlineColorStack.
13680 53 65 74 44 65 66 61 75 6c 74 28 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 SetDefault(m_htmlColor);........
136a0 20 20 20 20 20 20 6d 5f 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 53 74 61 63 6b 2e ......m_strikethroughColorStack.
136c0 53 65 74 44 65 66 61 75 6c 74 28 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 SetDefault(m_htmlColor);........
136e0 20 20 20 20 20 20 6d 5f 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 53 74 61 63 6b 2e 53 65 74 44 ......m_highlightColorStack.SetD
13700 65 66 61 75 6c 74 28 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 efault(m_htmlColor);............
13720 20 20 20 20 6d 5f 63 6f 6c 6f 72 47 72 61 64 69 65 6e 74 50 72 65 73 65 74 20 3d 20 6e 75 6c 6c ....m_colorGradientPreset.=.null
13740 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 6f 6c 6f 72 47 72 61 64 69 65 6e 74 53 74 ;..............m_colorGradientSt
13760 61 63 6b 2e 53 65 74 44 65 66 61 75 6c 74 28 6e 75 6c 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ack.SetDefault(null);...........
13780 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 74 68 65 20 53 74 79 6c 65 20 73 74 61 63 6b 2e 0d 0a .....//.Clear.the.Style.stack...
137a0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 73 74 79 6c 65 53 74 61 63 6b 2e 43 6c 65 61 72 ............//m_styleStack.Clear
137c0 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 74 68 65 20 ();................//.Clear.the.
137e0 41 63 74 69 6f 6e 20 73 74 61 63 6b 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 61 63 74 Action.stack...............m_act
13800 69 6f 6e 53 74 61 63 6b 2e 43 6c 65 61 72 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ionStack.Clear();...............
13820 20 6d 5f 69 73 46 58 4d 61 74 72 69 78 53 65 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 .m_isFXMatrixSet.=.false;.......
13840 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 20 3d 20 30 3b 20 2f 2f 20 41 6d .........m_lineOffset.=.0;.//.Am
13860 6f 75 6e 74 20 6f 66 20 73 70 61 63 65 20 62 65 74 77 65 65 6e 20 6c 69 6e 65 73 20 28 66 6f 6e ount.of.space.between.lines.(fon
13880 74 20 6c 69 6e 65 20 73 70 61 63 69 6e 67 20 2b 20 6d 5f 6c 69 6e 65 73 70 61 63 69 6e 67 29 2e t.line.spacing.+.m_linespacing).
138a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 48 65 69 67 68 74 20 3d 20 54 4d 50 ..............m_lineHeight.=.TMP
138c0 5f 4d 61 74 68 2e 46 4c 4f 41 54 5f 55 4e 53 45 54 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 _Math.FLOAT_UNSET;..............
138e0 66 6c 6f 61 74 20 6c 69 6e 65 47 61 70 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 float.lineGap.=.m_currentFontAss
13900 65 74 2e 66 61 63 65 49 6e 66 6f 2e 6c 69 6e 65 48 65 69 67 68 74 20 2d 20 28 6d 5f 63 75 72 72 et.faceInfo.lineHeight.-.(m_curr
13920 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 61 73 63 65 6e 74 4c 69 6e 65 entFontAsset.faceInfo.ascentLine
13940 20 2d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 64 .-.m_currentFontAsset.faceInfo.d
13960 65 73 63 65 6e 74 4c 69 6e 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 53 escentLine);................m_cS
13980 70 61 63 69 6e 67 20 3d 20 30 3b 20 2f 2f 20 41 6d 6f 75 6e 74 20 6f 66 20 73 70 61 63 65 20 61 pacing.=.0;.//.Amount.of.space.a
139a0 64 64 65 64 20 62 65 74 77 65 65 6e 20 63 68 61 72 61 63 74 65 72 73 20 61 73 20 61 20 72 65 73 dded.between.characters.as.a.res
139c0 75 6c 74 20 6f 66 20 74 68 65 20 75 73 65 20 6f 66 20 74 68 65 20 3c 63 73 70 61 63 65 3e 20 74 ult.of.the.use.of.the.<cspace>.t
139e0 61 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 6f 6e 6f 53 70 61 63 69 6e 67 20 3d ag...............m_monoSpacing.=
13a00 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6c 69 6e 65 4f 66 66 73 65 .0;..............float.lineOffse
13a20 74 44 65 6c 74 61 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 tDelta.=.0;..............m_xAdva
13a40 6e 63 65 20 3d 20 30 3b 20 2f 2f 20 55 73 65 64 20 74 6f 20 74 72 61 63 6b 20 74 68 65 20 70 6f nce.=.0;.//.Used.to.track.the.po
13a60 73 69 74 69 6f 6e 20 6f 66 20 65 61 63 68 20 63 68 61 72 61 63 74 65 72 2e 0d 0a 0d 0a 20 20 20 sition.of.each.character........
13a80 20 20 20 20 20 20 20 20 20 74 61 67 5f 4c 69 6e 65 49 6e 64 65 6e 74 20 3d 20 30 3b 20 2f 2f 20 .........tag_LineIndent.=.0;.//.
13aa0 55 73 65 64 20 66 6f 72 20 69 6e 64 65 6e 74 61 74 69 6f 6e 20 6f 66 20 74 65 78 74 2e 0d 0a 20 Used.for.indentation.of.text....
13ac0 20 20 20 20 20 20 20 20 20 20 20 74 61 67 5f 49 6e 64 65 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 ...........tag_Indent.=.0;......
13ae0 20 20 20 20 20 20 20 20 6d 5f 69 6e 64 65 6e 74 53 74 61 63 6b 2e 53 65 74 44 65 66 61 75 6c 74 ........m_indentStack.SetDefault
13b00 28 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 61 67 5f 4e 6f 50 61 72 73 69 6e 67 20 (0);..............tag_NoParsing.
13b20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 69 73 49 67 6e 6f =.false;..............//m_isIgno
13b40 72 69 6e 67 41 6c 69 67 6e 6d 65 6e 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 ringAlignment.=.false;..........
13b60 20 20 20 20 20 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 30 3b 20 2f 2f 20 54 ......m_characterCount.=.0;.//.T
13b80 6f 74 61 6c 20 63 68 61 72 61 63 74 65 72 73 20 69 6e 20 74 68 65 20 63 68 61 72 5b 5d 0d 0a 0d otal.characters.in.the.char[]...
13ba0 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 61 63 6b 69 6e 67 20 6f 66 20 6c 69 6e 65 .............//.Tracking.of.line
13bc0 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 69 72 73 .information..............m_firs
13be0 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 tCharacterOfLine.=.0;...........
13c00 20 20 20 6d 5f 6c 61 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 30 3b 0d 0a 20 ...m_lastCharacterOfLine.=.0;...
13c20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 ...........m_firstVisibleCharact
13c40 65 72 4f 66 4c 69 6e 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 61 73 erOfLine.=.0;..............m_las
13c60 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 30 3b 0d 0a 20 20 tVisibleCharacterOfLine.=.0;....
13c80 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 6b 5f ..........m_maxLineAscender.=.k_
13ca0 4c 61 72 67 65 4e 65 67 61 74 69 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 LargeNegativeFloat;.............
13cc0 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 .m_maxLineDescender.=.k_LargePos
13ce0 69 74 69 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4e itiveFloat;..............m_lineN
13d00 75 6d 62 65 72 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 56 69 umber.=.0;..............m_lineVi
13d20 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 sibleCharacterCount.=.0;........
13d40 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 53 74 61 72 74 4f 66 4e 65 77 4c 69 6e 65 20 3d 20 74 72 ......bool.isStartOfNewLine.=.tr
13d60 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 69 72 73 74 4f 76 65 72 66 6c 6f 77 ue;..............m_firstOverflow
13d80 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 CharacterIndex.=.-1;............
13da0 20 20 20 20 6d 5f 70 61 67 65 4e 75 6d 62 65 72 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 ....m_pageNumber.=.0;...........
13dc0 20 20 20 69 6e 74 20 70 61 67 65 54 6f 44 69 73 70 6c 61 79 20 3d 20 4d 61 74 68 66 2e 43 6c 61 ...int.pageToDisplay.=.Mathf.Cla
13de0 6d 70 28 6d 5f 70 61 67 65 54 6f 44 69 73 70 6c 61 79 20 2d 20 31 2c 20 30 2c 20 6d 5f 74 65 78 mp(m_pageToDisplay.-.1,.0,.m_tex
13e00 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 2e 4c 65 6e 67 74 68 20 2d 20 31 29 3b 0d 0a 20 20 20 tInfo.pageInfo.Length.-.1);.....
13e20 20 20 20 20 20 20 20 20 20 69 6e 74 20 70 72 65 76 69 6f 75 73 50 61 67 65 4f 76 65 72 66 6c 6f .........int.previousPageOverflo
13e40 77 43 68 61 72 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 65 6c wChar.=.0;................int.el
13e60 6c 69 70 73 69 73 49 6e 64 65 78 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 lipsisIndex.=.0;................
13e80 56 65 63 74 6f 72 34 20 6d 61 72 67 69 6e 73 20 3d 20 6d 5f 6d 61 72 67 69 6e 3b 0d 0a 20 20 20 Vector4.margins.=.m_margin;.....
13ea0 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6d 61 72 67 69 6e 57 69 64 74 68 20 3d 20 6d 5f 6d .........float.marginWidth.=.m_m
13ec0 61 72 67 69 6e 57 69 64 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6d arginWidth;..............float.m
13ee0 61 72 67 69 6e 48 65 69 67 68 74 20 3d 20 6d 5f 6d 61 72 67 69 6e 48 65 69 67 68 74 3b 0d 0a 20 arginHeight.=.m_marginHeight;...
13f00 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 72 67 69 6e 4c 65 66 74 20 3d 20 30 3b 0d 0a 20 20 ...........m_marginLeft.=.0;....
13f20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 72 67 69 6e 52 69 67 68 74 20 3d 20 30 3b 0d 0a 20 20 ..........m_marginRight.=.0;....
13f40 20 20 20 20 20 20 20 20 20 20 6d 5f 77 69 64 74 68 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 ..........m_width.=.-1;.........
13f60 20 20 20 20 20 66 6c 6f 61 74 20 77 69 64 74 68 20 3d 20 6d 61 72 67 69 6e 57 69 64 74 68 20 2b .....float.width.=.marginWidth.+
13f80 20 30 2e 30 30 30 31 66 20 2d 20 6d 5f 6d 61 72 67 69 6e 4c 65 66 74 20 2d 20 6d 5f 6d 61 72 67 .0.0001f.-.m_marginLeft.-.m_marg
13fa0 69 6e 52 69 67 68 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 65 65 64 20 inRight;................//.Need.
13fc0 74 6f 20 69 6e 69 74 69 61 6c 69 7a 65 20 74 68 65 73 65 20 45 78 74 65 6e 74 73 20 73 74 72 75 to.initialize.these.Extents.stru
13fe0 63 74 75 72 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 ctures..............m_meshExtent
14000 73 2e 6d 69 6e 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 76 65 56 65 63 74 6f 72 32 3b 0d s.min.=.k_LargePositiveVector2;.
14020 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 20 3d .............m_meshExtents.max.=
14040 20 6b 5f 4c 61 72 67 65 4e 65 67 61 74 69 76 65 56 65 63 74 6f 72 32 3b 0d 0a 0d 0a 20 20 20 20 .k_LargeNegativeVector2;........
14060 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 20 6c 69 6e 65 49 6e 66 6f 0d 0a ........//.Initialize.lineInfo..
14080 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 43 6c 65 61 72 4c 69 6e 65 ............m_textInfo.ClearLine
140a0 49 6e 66 6f 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 61 63 6b 69 Info();................//.Tracki
140c0 6e 67 20 6f 66 20 74 68 65 20 68 69 67 68 65 73 74 20 41 73 63 65 6e 64 65 72 0d 0a 20 20 20 20 ng.of.the.highest.Ascender......
140e0 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 43 61 70 48 65 69 67 68 74 20 3d 20 30 3b 0d 0a 20 20 20 ........m_maxCapHeight.=.0;.....
14100 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 41 73 63 65 6e 64 65 72 20 3d 20 30 3b 0d 0a 20 20 20 .........m_maxAscender.=.0;.....
14120 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 44 65 73 63 65 6e 64 65 72 20 3d 20 30 3b 0d 0a 20 20 .........m_maxDescender.=.0;....
14140 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 70 61 67 65 41 73 63 65 6e 64 65 72 20 3d 20 30 ..........float.pageAscender.=.0
14160 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6d 61 78 56 69 73 69 62 6c 65 44 ;..............float.maxVisibleD
14180 65 73 63 65 6e 64 65 72 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 escender.=.0;..............bool.
141a0 69 73 4d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 53 65 74 20 3d 20 66 61 6c 73 65 isMaxVisibleDescenderSet.=.false
141c0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4e 65 77 50 61 67 65 20 3d 20 66 61 6c ;..............m_isNewPage.=.fal
141e0 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 65 se;................//.Initialize
14200 20 73 74 72 75 63 74 20 74 6f 20 74 72 61 63 6b 20 73 74 61 74 65 73 20 6f 66 20 77 6f 72 64 20 .struct.to.track.states.of.word.
14220 77 72 61 70 70 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 46 69 72 wrapping..............bool.isFir
14240 73 74 57 6f 72 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 stWord.=.true;..............m_is
14260 4e 6f 6e 42 72 65 61 6b 69 6e 67 53 70 61 63 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 NonBreakingSpace.=.false;.......
14280 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 67 6e 6f 72 65 4e 6f 6e 42 72 65 61 6b 69 6e 67 53 70 61 .......bool.ignoreNonBreakingSpa
142a0 63 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 ce.=.false;..............bool.is
142c0 4c 61 73 74 42 72 65 61 6b 69 6e 67 43 68 61 72 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 LastBreakingChar.=.false;.......
142e0 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6c 69 6e 65 62 72 65 61 6b 69 6e 67 57 69 64 74 68 20 3d .......float.linebreakingWidth.=
14300 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 72 61 70 70 69 6e 67 49 6e 64 .0;..............int.wrappingInd
14320 65 78 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 61 76 65 20 63 ex.=.0;................//.Save.c
14340 68 61 72 61 63 74 65 72 20 61 6e 64 20 6c 69 6e 65 20 73 74 61 74 65 20 62 65 66 6f 72 65 20 77 haracter.and.line.state.before.w
14360 65 20 62 65 67 69 6e 20 6c 61 79 6f 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 61 76 e.begin.layout...............Sav
14380 65 57 6f 72 64 57 72 61 70 70 69 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 65 64 57 6f eWordWrappingState(ref.m_SavedWo
143a0 72 64 57 72 61 70 53 74 61 74 65 2c 20 2d 31 2c 20 2d 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 rdWrapState,.-1,.-1);...........
143c0 20 20 20 53 61 76 65 57 6f 72 64 57 72 61 70 70 69 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 ...SaveWordWrappingState(ref.m_S
143e0 61 76 65 64 4c 69 6e 65 53 74 61 74 65 2c 20 2d 31 2c 20 2d 31 29 3b 0d 0a 0d 0a 20 20 20 20 20 avedLineState,.-1,.-1);.........
14400 20 20 20 20 20 20 20 6c 6f 6f 70 43 6f 75 6e 74 41 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 .......loopCountA.+=.1;.........
14420 20 20 20 20 20 20 20 2f 2f 20 50 61 72 73 65 20 74 68 72 6f 75 67 68 20 43 68 61 72 61 63 74 65 .......//.Parse.through.Characte
14440 72 20 62 75 66 66 65 72 20 74 6f 20 72 65 61 64 20 48 54 4d 4c 20 74 61 67 73 20 61 6e 64 20 62 r.buffer.to.read.HTML.tags.and.b
14460 65 67 69 6e 20 63 72 65 61 74 69 6e 67 20 6d 65 73 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 egin.creating.mesh..............
14480 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 30 3b 20 69 20 3c 20 6d 5f 54 65 78 74 50 61 72 73 69 .for.(int.i.=.0;.i.<.m_TextParsi
144a0 6e 67 42 75 66 66 65 72 2e 4c 65 6e 67 74 68 20 26 26 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 ngBuffer.Length.&&.m_TextParsing
144c0 42 75 66 66 65 72 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 21 3d 20 30 3b 20 69 2b 2b 29 0d 0a 20 20 Buffer[i].unicode.!=.0;.i++)....
144e0 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 ..........{..................cha
14500 72 43 6f 64 65 20 3d 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 69 5d 2e 75 rCode.=.m_TextParsingBuffer[i].u
14520 6e 69 63 6f 64 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 nicode;....................//.Pa
14540 72 73 65 20 52 69 63 68 20 54 65 78 74 20 54 61 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rse.Rich.Text.Tag...............
14560 20 20 20 23 72 65 67 69 6f 6e 20 50 61 72 73 65 20 52 69 63 68 20 54 65 78 74 20 54 61 67 0d 0a ...#region.Parse.Rich.Text.Tag..
14580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 52 69 63 68 54 65 78 74 ................if.(m_isRichText
145a0 20 26 26 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 36 30 29 20 20 2f 2f 20 27 3c 27 0d 0a 20 20 20 .&&.charCode.==.60)..//.'<'.....
145c0 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
145e0 20 20 20 20 6d 5f 69 73 50 61 72 73 69 6e 67 54 65 78 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 ....m_isParsingText.=.true;.....
14600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 .................m_textElementTy
14620 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 pe.=.TMP_TextElementType.Charact
14640 65 72 3b 0d 0a 0d 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 68 er;........................//.Ch
14660 65 63 6b 20 69 66 20 54 61 67 20 69 73 20 76 61 6c 69 64 2e 20 49 66 20 76 61 6c 69 64 2c 20 73 eck.if.Tag.is.valid..If.valid,.s
14680 6b 69 70 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 76 61 6c 69 64 61 74 65 64 20 kip.to.the.end.of.the.validated.
146a0 74 61 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 56 61 tag.......................if.(Va
146c0 6c 69 64 61 74 65 48 74 6d 6c 54 61 67 28 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 lidateHtmlTag(m_TextParsingBuffe
146e0 72 2c 20 69 20 2b 20 31 2c 20 6f 75 74 20 69 6e 74 20 65 6e 64 54 61 67 49 6e 64 65 78 29 29 0d r,.i.+.1,.out.int.endTagIndex)).
14700 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .....................{..........
14720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 20 3d 20 65 6e 64 54 61 67 49 6e 64 65 78 3b ................i.=.endTagIndex;
14740 0d 0a 0d 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 2f 2f 20 43 ............................//.C
14760 6f 6e 74 69 6e 75 65 20 74 6f 20 6e 65 78 74 20 63 68 61 72 61 63 74 65 72 20 6f 72 20 68 61 6e ontinue.to.next.character.or.han
14780 64 6c 65 20 74 68 65 20 73 70 72 69 74 65 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 dle.the.sprite.element..........
147a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e ................if.(m_textElemen
147c0 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 tType.==.TMP_TextElementType.Cha
147e0 72 61 63 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 racter).........................
14800 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....continue;..................
14820 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ....}..................}........
14840 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........else..................
14860 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 45 6c 65 {......................m_textEle
14880 6d 65 6e 74 54 79 70 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 mentType.=.m_textInfo.characterI
148a0 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 65 6c 65 6d 65 6e 74 54 79 70 nfo[m_characterCount].elementTyp
148c0 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e e;......................m_curren
148e0 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 tMaterialIndex.=.m_textInfo.char
14900 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 6d 61 74 65 acterInfo[m_characterCount].mate
14920 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rialReferenceIndex;.............
14940 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f .........m_currentFontAsset.=.m_
14960 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 textInfo.characterInfo[m_charact
14980 65 72 43 6f 75 6e 74 5d 2e 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 erCount].fontAsset;.............
149a0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 .....}..................#endregi
149c0 6f 6e 20 45 6e 64 20 50 61 72 73 65 20 52 69 63 68 20 54 65 78 74 20 54 61 67 0d 0a 0d 0a 20 20 on.End.Parse.Rich.Text.Tag......
149e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 70 72 65 76 5f 4d 61 74 65 72 69 61 6c 49 ..............int.prev_MaterialI
14a00 6e 64 65 78 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a ndex.=.m_currentMaterialIndex;..
14a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 55 73 69 6e 67 41 6c 74 54 ................bool.isUsingAltT
14a40 79 70 65 66 61 63 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e ypeface.=.m_textInfo.characterIn
14a60 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 55 73 69 6e 67 41 6c 74 65 fo[m_characterCount].isUsingAlte
14a80 72 6e 61 74 65 54 79 70 65 66 61 63 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rnateTypeface;..................
14aa0 20 20 6d 5f 69 73 50 61 72 73 69 6e 67 54 65 78 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 ..m_isParsingText.=.false;......
14ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 68 65 6e 20 75 73 69 6e 67 20 4c 69 6e 6b ..............//.When.using.Link
14ae0 65 64 20 74 65 78 74 2c 20 6d 61 72 6b 20 63 68 61 72 61 63 74 65 72 20 61 73 20 69 67 6e 6f 72 ed.text,.mark.character.as.ignor
14b00 65 64 20 61 6e 64 20 73 6b 69 70 20 74 6f 20 6e 65 78 74 20 63 68 61 72 61 63 74 65 72 2e 0d 0a ed.and.skip.to.next.character...
14b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 68 61 72 61 63 74 65 72 43 ................if.(m_characterC
14b40 6f 75 6e 74 20 3c 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 29 0d ount.<.m_firstVisibleCharacter).
14b60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
14b80 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f ........m_textInfo.characterInfo
14ba0 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 20 3d 20 66 [m_characterCount].isVisible.=.f
14bc0 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 alse;......................m_tex
14be0 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 tInfo.characterInfo[m_characterC
14c00 6f 75 6e 74 5d 2e 63 68 61 72 61 63 74 65 72 20 3d 20 28 63 68 61 72 29 30 78 32 30 30 42 3b 0d ount].character.=.(char)0x200B;.
14c20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 68 61 72 61 63 74 65 72 .....................m_character
14c40 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Count.+=.1;.....................
14c60 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d .continue;..................}...
14c80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 46 6f 6e 74 20 .................//.Handle.Font.
14ca0 53 74 79 6c 65 73 20 6c 69 6b 65 20 4c 6f 77 65 72 43 61 73 65 2c 20 55 70 70 65 72 43 61 73 65 Styles.like.LowerCase,.UpperCase
14cc0 20 61 6e 64 20 53 6d 61 6c 6c 43 61 70 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .and.SmallCaps..................
14ce0 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 69 6e 67 20 6f 66 20 4c 6f 77 65 72 43 61 73 65 2c 20 .#region.Handling.of.LowerCase,.
14d00 55 70 70 65 72 43 61 73 65 20 61 6e 64 20 53 6d 61 6c 6c 43 61 70 73 20 46 6f 6e 74 20 53 74 79 UpperCase.and.SmallCaps.Font.Sty
14d20 6c 65 73 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 6d 61 les....................float.sma
14d40 6c 6c 43 61 70 73 4d 75 6c 74 69 70 6c 69 65 72 20 3d 20 31 2e 30 66 3b 0d 0a 0d 0a 20 20 20 20 llCapsMultiplier.=.1.0f;........
14d60 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 ............if.(m_textElementTyp
14d80 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 e.==.TMP_TextElementType.Charact
14da0 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 er)..................{..........
14dc0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 ............if.((m_FontStyleInte
14de0 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 55 70 70 65 72 43 61 73 65 29 20 3d 3d 20 rnal.&.FontStyles.UpperCase).==.
14e00 46 6f 6e 74 53 74 79 6c 65 73 2e 55 70 70 65 72 43 61 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 FontStyles.UpperCase)...........
14e20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
14e40 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 69 73 20 63 68 61 72 61 63 74 65 72 20 69 73 20 6c 6f ......//.If.this.character.is.lo
14e60 77 65 72 63 61 73 65 2c 20 73 77 69 74 63 68 20 74 6f 20 75 70 70 65 72 63 61 73 65 2e 0d 0a 20 wercase,.switch.to.uppercase....
14e80 20 20 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 63 68 61 72 2e .......................if.(char.
14ea0 49 73 4c 6f 77 65 72 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 IsLower((char)charCode))........
14ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 43 6f 64 65 20 3d ......................charCode.=
14ee0 20 63 68 61 72 2e 54 6f 55 70 70 65 72 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 3b 0d 0a .char.ToUpper((char)charCode);..
14f00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
14f20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 28 6d 5f 46 6f 6e 74 53 74 79 .............else.if.((m_FontSty
14f40 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 4c 6f 77 65 72 43 61 73 leInternal.&.FontStyles.LowerCas
14f60 65 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 4c 6f 77 65 72 43 61 73 65 29 0d 0a 20 20 20 e).==.FontStyles.LowerCase).....
14f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
14fa0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 69 73 20 63 68 61 72 61 63 74 65 72 ............//.If.this.character
14fc0 20 69 73 20 75 70 70 65 72 63 61 73 65 2c 20 73 77 69 74 63 68 20 74 6f 20 6c 6f 77 65 72 63 61 .is.uppercase,.switch.to.lowerca
14fe0 73 65 2e 0d 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 69 66 20 se...........................if.
15000 28 63 68 61 72 2e 49 73 55 70 70 65 72 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 29 0d 0a (char.IsUpper((char)charCode))..
15020 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 20 63 68 61 72 ............................char
15040 43 6f 64 65 20 3d 20 63 68 61 72 2e 54 6f 4c 6f 77 65 72 28 28 63 68 61 72 29 63 68 61 72 43 6f Code.=.char.ToLower((char)charCo
15060 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 de);......................}.....
15080 20 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 28 6d 5f 46 6f 6e .................else.if.((m_Fon
150a0 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 53 6d 61 6c tStyleInternal.&.FontStyles.Smal
150c0 6c 43 61 70 73 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 53 6d 61 6c 6c 43 61 70 73 29 0d lCaps).==.FontStyles.SmallCaps).
150e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .....................{..........
15100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 4c 6f 77 65 72 ................if.(char.IsLower
15120 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ((char)charCode))...............
15140 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
15160 20 20 20 20 20 20 20 20 20 20 73 6d 61 6c 6c 43 61 70 73 4d 75 6c 74 69 70 6c 69 65 72 20 3d 20 ..........smallCapsMultiplier.=.
15180 30 2e 38 66 3b 0d 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 0.8f;...........................
151a0 20 20 20 63 68 61 72 43 6f 64 65 20 3d 20 63 68 61 72 2e 54 6f 55 70 70 65 72 28 28 63 68 61 72 ...charCode.=.char.ToUpper((char
151c0 29 63 68 61 72 43 6f 64 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )charCode);.....................
151e0 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 .....}......................}...
15200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
15220 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..#endregion....................
15240 20 20 2f 2f 20 4c 6f 6f 6b 20 75 70 20 43 68 61 72 61 63 74 65 72 20 44 61 74 61 20 66 72 6f 6d ..//.Look.up.Character.Data.from
15260 20 44 69 63 74 69 6f 6e 61 72 79 20 61 6e 64 20 63 61 63 68 65 20 69 74 2e 0d 0a 20 20 20 20 20 .Dictionary.and.cache.it........
15280 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 4c 6f 6f 6b 20 75 70 20 43 68 61 72 61 ...........#region.Look.up.Chara
152a0 63 74 65 72 20 44 61 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d cter.Data..................if.(m
152c0 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d _textElementType.==.TMP_TextElem
152e0 65 6e 74 54 79 70 65 2e 53 70 72 69 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 entType.Sprite).................
15300 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 61 20 .{......................//.If.a.
15320 73 70 72 69 74 65 20 69 73 20 75 73 65 64 20 61 73 20 61 20 66 61 6c 6c 62 61 63 6b 20 74 68 65 sprite.is.used.as.a.fallback.the
15340 6e 20 67 65 74 20 61 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 69 74 20 61 6e 64 20 73 65 74 20 n.get.a.reference.to.it.and.set.
15360 74 68 65 20 63 6f 6c 6f 72 20 74 6f 20 77 68 69 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 the.color.to.white..............
15380 20 20 20 20 20 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 53 70 72 69 74 65 41 73 73 65 74 20 3d 20 .........m_currentSpriteAsset.=.
153a0 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 m_textInfo.characterInfo[m_chara
153c0 63 74 65 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 65 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 cterCount].spriteAsset;.........
153e0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 70 72 69 74 65 49 6e 64 65 78 20 3d 20 6d 5f 74 .............m_spriteIndex.=.m_t
15400 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 extInfo.characterInfo[m_characte
15420 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 65 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 rCount].spriteIndex;............
15440 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 53 70 72 69 74 65 43 68 61 72 61 63 74 65 72 20 ............TMP_SpriteCharacter.
15460 73 70 72 69 74 65 20 3d 20 6d 5f 63 75 72 72 65 6e 74 53 70 72 69 74 65 41 73 73 65 74 2e 73 70 sprite.=.m_currentSpriteAsset.sp
15480 72 69 74 65 43 68 61 72 61 63 74 65 72 54 61 62 6c 65 5b 6d 5f 73 70 72 69 74 65 49 6e 64 65 78 riteCharacterTable[m_spriteIndex
154a0 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 70 72 69 ];......................if.(spri
154c0 74 65 20 3d 3d 20 6e 75 6c 6c 29 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 te.==.null).continue;...........
154e0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 70 72 69 74 65 73 20 61 72 65 20 61 73 73 69 .............//.Sprites.are.assi
15500 67 6e 65 64 20 69 6e 20 74 68 65 20 45 30 30 30 20 50 72 69 76 61 74 65 20 41 72 65 61 20 2b 20 gned.in.the.E000.Private.Area.+.
15520 73 70 72 69 74 65 20 49 6e 64 65 78 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sprite.Index....................
15540 20 20 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 36 30 29 0d 0a 20 20 20 20 20 20 20 20 20 ..if.(charCode.==.60)...........
15560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 43 6f 64 65 20 3d 20 35 37 33 34 34 20 ...............charCode.=.57344.
15580 2b 20 6d 5f 73 70 72 69 74 65 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +.m_spriteIndex;................
155a0 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......else......................
155c0 20 20 20 20 6d 5f 73 70 72 69 74 65 43 6f 6c 6f 72 20 3d 20 73 5f 63 6f 6c 6f 72 57 68 69 74 65 ....m_spriteColor.=.s_colorWhite
155e0 3b 0d 0a 0d 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 68 65 20 ;........................//.The.
15600 73 70 72 69 74 65 20 73 63 61 6c 65 20 63 61 6c 63 75 6c 61 74 69 6f 6e 73 20 61 72 65 20 62 61 sprite.scale.calculations.are.ba
15620 73 65 64 20 6f 6e 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 74 20 61 73 73 69 67 6e 65 64 20 74 sed.on.the.font.asset.assigned.t
15640 6f 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 o.the.text.object...............
15660 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 70 72 69 74 65 53 63 61 6c 65 20 3d 20 28 6d 5f 63 ........float.spriteScale.=.(m_c
15680 75 72 72 65 6e 74 46 6f 6e 74 53 69 7a 65 20 2f 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 urrentFontSize./.m_currentFontAs
156a0 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 70 6f 69 6e 74 53 69 7a 65 20 2a 20 6d 5f 63 75 72 72 65 set.faceInfo.pointSize.*.m_curre
156c0 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 73 63 61 6c 65 20 2a 20 28 6d 5f ntFontAsset.faceInfo.scale.*.(m_
156e0 69 73 4f 72 74 68 6f 67 72 61 70 68 69 63 20 3f 20 31 20 3a 20 30 2e 31 66 29 29 3b 0d 0a 20 20 isOrthographic.?.1.:.0.1f));....
15700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 ..................currentElement
15720 53 63 61 6c 65 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 Scale.=.m_currentFontAsset.faceI
15740 6e 66 6f 2e 61 73 63 65 6e 74 4c 69 6e 65 20 2f 20 73 70 72 69 74 65 2e 67 6c 79 70 68 2e 6d 65 nfo.ascentLine./.sprite.glyph.me
15760 74 72 69 63 73 2e 68 65 69 67 68 74 20 2a 20 73 70 72 69 74 65 2e 73 63 61 6c 65 20 2a 20 73 70 trics.height.*.sprite.scale.*.sp
15780 72 69 74 65 2e 67 6c 79 70 68 2e 73 63 61 6c 65 20 2a 20 73 70 72 69 74 65 53 63 61 6c 65 3b 0d rite.glyph.scale.*.spriteScale;.
157a0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 61 63 68 65 64 5f .......................m_cached_
157c0 54 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 73 70 72 69 74 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 TextElement.=.sprite;...........
157e0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .............m_textInfo.characte
15800 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 65 6c 65 6d 65 6e 74 54 rInfo[m_characterCount].elementT
15820 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 53 70 72 69 74 65 ype.=.TMP_TextElementType.Sprite
15840 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 ;......................m_textInf
15860 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 o.characterInfo[m_characterCount
15880 5d 2e 73 63 61 6c 65 20 3d 20 73 70 72 69 74 65 53 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 ].scale.=.spriteScale;..........
158a0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 ............m_textInfo.character
158c0 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 70 72 69 74 65 41 73 73 Info[m_characterCount].spriteAss
158e0 65 74 20 3d 20 6d 5f 63 75 72 72 65 6e 74 53 70 72 69 74 65 41 73 73 65 74 3b 0d 0a 20 20 20 20 et.=.m_currentSpriteAsset;......
15900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 ................m_textInfo.chara
15920 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 66 6f 6e 74 41 cterInfo[m_characterCount].fontA
15940 73 73 65 74 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 sset.=.m_currentFontAsset;......
15960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 ................m_textInfo.chara
15980 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 6d 61 74 65 72 cterInfo[m_characterCount].mater
159a0 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 ialReferenceIndex.=.m_currentMat
159c0 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erialIndex;.....................
159e0 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 70 72 65 76 ...m_currentMaterialIndex.=.prev
15a00 5f 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 _MaterialIndex;.................
15a20 20 20 20 20 20 20 20 70 61 64 64 69 6e 67 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .......padding.=.0;.............
15a40 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 .....}..................else.if.
15a60 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c (m_textElementType.==.TMP_TextEl
15a80 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ementType.Character)............
15aa0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 ......{......................m_c
15ac0 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 ached_TextElement.=.m_textInfo.c
15ae0 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 74 haracterInfo[m_characterCount].t
15b00 65 78 74 45 6c 65 6d 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 extElement;.....................
15b20 20 69 66 20 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 20 3d 3d 20 6e 75 6c .if.(m_cached_TextElement.==.nul
15b40 6c 29 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 l).continue;....................
15b60 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 74 65 78 74 49 ....m_currentFontAsset.=.m_textI
15b80 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 nfo.characterInfo[m_characterCou
15ba0 6e 74 5d 2e 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nt].fontAsset;..................
15bc0 20 20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 74 65 78 74 49 6e ....m_currentMaterial.=.m_textIn
15be0 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e fo.characterInfo[m_characterCoun
15c00 74 5d 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t].material;....................
15c20 20 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3d 20 6d 5f 74 65 78 ..m_currentMaterialIndex.=.m_tex
15c40 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 tInfo.characterInfo[m_characterC
15c60 6f 75 6e 74 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 3b 0d 0a 0d ount].materialReferenceIndex;...
15c80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 2d 63 61 6c 63 75 .....................//.Re-calcu
15ca0 6c 61 74 65 20 66 6f 6e 74 20 73 63 61 6c 65 20 61 73 20 74 68 65 20 66 6f 6e 74 20 61 73 73 65 late.font.scale.as.the.font.asse
15cc0 74 20 6d 61 79 20 68 61 76 65 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 t.may.have.changed..............
15ce0 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 63 61 6c 65 20 3d 20 6d 5f 63 75 72 72 65 6e 74 .........m_fontScale.=.m_current
15d00 46 6f 6e 74 53 69 7a 65 20 2a 20 73 6d 61 6c 6c 43 61 70 73 4d 75 6c 74 69 70 6c 69 65 72 20 2f FontSize.*.smallCapsMultiplier./
15d20 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 70 6f 69 .m_currentFontAsset.faceInfo.poi
15d40 6e 74 53 69 7a 65 20 2a 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 ntSize.*.m_currentFontAsset.face
15d60 49 6e 66 6f 2e 73 63 61 6c 65 20 2a 20 28 6d 5f 69 73 4f 72 74 68 6f 67 72 61 70 68 69 63 20 3f Info.scale.*.(m_isOrthographic.?
15d80 20 31 20 3a 20 30 2e 31 66 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .1.:.0.1f);.....................
15da0 20 20 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 3d 20 6d 5f 66 6f 6e 74 53 ...currentElementScale.=.m_fontS
15dc0 63 61 6c 65 20 2a 20 6d 5f 66 6f 6e 74 53 63 61 6c 65 4d 75 6c 74 69 70 6c 69 65 72 20 2a 20 6d cale.*.m_fontScaleMultiplier.*.m
15de0 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 73 63 61 6c 65 20 2a 20 6d 5f 63 61 _cached_TextElement.scale.*.m_ca
15e00 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 2e 73 63 61 6c 65 3b 0d 0a 0d ched_TextElement.glyph.scale;...
15e20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e .....................m_textInfo.
15e40 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e characterInfo[m_characterCount].
15e60 65 6c 65 6d 65 6e 74 54 79 70 65 20 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 elementType.=.TMP_TextElementTyp
15e80 65 2e 43 68 61 72 61 63 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.Character;....................
15ea0 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 ..m_textInfo.characterInfo[m_cha
15ec0 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 63 61 6c 65 20 3d 20 63 75 72 72 65 6e 74 45 6c 65 6d racterCount].scale.=.currentElem
15ee0 65 6e 74 53 63 61 6c 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 entScale;.......................
15f00 20 70 61 64 64 69 6e 67 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 .padding.=.m_currentMaterialInde
15f20 78 20 3d 3d 20 30 20 3f 20 6d 5f 70 61 64 64 69 6e 67 20 3a 20 6d 5f 73 75 62 54 65 78 74 4f 62 x.==.0.?.m_padding.:.m_subTextOb
15f40 6a 65 63 74 73 5b 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 2e 70 61 jects[m_currentMaterialIndex].pa
15f60 64 64 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 dding;..................}.......
15f80 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 ...........#endregion...........
15fa0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 53 6f 66 74 20 48 79 70 68 65 6e ...........//.Handle.Soft.Hyphen
15fc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 ..................#region.Handle
15fe0 20 53 6f 66 74 20 48 79 70 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c .Soft.Hyphen..................fl
16000 6f 61 74 20 6f 6c 64 5f 73 63 61 6c 65 20 3d 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 oat.old_scale.=.currentElementSc
16020 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 43 6f ale;..................if.(charCo
16040 64 65 20 3d 3d 20 30 78 41 44 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a de.==.0xAD)..................{..
16060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 ....................currentEleme
16080 6e 74 53 63 61 6c 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ntScale.=.0;..................}.
160a0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d .................#endregion.....
160c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 72 65 20 73 6f 6d 65 20 6f .................//.Store.some.o
160e0 66 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 63 74 27 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0d f.the.text.object's.information.
16100 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 .................m_textInfo.char
16120 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 63 68 61 72 acterInfo[m_characterCount].char
16140 61 63 74 65 72 20 3d 20 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 3b 0d 0a 20 20 20 20 20 20 20 acter.=.(char)charCode;.........
16160 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 .........m_textInfo.characterInf
16180 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 70 6f 69 6e 74 53 69 7a 65 20 3d 20 o[m_characterCount].pointSize.=.
161a0 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 m_currentFontSize;..............
161c0 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 ....m_textInfo.characterInfo[m_c
161e0 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 63 6f 6c 6f 72 20 3d 20 6d 5f 68 74 6d 6c 43 6f 6c haracterCount].color.=.m_htmlCol
16200 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e or;..................m_textInfo.
16220 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e characterInfo[m_characterCount].
16240 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 20 3d 20 6d 5f 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f underlineColor.=.m_underlineColo
16260 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 r;..................m_textInfo.c
16280 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 haracterInfo[m_characterCount].s
162a0 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 20 3d 20 6d 5f 73 74 72 69 6b 65 74 68 72 6f trikethroughColor.=.m_strikethro
162c0 75 67 68 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 ughColor;..................m_tex
162e0 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 tInfo.characterInfo[m_characterC
16300 6f 75 6e 74 5d 2e 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 20 3d 20 6d 5f 68 69 67 68 6c 69 67 ount].highlightColor.=.m_highlig
16320 68 74 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 htColor;..................m_text
16340 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f Info.characterInfo[m_characterCo
16360 75 6e 74 5d 2e 73 74 79 6c 65 20 3d 20 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c unt].style.=.m_FontStyleInternal
16380 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 74 65 78 74 49 6e 66 6f 2e ;..................//m_textInfo.
163a0 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e characterInfo[m_characterCount].
163c0 69 6e 64 65 78 20 3d 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 69 5d 2e 73 index.=.m_TextParsingBuffer[i].s
163e0 74 72 69 6e 67 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d tringIndex;..................//m
16400 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 _textInfo.characterInfo[m_charac
16420 74 65 72 43 6f 75 6e 74 5d 2e 69 73 49 67 6e 6f 72 69 6e 67 41 6c 69 67 6e 6d 65 6e 74 20 3d 20 terCount].isIgnoringAlignment.=.
16440 6d 5f 69 73 49 67 6e 6f 72 69 6e 67 41 6c 69 67 6e 6d 65 6e 74 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 m_isIgnoringAlignment;..........
16460 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 4b 65 72 6e 69 6e 67 20 69 66 ............//.Handle.Kerning.if
16480 20 45 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 .Enabled...................#regi
164a0 6f 6e 20 48 61 6e 64 6c 65 20 4b 65 72 6e 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 on.Handle.Kerning...............
164c0 20 20 20 54 4d 50 5f 47 6c 79 70 68 56 61 6c 75 65 52 65 63 6f 72 64 20 67 6c 79 70 68 41 64 6a ...TMP_GlyphValueRecord.glyphAdj
164e0 75 73 74 6d 65 6e 74 73 20 3d 20 6e 65 77 20 54 4d 50 5f 47 6c 79 70 68 56 61 6c 75 65 52 65 63 ustments.=.new.TMP_GlyphValueRec
16500 6f 72 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 63 68 ord();..................float.ch
16520 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 20 3d 20 6d 5f 63 68 61 aracterSpacingAdjustment.=.m_cha
16540 72 61 63 74 65 72 53 70 61 63 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 racterSpacing;..................
16560 69 66 20 28 6d 5f 65 6e 61 62 6c 65 4b 65 72 6e 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 if.(m_enableKerning)............
16580 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ......{......................if.
165a0 28 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3c 20 74 6f 74 61 6c 43 68 61 72 61 63 74 (m_characterCount.<.totalCharact
165c0 65 72 43 6f 75 6e 74 20 2d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erCount.-.1)....................
165e0 20 20 7b 0d 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 75 69 6e ..{..........................uin
16600 74 20 66 69 72 73 74 47 6c 79 70 68 49 6e 64 65 78 20 3d 20 6d 5f 63 61 63 68 65 64 5f 54 65 78 t.firstGlyphIndex.=.m_cached_Tex
16620 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 tElement.glyphIndex;............
16640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 73 65 63 6f 6e 64 47 6c 79 70 68 49 6e ..............uint.secondGlyphIn
16660 64 65 78 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d dex.=.m_textInfo.characterInfo[m
16680 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 20 31 5d 2e 74 65 78 74 45 6c 65 6d 65 6e 74 _characterCount.+.1].textElement
166a0 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .glyphIndex;....................
166c0 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 68 50 61 69 72 4b 65 ......long.key.=.new.GlyphPairKe
166e0 79 28 66 69 72 73 74 47 6c 79 70 68 49 6e 64 65 78 2c 20 73 65 63 6f 6e 64 47 6c 79 70 68 49 6e y(firstGlyphIndex,.secondGlyphIn
16700 64 65 78 29 2e 6b 65 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dex).key;.......................
16720 20 20 20 20 20 69 66 20 28 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 6f 6e 74 .....if.(m_currentFontAsset.font
16740 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
16760 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 54 72 79 47 65 74 56 ntRecordLookupDictionary.TryGetV
16780 61 6c 75 65 28 6b 65 79 2c 20 6f 75 74 20 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 alue(key,.out.TMP_GlyphPairAdjus
167a0 74 6d 65 6e 74 52 65 63 6f 72 64 20 61 64 6a 75 73 74 6d 65 6e 74 50 61 69 72 29 29 0d 0a 20 20 tmentRecord.adjustmentPair))....
167c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
167e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 6c 79 70 68 41 64 6a 75 73 74 .....................glyphAdjust
16800 6d 65 6e 74 73 20 3d 20 61 64 6a 75 73 74 6d 65 6e 74 50 61 69 72 2e 66 69 72 73 74 41 64 6a 75 ments.=.adjustmentPair.firstAdju
16820 73 74 6d 65 6e 74 52 65 63 6f 72 64 2e 67 6c 79 70 68 56 61 6c 75 65 52 65 63 6f 72 64 3b 0d 0a stmentRecord.glyphValueRecord;..
16840 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 20 63 68 61 72 ............................char
16860 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 20 3d 20 28 61 64 6a 75 73 74 acterSpacingAdjustment.=.(adjust
16880 6d 65 6e 74 50 61 69 72 2e 66 65 61 74 75 72 65 4c 6f 6f 6b 75 70 46 6c 61 67 73 20 26 20 46 6f mentPair.featureLookupFlags.&.Fo
168a0 6e 74 46 65 61 74 75 72 65 4c 6f 6f 6b 75 70 46 6c 61 67 73 2e 49 67 6e 6f 72 65 53 70 61 63 69 ntFeatureLookupFlags.IgnoreSpaci
168c0 6e 67 41 64 6a 75 73 74 6d 65 6e 74 73 29 20 3d 3d 20 46 6f 6e 74 46 65 61 74 75 72 65 4c 6f 6f ngAdjustments).==.FontFeatureLoo
168e0 6b 75 70 46 6c 61 67 73 2e 49 67 6e 6f 72 65 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 kupFlags.IgnoreSpacingAdjustment
16900 73 20 3f 20 30 20 3a 20 63 68 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 s.?.0.:.characterSpacingAdjustme
16920 6e 74 3b 0d 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 7d 0d 0a nt;..........................}..
16940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 ....................}...........
16960 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e .............if.(m_characterCoun
16980 74 20 3e 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a t.>=.1)......................{..
169a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 66 69 72 ........................uint.fir
169c0 73 74 47 6c 79 70 68 49 6e 64 65 78 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 stGlyphIndex.=.m_textInfo.charac
169e0 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 5d 2e 74 65 terInfo[m_characterCount.-.1].te
16a00 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 xtElement.glyphIndex;...........
16a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 6e 74 20 73 65 63 6f 6e 64 47 6c 79 70 68 49 ...............uint.secondGlyphI
16a40 6e 64 65 78 20 3d 20 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 ndex.=.m_cached_TextElement.glyp
16a60 68 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hIndex;.........................
16a80 20 6c 6f 6e 67 20 6b 65 79 20 3d 20 6e 65 77 20 47 6c 79 70 68 50 61 69 72 4b 65 79 28 66 69 72 .long.key.=.new.GlyphPairKey(fir
16aa0 73 74 47 6c 79 70 68 49 6e 64 65 78 2c 20 73 65 63 6f 6e 64 47 6c 79 70 68 49 6e 64 65 78 29 2e stGlyphIndex,.secondGlyphIndex).
16ac0 6b 65 79 3b 0d 0a 0d 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 key;............................
16ae0 69 66 20 28 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 6f 6e 74 46 65 61 74 75 if.(m_currentFontAsset.fontFeatu
16b00 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 52 65 63 reTable.m_GlyphPairAdjustmentRec
16b20 6f 72 64 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 ordLookupDictionary.TryGetValue(
16b40 6b 65 79 2c 20 6f 75 74 20 54 4d 50 5f 47 6c 79 70 68 50 61 69 72 41 64 6a 75 73 74 6d 65 6e 74 key,.out.TMP_GlyphPairAdjustment
16b60 52 65 63 6f 72 64 20 61 64 6a 75 73 74 6d 65 6e 74 50 61 69 72 29 29 0d 0a 20 20 20 20 20 20 20 Record.adjustmentPair)).........
16b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
16ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 ................glyphAdjustments
16bc0 20 2b 3d 20 61 64 6a 75 73 74 6d 65 6e 74 50 61 69 72 2e 73 65 63 6f 6e 64 41 64 6a 75 73 74 6d .+=.adjustmentPair.secondAdjustm
16be0 65 6e 74 52 65 63 6f 72 64 2e 67 6c 79 70 68 56 61 6c 75 65 52 65 63 6f 72 64 3b 0d 0a 20 20 20 entRecord.glyphValueRecord;.....
16c00 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 63 68 61 72 61 63 74 .........................charact
16c20 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 20 3d 20 28 61 64 6a 75 73 74 6d 65 6e erSpacingAdjustment.=.(adjustmen
16c40 74 50 61 69 72 2e 66 65 61 74 75 72 65 4c 6f 6f 6b 75 70 46 6c 61 67 73 20 26 20 46 6f 6e 74 46 tPair.featureLookupFlags.&.FontF
16c60 65 61 74 75 72 65 4c 6f 6f 6b 75 70 46 6c 61 67 73 2e 49 67 6e 6f 72 65 53 70 61 63 69 6e 67 41 eatureLookupFlags.IgnoreSpacingA
16c80 64 6a 75 73 74 6d 65 6e 74 73 29 20 3d 3d 20 46 6f 6e 74 46 65 61 74 75 72 65 4c 6f 6f 6b 75 70 djustments).==.FontFeatureLookup
16ca0 46 6c 61 67 73 2e 49 67 6e 6f 72 65 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 73 20 3f Flags.IgnoreSpacingAdjustments.?
16cc0 20 30 20 3a 20 63 68 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 3b .0.:.characterSpacingAdjustment;
16ce0 0d 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 7d 0d 0a 20 20 20 ..........................}.....
16d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
16d20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f ....}..................#endregio
16d40 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 n......................//.Initia
16d60 6c 20 49 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 66 6f 72 20 52 54 4c 20 73 75 70 70 6f 72 74 l.Implementation.for.RTL.support
16d80 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c ...................#region.Handl
16da0 65 20 52 69 67 68 74 2d 74 6f 2d 4c 65 66 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.Right-to-Left.................
16dc0 20 69 66 20 28 6d 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 .if.(m_isRightToLeft)...........
16de0 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f .......{......................m_
16e00 78 41 64 76 61 6e 63 65 20 2d 3d 20 28 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 xAdvance.-=.((m_cached_TextEleme
16e20 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 41 64 76 61 6e nt.glyph.metrics.horizontalAdvan
16e40 63 65 20 2a 20 62 6f 6c 64 5f 78 41 64 76 61 6e 63 65 5f 6d 75 6c 74 69 70 6c 69 65 72 20 2b 20 ce.*.bold_xAdvance_multiplier.+.
16e60 63 68 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 20 2b 20 6d 5f 77 characterSpacingAdjustment.+.m_w
16e80 6f 72 64 53 70 61 63 69 6e 67 20 2b 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e ordSpacing.+.m_currentFontAsset.
16ea0 6e 6f 72 6d 61 6c 53 70 61 63 69 6e 67 4f 66 66 73 65 74 29 20 2a 20 63 75 72 72 65 6e 74 45 6c normalSpacingOffset).*.currentEl
16ec0 65 6d 65 6e 74 53 63 61 6c 65 20 2b 20 6d 5f 63 53 70 61 63 69 6e 67 29 20 2a 20 28 31 20 2d 20 ementScale.+.m_cSpacing).*.(1.-.
16ee0 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 m_charWidthAdjDelta);...........
16f00 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 .............if.(char.IsWhiteSpa
16f20 63 65 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d ce((char)charCode).||.charCode.=
16f40 3d 20 30 78 32 30 30 42 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.0x200B).......................
16f60 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 2d 3d 20 6d 5f 77 6f 72 64 53 70 61 63 69 6e 67 20 2a ...m_xAdvance.-=.m_wordSpacing.*
16f80 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 .currentElementScale;...........
16fa0 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 .......}..................#endre
16fc0 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e gion......................//.Han
16fe0 64 6c 65 20 4d 6f 6e 6f 20 53 70 61 63 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dle.Mono.Spacing................
17000 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 4d 6f 6e 6f 20 53 70 61 63 69 6e 67 0d 0a 20 ..#region.Handle.Mono.Spacing...
17020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6d 6f 6e 6f 41 64 76 61 6e 63 65 ...............float.monoAdvance
17040 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6d 6f 6e .=.0;..................if.(m_mon
17060 6f 53 70 61 63 69 6e 67 20 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 oSpacing.!=.0)..................
17080 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 6f 6e 6f 41 64 76 61 6e {......................monoAdvan
170a0 63 65 20 3d 20 28 6d 5f 6d 6f 6e 6f 53 70 61 63 69 6e 67 20 2f 20 32 20 2d 20 28 6d 5f 63 61 63 ce.=.(m_monoSpacing./.2.-.(m_cac
170c0 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 77 69 hed_TextElement.glyph.metrics.wi
170e0 64 74 68 20 2f 20 32 20 2b 20 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 dth./.2.+.m_cached_TextElement.g
17100 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 42 65 61 72 69 6e 67 58 29 lyph.metrics.horizontalBearingX)
17120 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 29 20 2a 20 28 31 20 2d 20 6d .*.currentElementScale).*.(1.-.m
17140 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 _charWidthAdjDelta);............
17160 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 2b 3d 20 6d 6f 6e 6f 41 64 76 61 ..........m_xAdvance.+=.monoAdva
17180 6e 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 nce;..................}.........
171a0 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 .........#endregion.............
171c0 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 50 61 64 64 69 6e 67 20 62 61 73 65 64 20 6f 6e .........//.Set.Padding.based.on
171e0 20 73 65 6c 65 63 74 65 64 20 66 6f 6e 74 20 73 74 79 6c 65 0d 0a 20 20 20 20 20 20 20 20 20 20 .selected.font.style............
17200 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 53 74 79 6c 65 20 50 61 64 64 69 ......#region.Handle.Style.Paddi
17220 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 45 6c ng..................if.(m_textEl
17240 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 ementType.==.TMP_TextElementType
17260 2e 43 68 61 72 61 63 74 65 72 20 26 26 20 21 69 73 55 73 69 6e 67 41 6c 74 54 79 70 65 66 61 63 .Character.&&.!isUsingAltTypefac
17280 65 20 26 26 20 28 2f 2a 28 6d 5f 66 6f 6e 74 53 74 79 6c 65 20 26 20 46 6f 6e 74 53 74 79 6c 65 e.&&.(/*(m_fontStyle.&.FontStyle
172a0 73 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 20 7c 7c 2a 2f 20 s.Bold).==.FontStyles.Bold.||*/.
172c0 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 (m_FontStyleInternal.&.FontStyle
172e0 73 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 29 20 2f 2f 20 s.Bold).==.FontStyles.Bold)).//.
17300 43 68 65 63 6b 73 20 66 6f 72 20 61 6e 79 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 6f 66 20 42 6f Checks.for.any.combination.of.Bo
17320 6c 64 20 53 74 79 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ld.Style...................{....
17340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 75 72 72 65 6e 74 4d ..................if.(m_currentM
17360 61 74 65 72 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 aterial.HasProperty(ShaderUtilit
17380 69 65 73 2e 49 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c 65 29 29 0d 0a 20 20 20 20 20 20 20 20 ies.ID_GradientScale))..........
173a0 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
173c0 20 20 20 20 20 20 20 66 6c 6f 61 74 20 67 72 61 64 69 65 6e 74 53 63 61 6c 65 20 3d 20 6d 5f 63 .......float.gradientScale.=.m_c
173e0 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2e 47 65 74 46 6c 6f 61 74 28 53 68 61 64 65 72 55 74 urrentMaterial.GetFloat(ShaderUt
17400 69 6c 69 74 69 65 73 2e 49 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c 65 29 3b 0d 0a 20 20 20 20 ilities.ID_GradientScale);......
17420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 79 6c 65 5f 70 61 64 64 69 6e ....................style_paddin
17440 67 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 62 6f 6c 64 53 74 79 6c 65 g.=.m_currentFontAsset.boldStyle
17460 20 2f 20 34 2e 30 66 20 2a 20 67 72 61 64 69 65 6e 74 53 63 61 6c 65 20 2a 20 6d 5f 63 75 72 72 ./.4.0f.*.gradientScale.*.m_curr
17480 65 6e 74 4d 61 74 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 entMaterial.GetFloat(ShaderUtili
174a0 74 69 65 73 2e 49 44 5f 53 63 61 6c 65 52 61 74 69 6f 5f 41 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 ties.ID_ScaleRatio_A);..........
174c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 61 6d 70 20 6f 76 65 72 61 ..................//.Clamp.overa
174e0 6c 6c 20 70 61 64 64 69 6e 67 20 74 6f 20 47 72 61 64 69 65 6e 74 20 53 63 61 6c 65 20 73 69 7a ll.padding.to.Gradient.Scale.siz
17500 65 2e 0d 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 69 66 20 28 e...........................if.(
17520 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 20 2b 20 70 61 64 64 69 6e 67 20 3e 20 67 72 61 64 69 65 style_padding.+.padding.>.gradie
17540 6e 74 53 63 61 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntScale)........................
17560 20 20 20 20 20 20 70 61 64 64 69 6e 67 20 3d 20 67 72 61 64 69 65 6e 74 53 63 61 6c 65 20 2d 20 ......padding.=.gradientScale.-.
17580 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 style_padding;..................
175a0 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d ....}......................else.
175c0 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 73 74 79 6c 65 5f 70 .........................style_p
175e0 61 64 64 69 6e 67 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 adding.=.0;.....................
17600 20 20 20 62 6f 6c 64 5f 78 41 64 76 61 6e 63 65 5f 6d 75 6c 74 69 70 6c 69 65 72 20 3d 20 31 20 ...bold_xAdvance_multiplier.=.1.
17620 2b 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 62 6f 6c 64 53 70 61 63 69 6e 67 +.m_currentFontAsset.boldSpacing
17640 20 2a 20 30 2e 30 31 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 .*.0.01f;..................}....
17660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..............else..............
17680 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d ....{......................if.(m
176a0 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2e 48 61 73 50 72 6f 70 65 72 74 79 28 53 68 61 _currentMaterial.HasProperty(Sha
176c0 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c 65 29 29 0d derUtilities.ID_GradientScale)).
176e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .....................{..........
17700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 67 72 61 64 69 65 6e 74 53 63 ................float.gradientSc
17720 61 6c 65 20 3d 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2e 47 65 74 46 6c 6f 61 74 ale.=.m_currentMaterial.GetFloat
17740 28 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 47 72 61 64 69 65 6e 74 53 63 61 6c (ShaderUtilities.ID_GradientScal
17760 65 29 3b 0d 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 73 74 79 e);..........................sty
17780 6c 65 5f 70 61 64 64 69 6e 67 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e le_padding.=.m_currentFontAsset.
177a0 6e 6f 72 6d 61 6c 53 74 79 6c 65 20 2f 20 34 2e 30 66 20 2a 20 67 72 61 64 69 65 6e 74 53 63 61 normalStyle./.4.0f.*.gradientSca
177c0 6c 65 20 2a 20 6d 5f 63 75 72 72 65 6e 74 4d 61 74 65 72 69 61 6c 2e 47 65 74 46 6c 6f 61 74 28 le.*.m_currentMaterial.GetFloat(
177e0 53 68 61 64 65 72 55 74 69 6c 69 74 69 65 73 2e 49 44 5f 53 63 61 6c 65 52 61 74 69 6f 5f 41 29 ShaderUtilities.ID_ScaleRatio_A)
17800 3b 0d 0a 0d 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 2f 2f 20 ;............................//.
17820 43 6c 61 6d 70 20 6f 76 65 72 61 6c 6c 20 70 61 64 64 69 6e 67 20 74 6f 20 47 72 61 64 69 65 6e Clamp.overall.padding.to.Gradien
17840 74 20 53 63 61 6c 65 20 73 69 7a 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.Scale.size....................
17860 20 20 20 20 20 20 20 69 66 20 28 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 20 2b 20 70 61 64 64 69 .......if.(style_padding.+.paddi
17880 6e 67 20 3e 20 67 72 61 64 69 65 6e 74 53 63 61 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ng.>.gradientScale).............
178a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61 64 64 69 6e 67 20 3d 20 67 72 61 64 69 .................padding.=.gradi
178c0 65 6e 74 53 63 61 6c 65 20 2d 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 3b 0d 0a 20 20 20 20 20 entScale.-.style_padding;.......
178e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
17900 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......else......................
17920 20 20 20 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 ....style_padding.=.0;..........
17940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6c 64 5f 78 41 64 76 61 6e 63 65 5f 6d 75 6c 74 ..............bold_xAdvance_mult
17960 69 70 6c 69 65 72 20 3d 20 31 2e 30 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 iplier.=.1.0f;..................
17980 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 48 61 }..................#endregion.Ha
179a0 6e 64 6c 65 20 53 74 79 6c 65 20 50 61 64 64 69 6e 67 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ndle.Style.Padding..............
179c0 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 74 68 65 20 70 6f 73 69 74 69 6f ........//.Determine.the.positio
179e0 6e 20 6f 66 20 74 68 65 20 76 65 72 74 69 63 65 73 20 6f 66 20 74 68 65 20 43 68 61 72 61 63 74 n.of.the.vertices.of.the.Charact
17a00 65 72 20 6f 72 20 53 70 72 69 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 er.or.Sprite...................#
17a20 72 65 67 69 6f 6e 20 43 61 6c 63 75 6c 61 74 65 20 56 65 72 74 69 63 65 73 20 50 6f 73 69 74 69 region.Calculate.Vertices.Positi
17a40 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 66 6f 6e 74 42 61 on..................float.fontBa
17a60 73 65 4c 69 6e 65 4f 66 66 73 65 74 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 seLineOffset.=.m_currentFontAsse
17a80 74 2e 66 61 63 65 49 6e 66 6f 2e 62 61 73 65 6c 69 6e 65 20 2a 20 6d 5f 66 6f 6e 74 53 63 61 6c t.faceInfo.baseline.*.m_fontScal
17aa0 65 20 2a 20 6d 5f 66 6f 6e 74 53 63 61 6c 65 4d 75 6c 74 69 70 6c 69 65 72 20 2a 20 6d 5f 63 75 e.*.m_fontScaleMultiplier.*.m_cu
17ac0 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 73 63 61 6c 65 3b 0d 0a rrentFontAsset.faceInfo.scale;..
17ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 74 6f 70 5f 6c 65 66 74 ................Vector3.top_left
17b00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 5f 6c 65 66 74 2e 78 20 3d 20 ;..................top_left.x.=.
17b20 6d 5f 78 41 64 76 61 6e 63 65 20 2b 20 28 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d m_xAdvance.+.((m_cached_TextElem
17b40 65 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 42 65 61 72 ent.glyph.metrics.horizontalBear
17b60 69 6e 67 58 20 2d 20 70 61 64 64 69 6e 67 20 2d 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 20 2b ingX.-.padding.-.style_padding.+
17b80 20 67 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 78 50 6c 61 63 65 6d 65 6e 74 29 20 2a 20 .glyphAdjustments.xPlacement).*.
17ba0 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 2a 20 28 31 20 2d 20 6d 5f 63 68 61 currentElementScale.*.(1.-.m_cha
17bc0 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rWidthAdjDelta));...............
17be0 20 20 20 74 6f 70 5f 6c 65 66 74 2e 79 20 3d 20 66 6f 6e 74 42 61 73 65 4c 69 6e 65 4f 66 66 73 ...top_left.y.=.fontBaseLineOffs
17c00 65 74 20 2b 20 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 et.+.(m_cached_TextElement.glyph
17c20 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 42 65 61 72 69 6e 67 59 20 2b 20 70 61 .metrics.horizontalBearingY.+.pa
17c40 64 64 69 6e 67 20 2b 20 67 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 79 50 6c 61 63 65 6d dding.+.glyphAdjustments.yPlacem
17c60 65 6e 74 29 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 2d 20 6d 5f 6c ent).*.currentElementScale.-.m_l
17c80 69 6e 65 4f 66 66 73 65 74 20 2b 20 6d 5f 62 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 ineOffset.+.m_baselineOffset;...
17ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 5f 6c 65 66 74 2e 7a 20 3d 20 30 3b 0d 0a ...............top_left.z.=.0;..
17cc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 62 6f 74 74 6f 6d ..................Vector3.bottom
17ce0 5f 6c 65 66 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 6c _left;..................bottom_l
17d00 65 66 74 2e 78 20 3d 20 74 6f 70 5f 6c 65 66 74 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 eft.x.=.top_left.x;.............
17d20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 6c 65 66 74 2e 79 20 3d 20 74 6f 70 5f 6c 65 66 74 2e 79 20 .....bottom_left.y.=.top_left.y.
17d40 2d 20 28 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 2e 6d -.((m_cached_TextElement.glyph.m
17d60 65 74 72 69 63 73 2e 68 65 69 67 68 74 20 2b 20 70 61 64 64 69 6e 67 20 2a 20 32 29 20 2a 20 63 etrics.height.+.padding.*.2).*.c
17d80 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 urrentElementScale);............
17da0 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 6c 65 66 74 2e 7a 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 ......bottom_left.z.=.0;........
17dc0 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 74 6f 70 5f 72 69 67 68 74 3b 0d 0a ............Vector3.top_right;..
17de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 5f 72 69 67 68 74 2e 78 20 3d 20 62 6f ................top_right.x.=.bo
17e00 74 74 6f 6d 5f 6c 65 66 74 2e 78 20 2b 20 28 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 ttom_left.x.+.((m_cached_TextEle
17e20 6d 65 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 77 69 64 74 68 20 2b 20 70 61 64 64 69 ment.glyph.metrics.width.+.paddi
17e40 6e 67 20 2a 20 32 20 2b 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 20 2a 20 32 29 20 2a 20 63 75 ng.*.2.+.style_padding.*.2).*.cu
17e60 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 2a 20 28 31 20 2d 20 6d 5f 63 68 61 72 57 rrentElementScale.*.(1.-.m_charW
17e80 69 64 74 68 41 64 6a 44 65 6c 74 61 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 idthAdjDelta));.................
17ea0 20 74 6f 70 5f 72 69 67 68 74 2e 79 20 3d 20 74 6f 70 5f 6c 65 66 74 2e 79 3b 0d 0a 20 20 20 20 .top_right.y.=.top_left.y;......
17ec0 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 5f 72 69 67 68 74 2e 7a 20 3d 20 30 3b 0d 0a 0d 0a ............top_right.z.=.0;....
17ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 62 6f 74 74 6f 6d 5f 72 ................Vector3.bottom_r
17f00 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 72 69 ight;..................bottom_ri
17f20 67 68 74 2e 78 20 3d 20 74 6f 70 5f 72 69 67 68 74 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ght.x.=.top_right.x;............
17f40 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 72 69 67 68 74 2e 79 20 3d 20 62 6f 74 74 6f 6d 5f 6c 65 ......bottom_right.y.=.bottom_le
17f60 66 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 72 69 ft.y;..................bottom_ri
17f80 67 68 74 2e 7a 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 ght.z.=.0;..................#end
17fa0 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 region......................//.C
17fc0 68 65 63 6b 20 69 66 20 77 65 20 6e 65 65 64 20 74 6f 20 53 68 65 61 72 20 74 68 65 20 72 65 63 heck.if.we.need.to.Shear.the.rec
17fe0 74 61 6e 67 6c 65 73 20 66 6f 72 20 49 74 61 6c 69 63 20 73 74 79 6c 65 73 0d 0a 20 20 20 20 20 tangles.for.Italic.styles.......
18000 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 49 74 61 6c 69 63 ...........#region.Handle.Italic
18020 20 26 20 53 68 65 61 72 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 .&.Shearing..................if.
18040 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c (m_textElementType.==.TMP_TextEl
18060 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 20 26 26 20 21 69 73 55 73 69 6e 67 41 ementType.Character.&&.!isUsingA
18080 6c 74 54 79 70 65 66 61 63 65 20 26 26 20 28 2f 2a 28 6d 5f 66 6f 6e 74 53 74 79 6c 65 20 26 20 ltTypeface.&&.(/*(m_fontStyle.&.
180a0 46 6f 6e 74 53 74 79 6c 65 73 2e 49 74 61 6c 69 63 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 FontStyles.Italic).==.FontStyles
180c0 2e 49 74 61 6c 69 63 20 7c 7c 2a 2f 20 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 .Italic.||*/.(m_FontStyleInterna
180e0 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 49 74 61 6c 69 63 29 20 3d 3d 20 46 6f 6e 74 53 74 l.&.FontStyles.Italic).==.FontSt
18100 79 6c 65 73 2e 49 74 61 6c 69 63 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b yles.Italic))..................{
18120 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 68 69 66 74 20 54 ......................//.Shift.T
18140 6f 70 20 76 65 72 74 69 63 65 73 20 66 6f 72 77 61 72 64 20 62 79 20 68 61 6c 66 20 28 53 68 65 op.vertices.forward.by.half.(She
18160 61 72 20 56 61 6c 75 65 20 2a 20 68 65 69 67 68 74 20 6f 66 20 63 68 61 72 61 63 74 65 72 29 20 ar.Value.*.height.of.character).
18180 61 6e 64 20 42 6f 74 74 6f 6d 20 76 65 72 74 69 63 65 73 20 62 61 63 6b 20 62 79 20 73 61 6d 65 and.Bottom.vertices.back.by.same
181a0 20 61 6d 6f 75 6e 74 2e 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 .amount........................f
181c0 6c 6f 61 74 20 73 68 65 61 72 5f 76 61 6c 75 65 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 loat.shear_value.=.m_currentFont
181e0 41 73 73 65 74 2e 69 74 61 6c 69 63 53 74 79 6c 65 20 2a 20 30 2e 30 31 66 3b 0d 0a 20 20 20 20 Asset.italicStyle.*.0.01f;......
18200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 74 6f 70 53 68 65 61 72 ................Vector3.topShear
18220 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 73 68 65 61 72 5f 76 61 6c 75 65 20 2a 20 28 28 6d .=.new.Vector3(shear_value.*.((m
18240 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 _cached_TextElement.glyph.metric
18260 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 42 65 61 72 69 6e 67 59 20 2b 20 70 61 64 64 69 6e 67 20 2b s.horizontalBearingY.+.padding.+
18280 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 29 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 .style_padding).*.currentElement
182a0 53 63 61 6c 65 29 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Scale),.0,.0);..................
182c0 20 20 20 20 56 65 63 74 6f 72 33 20 62 6f 74 74 6f 6d 53 68 65 61 72 20 3d 20 6e 65 77 20 56 65 ....Vector3.bottomShear.=.new.Ve
182e0 63 74 6f 72 33 28 73 68 65 61 72 5f 76 61 6c 75 65 20 2a 20 28 28 28 6d 5f 63 61 63 68 65 64 5f ctor3(shear_value.*.(((m_cached_
18300 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f TextElement.glyph.metrics.horizo
18320 6e 74 61 6c 42 65 61 72 69 6e 67 59 20 2d 20 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d ntalBearingY.-.m_cached_TextElem
18340 65 6e 74 2e 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 68 65 69 67 68 74 20 2d 20 70 61 64 64 69 ent.glyph.metrics.height.-.paddi
18360 6e 67 20 2d 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 29 29 20 2a 20 63 75 72 72 65 6e 74 45 6c ng.-.style_padding)).*.currentEl
18380 65 6d 65 6e 74 53 63 61 6c 65 29 2c 20 30 2c 20 30 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ementScale),.0,.0);.............
183a0 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 5f 6c 65 66 74 20 3d 20 74 6f 70 5f 6c 65 66 74 20 2b ...........top_left.=.top_left.+
183c0 20 74 6f 70 53 68 65 61 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .topShear;......................
183e0 62 6f 74 74 6f 6d 5f 6c 65 66 74 20 3d 20 62 6f 74 74 6f 6d 5f 6c 65 66 74 20 2b 20 62 6f 74 74 bottom_left.=.bottom_left.+.bott
18400 6f 6d 53 68 65 61 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f omShear;......................to
18420 70 5f 72 69 67 68 74 20 3d 20 74 6f 70 5f 72 69 67 68 74 20 2b 20 74 6f 70 53 68 65 61 72 3b 0d p_right.=.top_right.+.topShear;.
18440 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 72 69 67 68 .....................bottom_righ
18460 74 20 3d 20 62 6f 74 74 6f 6d 5f 72 69 67 68 74 20 2b 20 62 6f 74 74 6f 6d 53 68 65 61 72 3b 0d t.=.bottom_right.+.bottomShear;.
18480 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
184a0 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 49 74 61 6c 69 63 73 20 26 20 ....#endregion.Handle.Italics.&.
184c0 53 68 65 61 72 69 6e 67 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f Shearing......................//
184e0 20 48 61 6e 64 6c 65 20 43 68 61 72 61 63 74 65 72 20 52 6f 74 61 74 69 6f 6e 0d 0a 20 20 20 20 .Handle.Character.Rotation......
18500 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 43 68 61 72 61 ............#region.Handle.Chara
18520 63 74 65 72 20 52 6f 74 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 cter.Rotation..................i
18540 66 20 28 6d 5f 69 73 46 58 4d 61 74 72 69 78 53 65 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 f.(m_isFXMatrixSet).............
18560 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 .....{......................//.A
18580 70 70 6c 79 20 73 63 61 6c 65 20 6d 61 74 72 69 78 20 77 68 65 6e 20 73 69 6d 75 6c 61 74 69 6e pply.scale.matrix.when.simulatin
185a0 67 20 43 6f 6e 64 65 6e 73 65 64 20 74 65 78 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 g.Condensed.text................
185c0 20 20 20 20 20 20 20 69 66 20 28 6d 5f 46 58 4d 61 74 72 69 78 2e 6c 6f 73 73 79 53 63 61 6c 65 .......if.(m_FXMatrix.lossyScale
185e0 2e 78 20 21 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d .x.!=.1)......................{.
18600 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 2f 2f 74 6f 70 5f 6c .........................//top_l
18620 65 66 74 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 2e 4d 75 6c 74 69 70 6c 79 50 6f 69 6e 74 33 78 eft.=.m_FXMatrix.MultiplyPoint3x
18640 34 28 74 6f 70 5f 6c 65 66 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4(top_left);....................
18660 20 20 20 20 20 20 2f 2f 62 6f 74 74 6f 6d 5f 6c 65 66 74 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 ......//bottom_left.=.m_FXMatrix
18680 2e 4d 75 6c 74 69 70 6c 79 50 6f 69 6e 74 33 78 34 28 62 6f 74 74 6f 6d 5f 6c 65 66 74 29 3b 0d .MultiplyPoint3x4(bottom_left);.
186a0 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 2f 2f 74 6f 70 5f 72 .........................//top_r
186c0 69 67 68 74 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 2e 4d 75 6c 74 69 70 6c 79 50 6f 69 6e 74 33 ight.=.m_FXMatrix.MultiplyPoint3
186e0 78 34 28 74 6f 70 5f 72 69 67 68 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 x4(top_right);..................
18700 20 20 20 20 20 20 20 20 2f 2f 62 6f 74 74 6f 6d 5f 72 69 67 68 74 20 3d 20 6d 5f 46 58 4d 61 74 ........//bottom_right.=.m_FXMat
18720 72 69 78 2e 4d 75 6c 74 69 70 6c 79 50 6f 69 6e 74 33 78 34 28 62 6f 74 74 6f 6d 5f 72 69 67 68 rix.MultiplyPoint3x4(bottom_righ
18740 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 t);......................}......
18760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 70 6f 73 69 74 69 ..................Vector3.positi
18780 6f 6e 4f 66 66 73 65 74 20 3d 20 28 74 6f 70 5f 72 69 67 68 74 20 2b 20 62 6f 74 74 6f 6d 5f 6c onOffset.=.(top_right.+.bottom_l
187a0 65 66 74 29 20 2f 20 32 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eft)./.2;.......................
187c0 20 74 6f 70 5f 6c 65 66 74 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 2e 4d 75 6c 74 69 70 6c 79 50 .top_left.=.m_FXMatrix.MultiplyP
187e0 6f 69 6e 74 33 78 34 28 74 6f 70 5f 6c 65 66 74 20 2d 20 70 6f 73 69 74 69 6f 6e 4f 66 66 73 65 oint3x4(top_left.-.positionOffse
18800 74 29 20 2b 20 70 6f 73 69 74 69 6f 6e 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 t).+.positionOffset;............
18820 20 20 20 20 20 20 20 20 20 20 62 6f 74 74 6f 6d 5f 6c 65 66 74 20 3d 20 6d 5f 46 58 4d 61 74 72 ..........bottom_left.=.m_FXMatr
18840 69 78 2e 4d 75 6c 74 69 70 6c 79 50 6f 69 6e 74 33 78 34 28 62 6f 74 74 6f 6d 5f 6c 65 66 74 20 ix.MultiplyPoint3x4(bottom_left.
18860 2d 20 70 6f 73 69 74 69 6f 6e 4f 66 66 73 65 74 29 20 2b 20 70 6f 73 69 74 69 6f 6e 4f 66 66 73 -.positionOffset).+.positionOffs
18880 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 70 5f 72 69 67 et;......................top_rig
188a0 68 74 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 2e 4d 75 6c 74 69 70 6c 79 50 6f 69 6e 74 33 78 34 ht.=.m_FXMatrix.MultiplyPoint3x4
188c0 28 74 6f 70 5f 72 69 67 68 74 20 2d 20 70 6f 73 69 74 69 6f 6e 4f 66 66 73 65 74 29 20 2b 20 70 (top_right.-.positionOffset).+.p
188e0 6f 73 69 74 69 6f 6e 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ositionOffset;..................
18900 20 20 20 20 62 6f 74 74 6f 6d 5f 72 69 67 68 74 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 2e 4d 75 ....bottom_right.=.m_FXMatrix.Mu
18920 6c 74 69 70 6c 79 50 6f 69 6e 74 33 78 34 28 62 6f 74 74 6f 6d 5f 72 69 67 68 74 20 2d 20 70 6f ltiplyPoint3x4(bottom_right.-.po
18940 73 69 74 69 6f 6e 4f 66 66 73 65 74 29 20 2b 20 70 6f 73 69 74 69 6f 6e 4f 66 66 73 65 74 3b 0d sitionOffset).+.positionOffset;.
18960 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
18980 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ....#endregion..................
189a0 20 20 20 20 2f 2f 20 53 74 6f 72 65 20 76 65 72 74 65 78 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 ....//.Store.vertex.information.
189c0 66 6f 72 20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 6f 72 20 73 70 72 69 74 65 2e 0d 0a 20 20 for.the.character.or.sprite.....
189e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 ..............m_textInfo.charact
18a00 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 62 6f 74 74 6f 6d 4c erInfo[m_characterCount].bottomL
18a20 65 66 74 20 3d 20 62 6f 74 74 6f 6d 5f 6c 65 66 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 eft.=.bottom_left;..............
18a40 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 ....m_textInfo.characterInfo[m_c
18a60 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 74 6f 70 4c 65 66 74 20 3d 20 74 6f 70 5f 6c 65 66 haracterCount].topLeft.=.top_lef
18a80 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 t;..................m_textInfo.c
18aa0 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 74 haracterInfo[m_characterCount].t
18ac0 6f 70 52 69 67 68 74 20 3d 20 74 6f 70 5f 72 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 opRight.=.top_right;............
18ae0 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d ......m_textInfo.characterInfo[m
18b00 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 62 6f 74 74 6f 6d 52 69 67 68 74 20 3d 20 62 _characterCount].bottomRight.=.b
18b20 6f 74 74 6f 6d 5f 72 69 67 68 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ottom_right;....................
18b40 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 m_textInfo.characterInfo[m_chara
18b60 63 74 65 72 43 6f 75 6e 74 5d 2e 6f 72 69 67 69 6e 20 3d 20 6d 5f 78 41 64 76 61 6e 63 65 3b 0d cterCount].origin.=.m_xAdvance;.
18b80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 .................m_textInfo.char
18ba0 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 62 61 73 65 acterInfo[m_characterCount].base
18bc0 4c 69 6e 65 20 3d 20 66 6f 6e 74 42 61 73 65 4c 69 6e 65 4f 66 66 73 65 74 20 2d 20 6d 5f 6c 69 Line.=.fontBaseLineOffset.-.m_li
18be0 6e 65 4f 66 66 73 65 74 20 2b 20 6d 5f 62 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 neOffset.+.m_baselineOffset;....
18c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 ..............m_textInfo.charact
18c20 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 61 73 70 65 63 74 52 erInfo[m_characterCount].aspectR
18c40 61 74 69 6f 20 3d 20 28 74 6f 70 5f 72 69 67 68 74 2e 78 20 2d 20 62 6f 74 74 6f 6d 5f 6c 65 66 atio.=.(top_right.x.-.bottom_lef
18c60 74 2e 78 29 20 2f 20 28 74 6f 70 5f 6c 65 66 74 2e 79 20 2d 20 62 6f 74 74 6f 6d 5f 6c 65 66 74 t.x)./.(top_left.y.-.bottom_left
18c80 2e 79 29 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d .y);......................//.Com
18ca0 70 75 74 65 20 61 6e 64 20 73 61 76 65 20 74 65 78 74 20 65 6c 65 6d 65 6e 74 20 41 73 63 65 6e pute.and.save.text.element.Ascen
18cc0 64 65 72 20 61 6e 64 20 6d 61 78 69 6d 75 6d 20 6c 69 6e 65 20 41 73 63 65 6e 64 65 72 2e 0d 0a der.and.maximum.line.Ascender...
18ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 65 6c 65 6d 65 6e 74 41 73 63 ................float.elementAsc
18d00 65 6e 64 65 72 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 ender.=.m_currentFontAsset.faceI
18d20 6e 66 6f 2e 61 73 63 65 6e 74 4c 69 6e 65 20 2a 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 nfo.ascentLine.*.(m_textElementT
18d40 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 ype.==.TMP_TextElementType.Chara
18d60 63 74 65 72 20 3f 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 2f 20 73 6d 61 cter.?.currentElementScale./.sma
18d80 6c 6c 43 61 70 73 4d 75 6c 74 69 70 6c 69 65 72 20 3a 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 llCapsMultiplier.:.m_textInfo.ch
18da0 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 73 63 aracterInfo[m_characterCount].sc
18dc0 61 6c 65 29 20 2b 20 6d 5f 62 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 ale).+.m_baselineOffset;........
18de0 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e ..........m_textInfo.characterIn
18e00 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 61 73 63 65 6e 64 65 72 20 3d 20 fo[m_characterCount].ascender.=.
18e20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 20 2d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d elementAscender.-.m_lineOffset;.
18e40 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 .................m_maxLineAscend
18e60 65 72 20 3d 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 20 3e 20 6d 5f 6d 61 78 4c 69 6e 65 er.=.elementAscender.>.m_maxLine
18e80 41 73 63 65 6e 64 65 72 20 3f 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 20 3a 20 6d 5f 6d Ascender.?.elementAscender.:.m_m
18ea0 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 axLineAscender;.................
18ec0 20 20 20 2f 2f 20 43 6f 6d 70 75 74 65 20 61 6e 64 20 73 61 76 65 20 74 65 78 74 20 65 6c 65 6d ...//.Compute.and.save.text.elem
18ee0 65 6e 74 20 44 65 73 63 65 6e 64 65 72 20 61 6e 64 20 6d 61 78 69 6d 75 6d 20 6c 69 6e 65 20 44 ent.Descender.and.maximum.line.D
18f00 65 73 63 65 6e 64 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 escender...................float
18f20 20 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e .elementDescender.=.m_currentFon
18f40 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 64 65 73 63 65 6e 74 4c 69 6e 65 20 2a 20 28 6d tAsset.faceInfo.descentLine.*.(m
18f60 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d _textElementType.==.TMP_TextElem
18f80 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 20 3f 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 entType.Character.?.currentEleme
18fa0 6e 74 53 63 61 6c 65 20 2f 20 73 6d 61 6c 6c 43 61 70 73 4d 75 6c 74 69 70 6c 69 65 72 20 3a 20 ntScale./.smallCapsMultiplier.:.
18fc0 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 m_textInfo.characterInfo[m_chara
18fe0 63 74 65 72 43 6f 75 6e 74 5d 2e 73 63 61 6c 65 29 20 2b 20 6d 5f 62 61 73 65 6c 69 6e 65 4f 66 cterCount].scale).+.m_baselineOf
19000 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 65 6c 65 fset;..................float.ele
19020 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 49 49 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 mentDescenderII.=.m_textInfo.cha
19040 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 64 65 73 racterInfo[m_characterCount].des
19060 63 65 6e 64 65 72 20 3d 20 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 20 2d 20 6d 5f 6c 69 cender.=.elementDescender.-.m_li
19080 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 neOffset;..................m_max
190a0 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3d 20 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 LineDescender.=.elementDescender
190c0 20 3c 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3f 20 65 6c 65 6d 65 6e 74 44 .<.m_maxLineDescender.?.elementD
190e0 65 73 63 65 6e 64 65 72 20 3a 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 3b 0d 0a escender.:.m_maxLineDescender;..
19100 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 6a 75 73 74 20 6d 61 78 4c ..................//.Adjust.maxL
19120 69 6e 65 41 73 63 65 6e 64 65 72 20 61 6e 64 20 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 ineAscender.and.maxLineDescender
19140 20 69 66 20 73 74 79 6c 65 20 69 73 20 73 75 70 65 72 73 63 72 69 70 74 20 6f 72 20 73 75 62 73 .if.style.is.superscript.or.subs
19160 63 72 69 70 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 6d 5f 46 6f cript..................if.((m_Fo
19180 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 53 75 62 ntStyleInternal.&.FontStyles.Sub
191a0 73 63 72 69 70 74 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 53 75 62 73 63 72 69 70 74 20 script).==.FontStyles.Subscript.
191c0 7c 7c 20 28 6d 5f 46 6f 6e 74 53 74 79 6c 65 49 6e 74 65 72 6e 61 6c 20 26 20 46 6f 6e 74 53 74 ||.(m_FontStyleInternal.&.FontSt
191e0 79 6c 65 73 2e 53 75 70 65 72 73 63 72 69 70 74 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e yles.Superscript).==.FontStyles.
19200 53 75 70 65 72 73 63 72 69 70 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d Superscript)..................{.
19220 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 62 61 73 65 41 .....................float.baseA
19240 73 63 65 6e 64 65 72 20 3d 20 28 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 20 2d 20 6d 5f 62 scender.=.(elementAscender.-.m_b
19260 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 29 20 2f 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 aselineOffset)./.m_currentFontAs
19280 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 73 75 62 73 63 72 69 70 74 53 69 7a 65 3b 0d 0a 20 20 20 set.faceInfo.subscriptSize;.....
192a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 .................elementAscender
192c0 20 3d 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 .=.m_maxLineAscender;...........
192e0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 62 ...........m_maxLineAscender.=.b
19300 61 73 65 41 73 63 65 6e 64 65 72 20 3e 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 aseAscender.>.m_maxLineAscender.
19320 3f 20 62 61 73 65 41 73 63 65 6e 64 65 72 20 3a 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 ?.baseAscender.:.m_maxLineAscend
19340 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 er;........................float
19360 20 62 61 73 65 44 65 73 63 65 6e 64 65 72 20 3d 20 28 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 .baseDescender.=.(elementDescend
19380 65 72 20 2d 20 6d 5f 62 61 73 65 6c 69 6e 65 4f 66 66 73 65 74 29 20 2f 20 6d 5f 63 75 72 72 65 er.-.m_baselineOffset)./.m_curre
193a0 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 73 75 62 73 63 72 69 70 74 53 69 ntFontAsset.faceInfo.subscriptSi
193c0 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 ze;......................element
193e0 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 3b 0d Descender.=.m_maxLineDescender;.
19400 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 .....................m_maxLineDe
19420 73 63 65 6e 64 65 72 20 3d 20 62 61 73 65 44 65 73 63 65 6e 64 65 72 20 3c 20 6d 5f 6d 61 78 4c scender.=.baseDescender.<.m_maxL
19440 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3f 20 62 61 73 65 44 65 73 63 65 6e 64 65 72 20 3a 20 6d ineDescender.?.baseDescender.:.m
19460 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 _maxLineDescender;..............
19480 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c ....}....................if.(m_l
194a0 69 6e 65 4e 75 6d 62 65 72 20 3d 3d 20 30 20 7c 7c 20 6d 5f 69 73 4e 65 77 50 61 67 65 29 0d 0a ineNumber.==.0.||.m_isNewPage)..
194c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
194e0 20 20 20 20 20 20 20 6d 5f 6d 61 78 41 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 41 73 63 65 .......m_maxAscender.=.m_maxAsce
19500 6e 64 65 72 20 3e 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 20 3f 20 6d 5f 6d 61 78 41 73 nder.>.elementAscender.?.m_maxAs
19520 63 65 6e 64 65 72 20 3a 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 cender.:.elementAscender;.......
19540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 43 61 70 48 65 69 67 68 74 20 3d 20 ...............m_maxCapHeight.=.
19560 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 6d 61 78 43 61 70 48 65 69 67 68 74 2c 20 6d 5f 63 75 72 72 Mathf.Max(m_maxCapHeight,.m_curr
19580 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 63 61 70 4c 69 6e 65 20 2a 20 entFontAsset.faceInfo.capLine.*.
195a0 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 2f 20 73 6d 61 6c 6c 43 61 70 73 4d currentElementScale./.smallCapsM
195c0 75 6c 74 69 70 6c 69 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ultiplier);..................}..
195e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 ................if.(m_lineOffset
19600 20 3d 3d 20 30 29 20 70 61 67 65 41 73 63 65 6e 64 65 72 20 3d 20 70 61 67 65 41 73 63 65 6e 64 .==.0).pageAscender.=.pageAscend
19620 65 72 20 3e 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 20 3f 20 70 61 67 65 41 73 63 65 6e er.>.elementAscender.?.pageAscen
19640 64 65 72 20 3a 20 65 6c 65 6d 65 6e 74 41 73 63 65 6e 64 65 72 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 der.:.elementAscender;..........
19660 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 43 68 61 72 61 63 74 65 72 73 20 74 6f ............//.Set.Characters.to
19680 20 6e 6f 74 20 76 69 73 69 62 6c 65 20 62 79 20 64 65 66 61 75 6c 74 2e 0d 0a 20 20 20 20 20 20 .not.visible.by.default.........
196a0 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e ..........m_textInfo.characterIn
196c0 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 20 3d fo[m_characterCount].isVisible.=
196e0 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 .false;....................//.Se
19700 74 75 70 20 4d 65 73 68 20 66 6f 72 20 76 69 73 69 62 6c 65 20 74 65 78 74 20 65 6c 65 6d 65 6e tup.Mesh.for.visible.text.elemen
19720 74 73 2e 20 69 65 2e 20 6e 6f 74 20 61 20 53 50 41 43 45 20 2f 20 4c 49 4e 45 46 45 45 44 20 2f ts..ie..not.a.SPACE./.LINEFEED./
19740 20 43 41 52 52 49 41 47 45 20 52 45 54 55 52 4e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .CARRIAGE.RETURN................
19760 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 56 69 73 69 62 6c 65 20 43 68 61 72 61 63 ...#region.Handle.Visible.Charac
19780 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 43 6f ters..................if.(charCo
197a0 64 65 20 3d 3d 20 39 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 41 30 20 7c 7c 20 63 de.==.9.||.charCode.==.0xA0.||.c
197c0 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 32 30 30 37 20 7c 7c 20 28 21 63 68 61 72 2e 49 73 57 68 harCode.==.0x2007.||.(!char.IsWh
197e0 69 74 65 53 70 61 63 65 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 20 26 26 20 63 68 61 72 iteSpace((char)charCode).&&.char
19800 43 6f 64 65 20 21 3d 20 30 78 32 30 30 42 29 20 7c 7c 20 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 Code.!=.0x200B).||.m_textElement
19820 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 53 70 72 69 Type.==.TMP_TextElementType.Spri
19840 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 te)..................{..........
19860 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 ............m_textInfo.character
19880 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 Info[m_characterCount].isVisible
198a0 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.true;........................
198c0 23 72 65 67 69 6f 6e 20 45 78 70 65 72 69 6d 65 6e 74 61 6c 20 4d 61 72 67 69 6e 20 53 68 61 70 #region.Experimental.Margin.Shap
198e0 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 56 65 63 74 6f 72 er......................//Vector
19900 32 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2.shapedMargins;................
19920 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 61 72 67 69 6e 53 68 61 70 65 72 29 0d 0a 20 20 20 20 20 ......//if.(marginShaper).......
19940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...............//{..............
19960 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 20 3d 20 6d 5f ........//....shapedMargins.=.m_
19980 6d 61 72 67 69 6e 53 68 61 70 65 72 2e 47 65 74 53 68 61 70 65 64 4d 61 72 67 69 6e 73 28 6d 5f marginShaper.GetShapedMargins(m_
199a0 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 textInfo.characterInfo[m_charact
199c0 65 72 43 6f 75 6e 74 5d 2e 62 61 73 65 4c 69 6e 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 erCount].baseLine);.............
199e0 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 73 68 61 70 65 64 4d 61 72 67 69 6e 73 .........//....if.(shapedMargins
19a00 2e 78 20 3c 20 6d 61 72 67 69 6e 73 2e 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .x.<.margins.x).................
19a20 20 20 20 20 20 2f 2f 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....//....{....................
19a40 20 20 2f 2f 20 20 20 20 20 20 20 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 78 20 3d 20 6d 5f ..//........shapedMargins.x.=.m_
19a60 6d 61 72 67 69 6e 4c 65 66 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 marginLeft;.....................
19a80 20 2f 2f 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .//....}......................//
19aa0 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f ....else......................//
19ac0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 ....{......................//...
19ae0 20 20 20 20 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 78 20 2b 3d 20 6d 5f 6d 61 72 67 69 6e .....shapedMargins.x.+=.m_margin
19b00 4c 65 66 74 20 2d 20 6d 61 72 67 69 6e 73 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Left.-.margins.x;...............
19b20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......//....}..................
19b40 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 79 20 3c 20 ....//....if.(shapedMargins.y.<.
19b60 6d 61 72 67 69 6e 73 2e 7a 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 margins.z)......................
19b80 2f 2f 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 //....{......................//.
19ba0 20 20 20 20 20 20 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 79 20 3d 20 6d 5f 6d 61 72 67 69 .......shapedMargins.y.=.m_margi
19bc0 6e 52 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 nRight;......................//.
19be0 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 ...}......................//....
19c00 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 else......................//....
19c20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 {......................//.......
19c40 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 79 20 2b 3d 20 6d 5f 6d 61 72 67 69 6e 52 69 67 68 .shapedMargins.y.+=.m_marginRigh
19c60 74 20 2d 20 6d 61 72 67 69 6e 73 2e 7a 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t.-.margins.z;..................
19c80 20 20 20 20 2f 2f 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....//....}.....................
19ca0 20 2f 2f 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 65 6c 73 65 .//}......................//else
19cc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 ......................//{.......
19ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 73 68 61 70 65 64 4d 61 72 67 69 ...............//....shapedMargi
19d00 6e 73 2e 78 20 3d 20 6d 5f 6d 61 72 67 69 6e 4c 65 66 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ns.x.=.m_marginLeft;............
19d20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 79 20 ..........//....shapedMargins.y.
19d40 3d 20 6d 5f 6d 61 72 67 69 6e 52 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.m_marginRight;................
19d60 20 20 20 20 20 20 2f 2f 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ......//}....................../
19d80 2f 77 69 64 74 68 20 3d 20 6d 61 72 67 69 6e 57 69 64 74 68 20 2b 20 30 2e 30 30 30 31 66 20 2d /width.=.marginWidth.+.0.0001f.-
19da0 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 78 20 2d 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 .shapedMargins.x.-.shapedMargins
19dc0 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d .y;......................//if.(m
19de0 5f 77 69 64 74 68 20 21 3d 20 2d 31 20 26 26 20 6d 5f 77 69 64 74 68 20 3c 20 77 69 64 74 68 29 _width.!=.-1.&&.m_width.<.width)
19e00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 ......................//{.......
19e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 77 69 64 74 68 20 3d 20 6d 5f 77 ...............//....width.=.m_w
19e40 69 64 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d 0d 0a idth;......................//}..
19e60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 74 65 78 74 49 6e 66 6f ....................//m_textInfo
19e80 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6d 61 72 67 69 6e 4c 65 .lineInfo[m_lineNumber].marginLe
19ea0 66 74 20 3d 20 73 68 61 70 65 64 4d 61 72 67 69 6e 73 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 ft.=.shapedMargins.x;...........
19ec0 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 ...........#endregion...........
19ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 77 69 64 74 68 20 3d 20 6d 5f 77 69 64 74 68 20 21 3d 20 .............width.=.m_width.!=.
19f00 2d 31 20 3f 20 4d 61 74 68 66 2e 4d 69 6e 28 6d 61 72 67 69 6e 57 69 64 74 68 20 2b 20 30 2e 30 -1.?.Mathf.Min(marginWidth.+.0.0
19f20 30 30 31 66 20 2d 20 6d 5f 6d 61 72 67 69 6e 4c 65 66 74 20 2d 20 6d 5f 6d 61 72 67 69 6e 52 69 001f.-.m_marginLeft.-.m_marginRi
19f40 67 68 74 2c 20 6d 5f 77 69 64 74 68 29 20 3a 20 6d 61 72 67 69 6e 57 69 64 74 68 20 2b 20 30 2e ght,.m_width).:.marginWidth.+.0.
19f60 30 30 30 31 66 20 2d 20 6d 5f 6d 61 72 67 69 6e 4c 65 66 74 20 2d 20 6d 5f 6d 61 72 67 69 6e 52 0001f.-.m_marginLeft.-.m_marginR
19f80 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 ight;......................m_tex
19fa0 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6d 61 72 tInfo.lineInfo[m_lineNumber].mar
19fc0 67 69 6e 4c 65 66 74 20 3d 20 6d 5f 6d 61 72 67 69 6e 4c 65 66 74 3b 0d 0a 0d 0a 20 20 20 20 20 ginLeft.=.m_marginLeft;.........
19fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 4a 75 73 74 69 66 69 65 64 4f ...............bool.isJustifiedO
1a000 72 46 6c 75 73 68 20 3d 20 28 28 5f 48 6f 72 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f rFlush.=.((_HorizontalAlignmentO
1a020 70 74 69 6f 6e 73 29 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 26 20 5f 48 6f ptions)m_lineJustification.&._Ho
1a040 72 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 46 6c 75 73 68 29 20 rizontalAlignmentOptions.Flush).
1a060 3d 3d 20 5f 48 6f 72 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 46 ==._HorizontalAlignmentOptions.F
1a080 6c 75 73 68 20 7c 7c 20 28 28 5f 48 6f 72 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 lush.||.((_HorizontalAlignmentOp
1a0a0 74 69 6f 6e 73 29 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 26 20 5f 48 6f 72 tions)m_lineJustification.&._Hor
1a0c0 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4a 75 73 74 69 66 69 65 izontalAlignmentOptions.Justifie
1a0e0 64 29 20 3d 3d 20 5f 48 6f 72 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e d).==._HorizontalAlignmentOption
1a100 73 2e 4a 75 73 74 69 66 69 65 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.Justified;....................
1a120 20 20 20 20 2f 2f 20 43 61 6c 63 75 6c 61 74 65 20 74 68 65 20 6c 69 6e 65 20 62 72 65 61 6b 69 ....//.Calculate.the.line.breaki
1a140 6e 67 20 77 69 64 74 68 20 6f 66 20 74 68 65 20 74 65 78 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 ng.width.of.the.text............
1a160 20 20 20 20 20 20 20 20 20 20 20 6c 69 6e 65 62 72 65 61 6b 69 6e 67 57 69 64 74 68 20 3d 20 4d ...........linebreakingWidth.=.M
1a180 61 74 68 66 2e 41 62 73 28 6d 5f 78 41 64 76 61 6e 63 65 29 20 2b 20 28 21 6d 5f 69 73 52 69 67 athf.Abs(m_xAdvance).+.(!m_isRig
1a1a0 68 74 54 6f 4c 65 66 74 20 3f 20 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e htToLeft.?.m_cached_TextElement.
1a1c0 67 6c 79 70 68 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 41 64 76 61 6e 63 65 20 glyph.metrics.horizontalAdvance.
1a1e0 3a 20 30 29 20 2a 20 28 31 20 2d 20 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 29 :.0).*.(1.-.m_charWidthAdjDelta)
1a200 20 2a 20 28 63 68 61 72 43 6f 64 65 20 21 3d 20 30 78 41 44 20 3f 20 63 75 72 72 65 6e 74 45 6c .*.(charCode.!=.0xAD.?.currentEl
1a220 65 6d 65 6e 74 53 63 61 6c 65 20 3a 20 6f 6c 64 5f 73 63 61 6c 65 29 3b 0d 0a 0d 0a 20 20 20 20 ementScale.:.old_scale);........
1a240 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 69 66 20 43 68 61 72 ................//.Check.if.Char
1a260 61 63 74 65 72 20 65 78 63 65 65 64 73 20 74 68 65 20 77 69 64 74 68 20 6f 66 20 74 68 65 20 54 acter.exceeds.the.width.of.the.T
1a280 65 78 74 20 43 6f 6e 74 61 69 6e 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ext.Container...................
1a2a0 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 4c 69 6e 65 20 42 72 65 61 6b 69 6e 67 2c ...#region.Handle.Line.Breaking,
1a2c0 20 54 65 78 74 20 41 75 74 6f 2d 53 69 7a 69 6e 67 20 61 6e 64 20 48 6f 72 69 7a 6f 6e 74 61 6c .Text.Auto-Sizing.and.Horizontal
1a2e0 20 4f 76 65 72 66 6c 6f 77 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 .Overflow......................i
1a300 66 20 28 6c 69 6e 65 62 72 65 61 6b 69 6e 67 57 69 64 74 68 20 3e 20 77 69 64 74 68 20 2a 20 28 f.(linebreakingWidth.>.width.*.(
1a320 69 73 4a 75 73 74 69 66 69 65 64 4f 72 46 6c 75 73 68 20 3f 20 31 2e 30 35 66 20 3a 20 31 2e 30 isJustifiedOrFlush.?.1.05f.:.1.0
1a340 66 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 f))......................{......
1a360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 6c 69 70 73 69 73 49 6e 64 65 ....................ellipsisInde
1a380 78 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 3b 20 2f 2f 20 4c 61 73 x.=.m_characterCount.-.1;.//.Las
1a3a0 74 20 73 61 66 65 6c 79 20 72 65 6e 64 65 72 65 64 20 63 68 61 72 61 63 74 65 72 0d 0a 0d 0a 20 t.safely.rendered.character.....
1a3c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 6f 72 64 20 57 .......................//.Word.W
1a3e0 72 61 70 70 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rapping.........................
1a400 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 57 6f 72 64 20 57 72 61 70 70 69 6e 67 0d 0a 20 .#region.Handle.Word.Wrapping...
1a420 20 20 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 65 6e 61 62 6c .......................if.(enabl
1a440 65 57 6f 72 64 57 72 61 70 70 69 6e 67 20 26 26 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e eWordWrapping.&&.m_characterCoun
1a460 74 20 21 3d 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 29 0d 0a 20 20 t.!=.m_firstCharacterOfLine)....
1a480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
1a4a0 20 20 20 20 20 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 69 66 .....................//.Check.if
1a4c0 20 77 6f 72 64 20 77 72 61 70 70 69 6e 67 20 69 73 20 73 74 69 6c 6c 20 70 6f 73 73 69 62 6c 65 .word.wrapping.is.still.possible
1a4e0 0d 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 20 20 23 72 ..............................#r
1a500 65 67 69 6f 6e 20 4c 69 6e 65 20 42 72 65 61 6b 69 6e 67 20 43 68 65 63 6b 0d 0a 20 20 20 20 20 egion.Line.Breaking.Check.......
1a520 20 20 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 77 72 61 70 70 .......................if.(wrapp
1a540 69 6e 67 49 6e 64 65 78 20 3d 3d 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 74 61 74 65 ingIndex.==.m_SavedWordWrapState
1a560 2e 70 72 65 76 69 6f 75 73 5f 57 6f 72 64 42 72 65 61 6b 20 7c 7c 20 69 73 46 69 72 73 74 57 6f .previous_WordBreak.||.isFirstWo
1a580 72 64 29 0d 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 20 rd).............................
1a5a0 20 7b 0d 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 20 20 .{..............................
1a5c0 20 20 20 20 2f 2f 20 57 6f 72 64 20 77 72 61 70 70 69 6e 67 20 69 73 20 6e 6f 20 6c 6f 6e 67 65 ....//.Word.wrapping.is.no.longe
1a5e0 72 20 70 6f 73 73 69 62 6c 65 2e 20 53 68 72 69 6e 6b 20 73 69 7a 65 20 6f 66 20 74 65 78 74 20 r.possible..Shrink.size.of.text.
1a600 69 66 20 61 75 74 6f 2d 73 69 7a 69 6e 67 20 69 73 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 if.auto-sizing.is.enabled.......
1a620 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 20 69 66 20 28 ............................if.(
1a640 6d 5f 65 6e 61 62 6c 65 41 75 74 6f 53 69 7a 69 6e 67 20 26 26 20 6d 5f 66 6f 6e 74 53 69 7a 65 m_enableAutoSizing.&&.m_fontSize
1a660 20 3e 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .>.m_fontSizeMin)...............
1a680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
1a6a0 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 2f 2f 20 48 61 6e ..........................//.Han
1a6c0 64 6c 65 20 43 68 61 72 61 63 74 65 72 20 57 69 64 74 68 20 41 64 6a 75 73 74 6d 65 6e 74 73 0d dle.Character.Width.Adjustments.
1a6e0 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 20 20 20 20 20 ................................
1a700 20 20 20 20 20 23 72 65 67 69 6f 6e 20 43 68 61 72 61 63 74 65 72 20 57 69 64 74 68 20 41 64 6a .....#region.Character.Width.Adj
1a720 75 73 74 6d 65 6e 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ustments........................
1a740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a ..............if.(m_charWidthAdj
1a760 44 65 6c 74 61 20 3c 20 6d 5f 63 68 61 72 57 69 64 74 68 4d 61 78 41 64 6a 20 2f 20 31 30 30 29 Delta.<.m_charWidthMaxAdj./.100)
1a780 0d 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 20 20 20 20 ................................
1a7a0 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......{.........................
1a7c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 6f 70 43 6f 75 6e 74 41 20 3d 20 30 3b .................loopCountA.=.0;
1a7e0 0d 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 20 20 20 20 ................................
1a800 20 20 20 20 20 20 20 20 20 20 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 20 2b 3d ..........m_charWidthAdjDelta.+=
1a820 20 30 2e 30 31 66 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .0.01f;.........................
1a840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 .................GenerateTextMes
1a860 68 28 29 3b 0d 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 h();............................
1a880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 ..............return;...........
1a8a0 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 7d 0d 0a 20 20 ...........................}....
1a8c0 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 20 20 20 20 20 ................................
1a8e0 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..#endregion....................
1a900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 6a 75 73 74 20 50 6f ....................//.Adjust.Po
1a920 69 6e 74 20 53 69 7a 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 int.Size........................
1a940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 46 6f 6e 74 53 69 7a 65 20 3d 20 6d 5f ..............m_maxFontSize.=.m_
1a960 66 6f 6e 74 53 69 7a 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 fontSize;.......................
1a980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 2d 3d 20 4d .................m_fontSize.-=.M
1a9a0 61 74 68 66 2e 4d 61 78 28 28 6d 5f 66 6f 6e 74 53 69 7a 65 20 2d 20 6d 5f 6d 69 6e 46 6f 6e 74 athf.Max((m_fontSize.-.m_minFont
1a9c0 53 69 7a 65 29 20 2f 20 32 2c 20 30 2e 30 35 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Size)./.2,.0.05f);..............
1a9e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 69 ........................m_fontSi
1aa00 7a 65 20 3d 20 28 69 6e 74 29 28 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 66 6f 6e 74 53 69 7a 65 2c ze.=.(int)(Mathf.Max(m_fontSize,
1aa20 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 6e 29 20 2a 20 32 30 20 2b 20 30 2e 35 66 29 20 2f 20 32 .m_fontSizeMin).*.20.+.0.5f)./.2
1aa40 30 66 3b 0d 0a 0d 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 0f;.............................
1aa60 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 6f 6f 70 43 6f 75 6e 74 41 20 3e 20 32 30 29 20 ...........if.(loopCountA.>.20).
1aa80 72 65 74 75 72 6e 3b 20 2f 2f 20 41 64 64 65 64 20 74 6f 20 64 65 62 75 67 0d 0a 20 20 20 20 20 return;.//.Added.to.debug.......
1aaa0 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 20 20 20 20 47 ...............................G
1aac0 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 enerateTextMesh();..............
1aae0 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 3b 0d ........................return;.
1ab00 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 20 20 20 20 20 ................................
1ab20 20 7d 0d 0a 0d 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 .}..............................
1ab40 20 20 20 20 20 20 2f 2f 20 57 6f 72 64 20 77 72 61 70 70 69 6e 67 20 69 73 20 6e 6f 20 6c 6f 6e ......//.Word.wrapping.is.no.lon
1ab60 67 65 72 20 70 6f 73 73 69 62 6c 65 2c 20 6e 6f 77 20 62 72 65 61 6b 69 6e 67 20 75 70 20 69 6e ger.possible,.now.breaking.up.in
1ab80 64 69 76 69 64 75 61 6c 20 77 6f 72 64 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dividual.words..................
1aba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 43 68 61 72 61 63 74 .................if.(m_isCharact
1abc0 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 20 3d 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 erWrappingEnabled.==.false).....
1abe0 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 20 20 7b 0d 0a .............................{..
1ac00 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 20 20 20 20 20 ................................
1ac20 20 20 20 20 69 66 20 28 69 67 6e 6f 72 65 4e 6f 6e 42 72 65 61 6b 69 6e 67 53 70 61 63 65 20 3d ....if.(ignoreNonBreakingSpace.=
1ac40 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.false)........................
1ac60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 67 6e 6f 72 65 4e 6f 6e 42 72 65 61 6b ..................ignoreNonBreak
1ac80 69 6e 67 53 70 61 63 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ingSpace.=.true;................
1aca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 ......................else......
1acc0 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 20 20 20 20 20 ................................
1ace0 20 20 20 20 6d 5f 69 73 43 68 61 72 61 63 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 ....m_isCharacterWrappingEnabled
1ad00 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.true;........................
1ad20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........}.....................
1ad40 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .............else...............
1ad60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4c 61 73 74 42 72 65 .......................isLastBre
1ad80 61 6b 69 6e 67 43 68 61 72 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 akingChar.=.true;...............
1ada0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 72 65 63 75 72 73 69 .....................//m_recursi
1adc0 76 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 veCount.+=.1;...................
1ade0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 5f 72 65 63 75 72 73 69 76 65 ...............//if.(m_recursive
1ae00 43 6f 75 6e 74 20 3e 20 32 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Count.>.20).....................
1ae20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............//{................
1ae40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 44 65 62 75 67 2e 4c 6f ..................//....Debug.Lo
1ae60 67 28 22 52 65 63 75 72 73 69 76 65 20 63 6f 75 6e 74 20 65 78 63 65 65 64 65 64 21 22 29 3b 0d g("Recursive.count.exceeded!");.
1ae80 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 20 20 20 20 20 ................................
1aea0 20 2f 2f 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .//....continue;................
1aec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d 0d 0a 20 20 20 20 20 20 20 20 20 ..................//}...........
1aee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................}............
1af00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a ..................#endregion....
1af20 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 20 2f 2f 20 52 ............................//.R
1af40 65 73 74 6f 72 65 20 74 6f 20 70 72 65 76 69 6f 75 73 6c 79 20 73 74 6f 72 65 64 20 73 74 61 74 estore.to.previously.stored.stat
1af60 65 20 6f 66 20 6c 61 73 74 20 76 61 6c 69 64 20 28 73 70 61 63 65 20 63 68 61 72 61 63 74 65 72 e.of.last.valid.(space.character
1af80 20 6f 72 20 6c 69 6e 65 66 65 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .or.linefeed)...................
1afa0 20 20 20 20 20 20 20 20 20 20 20 69 20 3d 20 52 65 73 74 6f 72 65 57 6f 72 64 57 72 61 70 70 69 ...........i.=.RestoreWordWrappi
1afc0 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 74 61 74 65 ngState(ref.m_SavedWordWrapState
1afe0 29 3b 0d 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 20 20 );..............................
1b000 77 72 61 70 70 69 6e 67 49 6e 64 65 78 20 3d 20 69 3b 20 20 2f 2f 20 55 73 65 64 20 74 6f 20 64 wrappingIndex.=.i;..//.Used.to.d
1b020 65 74 65 63 74 20 77 68 65 6e 20 6c 69 6e 65 20 6c 65 6e 67 74 68 20 63 61 6e 20 6e 6f 20 6c 6f etect.when.line.length.can.no.lo
1b040 6e 67 65 72 20 62 65 20 72 65 64 75 63 65 64 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nger.be.reduced.................
1b060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 69 6e 67 20 66 6f 72 20 ................//.Handling.for.
1b080 53 6f 66 74 20 48 79 70 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Soft.Hyphen.....................
1b0a0 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 .........if.(m_TextParsingBuffer
1b0c0 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 3d 3d 20 30 78 41 44 29 20 2f 2f 20 26 26 20 21 6d 5f 69 73 [i].unicode.==.0xAD).//.&&.!m_is
1b0e0 43 68 61 72 61 63 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 29 20 2f 2f 20 26 26 20 CharacterWrappingEnabled).//.&&.
1b100 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 20 21 3d 20 69 20 26 26 20 21 6d 5f 69 73 43 68 61 72 61 ellipsisIndex.!=.i.&&.!m_isChara
1b120 63 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 cterWrappingEnabled)............
1b140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
1b160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 54 65 78 74 54 72 75 .....................m_isTextTru
1b180 6e 63 61 74 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ncated.=.true;..................
1b1a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 ................m_TextParsingBuf
1b1c0 66 65 72 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 3d 20 30 78 32 44 3b 0d 0a 20 20 20 20 20 20 20 20 fer[i].unicode.=.0x2D;..........
1b1e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 ........................Generate
1b200 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 TextMesh();.....................
1b220 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .............return;............
1b240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ..................}.............
1b260 20 20 20 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 ...................//Debug.Log("
1b280 4c 61 73 74 20 56 69 73 69 62 6c 65 20 43 68 61 72 61 63 74 65 72 20 6f 66 20 6c 69 6e 65 20 23 Last.Visible.Character.of.line.#
1b2a0 20 22 20 2b 20 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 2b 20 22 20 69 73 20 5b 22 20 2b 20 6d 5f .".+.m_lineNumber.+.".is.[".+.m_
1b2c0 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 6c 61 73 74 56 69 73 textInfo.characterInfo[m_lastVis
1b2e0 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 63 68 61 72 61 63 74 65 72 20 2b ibleCharacterOfLine].character.+
1b300 20 22 20 43 68 61 72 61 63 74 65 72 20 43 6f 75 6e 74 3a 20 22 20 2b 20 6d 5f 63 68 61 72 61 63 .".Character.Count:.".+.m_charac
1b320 74 65 72 43 6f 75 6e 74 20 2b 20 22 20 4c 61 73 74 20 76 69 73 69 62 6c 65 3a 20 22 20 2b 20 6d terCount.+.".Last.visible:.".+.m
1b340 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 29 3b 0d 0a 0d _lastVisibleCharacterOfLine);...
1b360 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 20 20 2f 2f 20 .............................//.
1b380 43 68 65 63 6b 20 69 66 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 6f 66 20 70 72 65 76 69 6f 75 Check.if.Line.Spacing.of.previou
1b3a0 73 20 6c 69 6e 65 20 6e 65 65 64 73 20 74 6f 20 62 65 20 61 64 6a 75 73 74 65 64 2e 0d 0a 20 20 s.line.needs.to.be.adjusted.....
1b3c0 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 69 66 20 28 6d 5f ..........................if.(m_
1b3e0 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 20 30 20 26 26 20 21 54 4d 50 5f 4d 61 74 68 2e 41 70 70 72 lineNumber.>.0.&&.!TMP_Math.Appr
1b400 6f 78 69 6d 61 74 65 6c 79 28 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 2c 20 6d 5f 73 oximately(m_maxLineAscender,.m_s
1b420 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 29 20 26 26 20 6d 5f 6c 69 6e 65 48 65 69 tartOfLineAscender).&&.m_lineHei
1b440 67 68 74 20 3d 3d 20 54 4d 50 5f 4d 61 74 68 2e 46 4c 4f 41 54 5f 55 4e 53 45 54 20 26 26 20 21 ght.==.TMP_Math.FLOAT_UNSET.&&.!
1b460 6d 5f 69 73 4e 65 77 50 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 m_isNewPage)....................
1b480 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
1b4a0 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 28 4c 69 6e 65 20 .............//Debug.Log("(Line.
1b4c0 42 72 65 61 6b 20 2d 20 41 64 6a 75 73 74 69 6e 67 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 6f Break.-.Adjusting.Line.Spacing.o
1b4e0 6e 20 6c 69 6e 65 20 23 22 20 2b 20 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 29 3b 0d 0a 20 20 20 20 n.line.#".+.m_lineNumber);......
1b500 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 20 66 6c 6f 61 ............................floa
1b520 74 20 6f 66 66 73 65 74 44 65 6c 74 61 20 3d 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 t.offsetDelta.=.m_maxLineAscende
1b540 72 20 2d 20 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 r.-.m_startOfLineAscender;......
1b560 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 20 41 64 6a 75 ............................Adju
1b580 73 74 4c 69 6e 65 4f 66 66 73 65 74 28 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c stLineOffset(m_firstCharacterOfL
1b5a0 69 6e 65 2c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 2c 20 6f 66 66 73 65 74 44 65 6c ine,.m_characterCount,.offsetDel
1b5c0 74 61 29 3b 0d 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 ta);............................
1b5e0 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 20 2b 3d 20 6f 66 66 73 65 74 44 65 6c 74 ......m_lineOffset.+=.offsetDelt
1b600 61 3b 0d 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 20 20 a;..............................
1b620 20 20 20 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 74 61 74 65 2e 6c 69 6e 65 4f 66 66 ....m_SavedWordWrapState.lineOff
1b640 73 65 74 20 3d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 set.=.m_lineOffset;.............
1b660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 61 76 65 64 57 6f 72 64 .....................m_SavedWord
1b680 57 72 61 70 53 74 61 74 65 2e 70 72 65 76 69 6f 75 73 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d WrapState.previousLineAscender.=
1b6a0 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 .m_maxLineAscender;.............
1b6c0 20 20 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 20 2d .......................//.TODO.-
1b6e0 20 41 64 64 20 63 68 65 63 6b 20 66 6f 72 20 63 68 61 72 61 63 74 65 72 20 65 78 63 65 65 64 69 .Add.check.for.character.exceedi
1b700 6e 67 20 76 65 72 74 69 63 61 6c 20 62 6f 75 6e 64 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ng.vertical.bounds..............
1b720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
1b740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 4e 65 77 50 61 67 65 20 3d 20 66 61 6c ...............m_isNewPage.=.fal
1b760 73 65 3b 0d 0a 0d 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 se;.............................
1b780 20 20 20 2f 2f 20 43 61 6c 63 75 6c 61 74 65 20 6c 69 6e 65 41 73 63 65 6e 64 65 72 20 26 20 6d ...//.Calculate.lineAscender.&.m
1b7a0 61 6b 65 20 73 75 72 65 20 69 66 20 6c 61 73 74 20 63 68 61 72 61 63 74 65 72 20 69 73 20 73 75 ake.sure.if.last.character.is.su
1b7c0 70 65 72 73 63 72 69 70 74 20 6f 72 20 73 75 62 73 63 72 69 70 74 20 74 68 61 74 20 77 65 20 63 perscript.or.subscript.that.we.c
1b7e0 68 65 63 6b 20 74 68 61 74 20 61 73 20 77 65 6c 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 heck.that.as.well...............
1b800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6c 69 6e 65 41 73 63 65 6e 64 ................float.lineAscend
1b820 65 72 20 3d 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 2d 20 6d 5f 6c 69 6e 65 4f er.=.m_maxLineAscender.-.m_lineO
1b840 66 66 73 65 74 3b 0d 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 ffset;..........................
1b860 20 20 20 20 66 6c 6f 61 74 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 4c ....float.lineDescender.=.m_maxL
1b880 69 6e 65 44 65 73 63 65 6e 64 65 72 20 2d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 0d 0a ineDescender.-.m_lineOffset;....
1b8a0 0d 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 20 20 2f 2f ..............................//
1b8c0 20 55 70 64 61 74 65 20 6d 61 78 44 65 73 63 65 6e 64 65 72 20 61 6e 64 20 6d 61 78 56 69 73 69 .Update.maxDescender.and.maxVisi
1b8e0 62 6c 65 44 65 73 63 65 6e 64 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 bleDescender....................
1b900 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 ..........m_maxDescender.=.m_max
1b920 44 65 73 63 65 6e 64 65 72 20 3c 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3f 20 6d 5f 6d 61 Descender.<.lineDescender.?.m_ma
1b940 78 44 65 73 63 65 6e 64 65 72 20 3a 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 xDescender.:.lineDescender;.....
1b960 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 69 66 20 28 21 69 73 .........................if.(!is
1b980 4d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 53 65 74 29 0d 0a 20 20 20 20 20 20 20 MaxVisibleDescenderSet).........
1b9a0 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 6d 61 78 56 69 73 69 .........................maxVisi
1b9c0 62 6c 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 44 65 73 63 65 6e 64 65 72 3b 0d 0a bleDescender.=.m_maxDescender;..
1b9e0 0d 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 20 20 69 66 ..............................if
1ba00 20 28 6d 5f 75 73 65 4d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 20 26 26 20 28 6d .(m_useMaxVisibleDescender.&&.(m
1ba20 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3e 3d 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 43 _characterCount.>=.m_maxVisibleC
1ba40 68 61 72 61 63 74 65 72 73 20 7c 7c 20 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 3d 20 6d 5f 6d haracters.||.m_lineNumber.>=.m_m
1ba60 61 78 56 69 73 69 62 6c 65 4c 69 6e 65 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 axVisibleLines))................
1ba80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 4d 61 78 56 69 73 69 62 6c 65 44 65 ..................isMaxVisibleDe
1baa0 73 63 65 6e 64 65 72 53 65 74 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 scenderSet.=.true;..............
1bac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 61 63 6b 20 26 20 53 74 6f ..................//.Track.&.Sto
1bae0 72 65 20 6c 69 6e 65 49 6e 66 6f 20 66 6f 72 20 74 68 65 20 6e 65 77 20 6c 69 6e 65 0d 0a 20 20 re.lineInfo.for.the.new.line....
1bb00 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 6d 5f 74 65 78 74 ..........................m_text
1bb20 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 66 69 72 73 Info.lineInfo[m_lineNumber].firs
1bb40 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 tCharacterIndex.=.m_firstCharact
1bb60 65 72 4f 66 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erOfLine;.......................
1bb80 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e .......m_textInfo.lineInfo[m_lin
1bba0 65 4e 75 6d 62 65 72 5d 2e 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e eNumber].firstVisibleCharacterIn
1bbc0 64 65 78 20 3d 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c dex.=.m_firstVisibleCharacterOfL
1bbe0 69 6e 65 20 3d 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3e 20 6d ine.=.m_firstCharacterOfLine.>.m
1bc00 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3f 20 6d _firstVisibleCharacterOfLine.?.m
1bc20 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3a 20 6d 5f 66 69 72 73 74 56 _firstCharacterOfLine.:.m_firstV
1bc40 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 isibleCharacterOfLine;..........
1bc60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c ....................m_textInfo.l
1bc80 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 61 73 74 43 68 61 72 61 63 ineInfo[m_lineNumber].lastCharac
1bca0 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 6c 61 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 terIndex.=.m_lastCharacterOfLine
1bcc0 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 20 3e 20 30 20 3f 20 6d 5f .=.m_characterCount.-.1.>.0.?.m_
1bce0 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 20 3a 20 30 3b 0d 0a 20 20 20 20 20 20 20 characterCount.-.1.:.0;.........
1bd00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e .....................m_textInfo.
1bd20 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 61 73 74 56 69 73 69 62 lineInfo[m_lineNumber].lastVisib
1bd40 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 leCharacterIndex.=.m_lastVisible
1bd60 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 CharacterOfLine.=.m_lastVisibleC
1bd80 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3c 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 haracterOfLine.<.m_firstVisibleC
1bda0 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3f 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 haracterOfLine.?.m_firstVisibleC
1bdc0 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3a 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 haracterOfLine.:.m_lastVisibleCh
1bde0 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aracterOfLine;..................
1be00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 ..............m_textInfo.lineInf
1be20 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d o[m_lineNumber].characterCount.=
1be40 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 .m_textInfo.lineInfo[m_lineNumbe
1be60 72 5d 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 2d 20 6d 5f 74 65 78 74 49 6e r].lastCharacterIndex.-.m_textIn
1be80 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 66 69 72 73 74 43 fo.lineInfo[m_lineNumber].firstC
1bea0 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 haracterIndex.+.1;..............
1bec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 ................m_textInfo.lineI
1bee0 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 76 69 73 69 62 6c 65 43 68 61 72 61 63 74 nfo[m_lineNumber].visibleCharact
1bf00 65 72 43 6f 75 6e 74 20 3d 20 6d 5f 6c 69 6e 65 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 erCount.=.m_lineVisibleCharacter
1bf20 43 6f 75 6e 74 3b 0d 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 Count;..........................
1bf40 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 ....m_textInfo.lineInfo[m_lineNu
1bf60 6d 62 65 72 5d 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 20 3d 20 6e 65 77 20 56 65 63 74 mber].lineExtents.min.=.new.Vect
1bf80 6f 72 32 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 66 or2(m_textInfo.characterInfo[m_f
1bfa0 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 62 6f 74 74 irstVisibleCharacterOfLine].bott
1bfc0 6f 6d 4c 65 66 74 2e 78 2c 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 20 omLeft.x,.lineDescender);.......
1bfe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .......................m_textInf
1c000 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 69 6e 65 45 78 74 o.lineInfo[m_lineNumber].lineExt
1c020 65 6e 74 73 2e 6d 61 78 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 6d 5f 74 65 78 74 49 6e 66 ents.max.=.new.Vector2(m_textInf
1c040 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 o.characterInfo[m_lastVisibleCha
1c060 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6c 69 6e 65 41 73 racterOfLine].topRight.x,.lineAs
1c080 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 cender);........................
1c0a0 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 ......m_textInfo.lineInfo[m_line
1c0c0 4e 75 6d 62 65 72 5d 2e 6c 65 6e 67 74 68 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 Number].length.=.m_textInfo.line
1c0e0 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d Info[m_lineNumber].lineExtents.m
1c100 61 78 2e 78 3b 0d 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 ax.x;...........................
1c120 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d ...m_textInfo.lineInfo[m_lineNum
1c140 62 65 72 5d 2e 77 69 64 74 68 20 3d 20 77 69 64 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ber].width.=.width;.............
1c160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 74 65 78 74 49 6e 66 6f 2e ...................//m_textInfo.
1c180 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 61 6c 69 67 6e 6d 65 6e 74 lineInfo[m_lineNumber].alignment
1c1a0 20 3d 20 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 .=.m_lineJustification;.........
1c1c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .......................m_textInf
1c1e0 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6d 61 78 41 64 76 61 o.lineInfo[m_lineNumber].maxAdva
1c200 6e 63 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d nce.=.m_textInfo.characterInfo[m
1c220 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 78 41 64 _lastVisibleCharacterOfLine].xAd
1c240 76 61 6e 63 65 20 2d 20 28 63 68 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d vance.-.(characterSpacingAdjustm
1c260 65 6e 74 20 2b 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 6e 6f 72 6d 61 6c 53 ent.+.m_currentFontAsset.normalS
1c280 70 61 63 69 6e 67 4f 66 66 73 65 74 29 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 pacingOffset).*.currentElementSc
1c2a0 61 6c 65 20 2d 20 6d 5f 63 53 70 61 63 69 6e 67 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ale.-.m_cSpacing;...............
1c2c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 .................m_textInfo.line
1c2e0 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 62 61 73 65 6c 69 6e 65 20 3d 20 30 20 Info[m_lineNumber].baseline.=.0.
1c300 2d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 -.m_lineOffset;.................
1c320 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f .............m_textInfo.lineInfo
1c340 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 61 73 63 65 6e 64 65 72 20 3d 20 6c 69 6e 65 41 73 [m_lineNumber].ascender.=.lineAs
1c360 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 cender;.........................
1c380 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e .....m_textInfo.lineInfo[m_lineN
1c3a0 75 6d 62 65 72 5d 2e 64 65 73 63 65 6e 64 65 72 20 3d 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 umber].descender.=.lineDescender
1c3c0 3b 0d 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 20 20 6d ;..............................m
1c3e0 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d _textInfo.lineInfo[m_lineNumber]
1c400 2e 6c 69 6e 65 48 65 69 67 68 74 20 3d 20 6c 69 6e 65 41 73 63 65 6e 64 65 72 20 2d 20 6c 69 6e .lineHeight.=.lineAscender.-.lin
1c420 65 44 65 73 63 65 6e 64 65 72 20 2b 20 6c 69 6e 65 47 61 70 20 2a 20 62 61 73 65 53 63 61 6c 65 eDescender.+.lineGap.*.baseScale
1c440 3b 0d 0a 0d 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 20 ;...............................
1c460 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 6d 5f 63 68 61 72 .m_firstCharacterOfLine.=.m_char
1c480 61 63 74 65 72 43 6f 75 6e 74 3b 20 2f 2f 20 53 74 6f 72 65 20 66 69 72 73 74 20 63 68 61 72 61 acterCount;.//.Store.first.chara
1c4a0 63 74 65 72 20 6f 66 20 74 68 65 20 6e 65 78 74 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 cter.of.the.next.line...........
1c4c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 56 69 73 69 62 6c ....................m_lineVisibl
1c4e0 65 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 eCharacterCount.=.0;............
1c500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 72 65 20 74 68 65 ....................//.Store.the
1c520 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 6c 69 6e 65 20 62 65 66 6f 72 65 20 73 74 61 72 74 69 .state.of.the.line.before.starti
1c540 6e 67 20 6f 6e 20 74 68 65 20 6e 65 77 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ng.on.the.new.line..............
1c560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 61 76 65 57 6f 72 64 57 72 61 70 70 69 6e .................SaveWordWrappin
1c580 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 65 64 4c 69 6e 65 53 74 61 74 65 2c 20 69 2c 20 gState(ref.m_SavedLineState,.i,.
1c5a0 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 m_characterCount.-.1);..........
1c5c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4e 75 6d 62 ......................m_lineNumb
1c5e0 65 72 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 er.+=.1;........................
1c600 20 20 20 20 20 20 69 73 53 74 61 72 74 4f 66 4e 65 77 4c 69 6e 65 20 3d 20 74 72 75 65 3b 0d 0a ......isStartOfNewLine.=.true;..
1c620 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 20 69 73 46 69 ............................isFi
1c640 72 73 74 57 6f 72 64 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rstWord.=.true;.................
1c660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 74 6f 20 6d 61 6b 65 20 ...............//.Check.to.make.
1c680 73 75 72 65 20 41 72 72 61 79 20 69 73 20 6c 61 72 67 65 20 65 6e 6f 75 67 68 20 74 6f 20 68 6f sure.Array.is.large.enough.to.ho
1c6a0 6c 64 20 61 20 6e 65 77 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ld.a.new.line...................
1c6c0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 3d 20 ............if.(m_lineNumber.>=.
1c6e0 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 m_textInfo.lineInfo.Length).....
1c700 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 20 20 52 65 73 .............................Res
1c720 69 7a 65 4c 69 6e 65 45 78 74 65 6e 74 73 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 29 3b 0d 0a 0d izeLineExtents(m_lineNumber);...
1c740 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 20 20 2f 2f 20 .............................//.
1c760 41 70 70 6c 79 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 62 61 73 65 64 20 6f 6e 20 73 63 61 6c Apply.Line.Spacing.based.on.scal
1c780 65 20 6f 66 20 74 68 65 20 6c 61 73 74 20 63 68 61 72 61 63 74 65 72 20 6f 66 20 74 68 65 20 6c e.of.the.last.character.of.the.l
1c7a0 69 6e 65 2e 0d 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 ine.............................
1c7c0 20 20 69 66 20 28 6d 5f 6c 69 6e 65 48 65 69 67 68 74 20 3d 3d 20 54 4d 50 5f 4d 61 74 68 2e 46 ..if.(m_lineHeight.==.TMP_Math.F
1c7e0 4c 4f 41 54 5f 55 4e 53 45 54 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 LOAT_UNSET).....................
1c800 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
1c820 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 61 73 63 65 6e 64 65 72 20 3d 20 6d 5f 74 ............float.ascender.=.m_t
1c840 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 extInfo.characterInfo[m_characte
1c860 72 43 6f 75 6e 74 5d 2e 61 73 63 65 6e 64 65 72 20 2d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 rCount].ascender.-.m_textInfo.ch
1c880 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 62 61 aracterInfo[m_characterCount].ba
1c8a0 73 65 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 seLine;.........................
1c8c0 20 20 20 20 20 20 20 20 20 6c 69 6e 65 4f 66 66 73 65 74 44 65 6c 74 61 20 3d 20 30 20 2d 20 6d .........lineOffsetDelta.=.0.-.m
1c8e0 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 2b 20 61 73 63 65 6e 64 65 72 20 2b 20 28 _maxLineDescender.+.ascender.+.(
1c900 6c 69 6e 65 47 61 70 20 2b 20 6d 5f 6c 69 6e 65 53 70 61 63 69 6e 67 20 2b 20 6d 5f 6c 69 6e 65 lineGap.+.m_lineSpacing.+.m_line
1c920 53 70 61 63 69 6e 67 44 65 6c 74 61 29 20 2a 20 62 61 73 65 53 63 61 6c 65 3b 0d 0a 20 20 20 20 SpacingDelta).*.baseScale;......
1c940 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 20 6d 5f 6c 69 ............................m_li
1c960 6e 65 4f 66 66 73 65 74 20 2b 3d 20 6c 69 6e 65 4f 66 66 73 65 74 44 65 6c 74 61 3b 0d 0a 0d 0a neOffset.+=.lineOffsetDelta;....
1c980 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 20 20 20 20 20 ................................
1c9a0 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 61 73 63 65 6e 64 65 72 m_startOfLineAscender.=.ascender
1c9c0 3b 0d 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 20 20 7d ;..............................}
1c9e0 0d 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 20 20 65 6c ..............................el
1ca00 73 65 0d 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 20 20 se..............................
1ca20 20 20 20 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 20 2b 3d 20 6d 5f 6c 69 6e 65 48 65 69 67 68 74 ....m_lineOffset.+=.m_lineHeight
1ca40 20 2b 20 6d 5f 6c 69 6e 65 53 70 61 63 69 6e 67 20 2a 20 62 61 73 65 53 63 61 6c 65 3b 0d 0a 0d .+.m_lineSpacing.*.baseScale;...
1ca60 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 20 20 6d 5f 6d .............................m_m
1ca80 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 6b 5f 4c 61 72 67 65 4e 65 67 61 74 69 76 65 axLineAscender.=.k_LargeNegative
1caa0 46 6c 6f 61 74 3b 0d 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 Float;..........................
1cac0 20 20 20 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6b 5f 4c 61 72 67 65 ....m_maxLineDescender.=.k_Large
1cae0 50 6f 73 69 74 69 76 65 46 6c 6f 61 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 PositiveFloat;..................
1cb00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 3d 20 30 20 2b 20 74 ..............m_xAdvance.=.0.+.t
1cb20 61 67 5f 49 6e 64 65 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ag_Indent;......................
1cb40 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..........continue;.............
1cb60 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............}..................
1cb80 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 45 6e 64 20 57 6f 72 64 20 57 72 61 70 ........#endregion.End.Word.Wrap
1cba0 70 69 6e 67 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ping............................
1cbc0 20 20 2f 2f 20 54 65 78 74 20 41 75 74 6f 2d 53 69 7a 69 6e 67 20 28 74 65 78 74 20 65 78 63 65 ..//.Text.Auto-Sizing.(text.exce
1cbe0 65 64 69 6e 67 20 57 69 64 74 68 20 6f 66 20 63 6f 6e 74 61 69 6e 65 72 2e 20 0d 0a 20 20 20 20 eding.Width.of.container........
1cc00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 ....................#region.Hand
1cc20 6c 65 20 54 65 78 74 20 41 75 74 6f 2d 53 69 7a 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 le.Text.Auto-Sizing.............
1cc40 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 65 6e 61 62 6c 65 41 75 74 6f 53 69 7a .............if.(m_enableAutoSiz
1cc60 69 6e 67 20 26 26 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 3e 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 ing.&&.m_fontSize.>.m_fontSizeMi
1cc80 6e 29 0d 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 7b 0d 0a 20 n)..........................{...
1cca0 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 2f 2f 20 48 61 ...........................//.Ha
1ccc0 6e 64 6c 65 20 43 68 61 72 61 63 74 65 72 20 57 69 64 74 68 20 41 64 6a 75 73 74 6d 65 6e 74 73 ndle.Character.Width.Adjustments
1cce0 0d 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 20 20 23 72 ..............................#r
1cd00 65 67 69 6f 6e 20 43 68 61 72 61 63 74 65 72 20 57 69 64 74 68 20 41 64 6a 75 73 74 6d 65 6e 74 egion.Character.Width.Adjustment
1cd20 73 0d 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 20 20 69 s..............................i
1cd40 66 20 28 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 20 3c 20 6d 5f 63 68 61 72 57 f.(m_charWidthAdjDelta.<.m_charW
1cd60 69 64 74 68 4d 61 78 41 64 6a 20 2f 20 31 30 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 idthMaxAdj./.100)...............
1cd80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
1cda0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 6f 70 43 6f 75 6e 74 41 20 3d 20 30 ..................loopCountA.=.0
1cdc0 3b 0d 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 20 20 20 ;...............................
1cde0 20 20 20 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 20 2b 3d 20 30 2e 30 31 66 3b ...m_charWidthAdjDelta.+=.0.01f;
1ce00 0d 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 20 20 20 20 ................................
1ce20 20 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ..GenerateTextMesh();...........
1ce40 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 3b 0d 0a .......................return;..
1ce60 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 20 7d 0d 0a 20 ............................}...
1ce80 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 23 65 6e 64 72 ...........................#endr
1cea0 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 egion...........................
1cec0 20 20 20 20 20 2f 2f 20 41 64 6a 75 73 74 20 50 6f 69 6e 74 20 53 69 7a 65 0d 0a 20 20 20 20 20 .....//.Adjust.Point.Size.......
1cee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 46 6f 6e 74 .......................m_maxFont
1cf00 53 69 7a 65 20 3d 20 6d 5f 66 6f 6e 74 53 69 7a 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 Size.=.m_fontSize;..............
1cf20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 2d 3d 20 ..................m_fontSize.-=.
1cf40 4d 61 74 68 66 2e 4d 61 78 28 28 6d 5f 66 6f 6e 74 53 69 7a 65 20 2d 20 6d 5f 6d 69 6e 46 6f 6e Mathf.Max((m_fontSize.-.m_minFon
1cf60 74 53 69 7a 65 29 20 2f 20 32 2c 20 30 2e 30 35 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 tSize)./.2,.0.05f);.............
1cf80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 3d 20 28 69 .................m_fontSize.=.(i
1cfa0 6e 74 29 28 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 66 6f 6e 74 53 69 7a 65 2c 20 6d 5f 66 6f 6e 74 nt)(Mathf.Max(m_fontSize,.m_font
1cfc0 53 69 7a 65 4d 69 6e 29 20 2a 20 32 30 20 2b 20 30 2e 35 66 29 20 2f 20 32 30 66 3b 0d 0a 0d 0a SizeMin).*.20.+.0.5f)./.20f;....
1cfe0 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 20 2f 2f 6d 5f ............................//m_
1d000 72 65 63 75 72 73 69 76 65 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 recursiveCount.=.0;.............
1d020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c 6f 6f 70 43 6f 75 6e 74 41 20 .................if.(loopCountA.
1d040 3e 20 32 30 29 20 72 65 74 75 72 6e 3b 20 2f 2f 20 41 64 64 65 64 20 74 6f 20 64 65 62 75 67 20 >.20).return;.//.Added.to.debug.
1d060 0d 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 20 20 47 65 ..............................Ge
1d080 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nerateTextMesh();...............
1d0a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 ...............return;..........
1d0c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
1d0e0 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 45 6e 64 20 54 65 78 74 20 41 ...........#endregion.End.Text.A
1d100 75 74 6f 2d 53 69 7a 69 6e 67 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 uto-Sizing......................
1d120 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 54 65 78 74 20 4f 76 65 72 66 6c 6f 77 0d ........//.Handle.Text.Overflow.
1d140 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 23 72 65 67 69 6f 6e .........................#region
1d160 20 48 61 6e 64 6c 65 20 54 65 78 74 20 4f 76 65 72 66 6c 6f 77 0d 0a 20 20 20 20 20 20 20 20 20 .Handle.Text.Overflow...........
1d180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 6f 76 65 72 66 6c 6f ...............switch.(m_overflo
1d1a0 77 4d 6f 64 65 29 0d 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 wMode)..........................
1d1c0 7b 0d 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 20 20 63 {..............................c
1d1e0 61 73 65 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 4f 76 65 72 66 6c 6f 77 3a 0d ase.TextOverflowModes.Overflow:.
1d200 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 20 20 20 20 20 ................................
1d220 20 69 66 20 28 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 .if.(m_isMaskingEnabled)........
1d240 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 20 20 20 44 69 ..............................Di
1d260 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 sableMasking();.................
1d280 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 0d 0a 20 20 20 20 20 ...................break;.......
1d2a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 .......................case.Text
1d2c0 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 45 6c 6c 69 70 73 69 73 3a 0d 0a 20 20 20 20 20 20 20 OverflowModes.Ellipsis:.........
1d2e0 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 69 66 20 28 6d 5f 69 .........................if.(m_i
1d300 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sMaskingEnabled)................
1d320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 73 61 62 6c 65 4d 61 73 ......................DisableMas
1d340 6b 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 king();.........................
1d360 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 20 3d 20 74 ...........m_isTextTruncated.=.t
1d380 72 75 65 3b 0d 0a 0d 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 rue;............................
1d3a0 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3c 20 31 ........if.(m_characterCount.<.1
1d3c0 29 0d 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 20 20 20 )...............................
1d3e0 20 20 20 7b 0d 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 ...{............................
1d400 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e ..........m_textInfo.characterIn
1d420 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 20 3d fo[m_characterCount].isVisible.=
1d440 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .false;.........................
1d460 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 76 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 .............//m_visibleCharacte
1d480 72 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rCount.=.0;.....................
1d4a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 .................break;.........
1d4c0 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 7d 0d 0a 0d 0a 20 20 .........................}......
1d4e0 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 20 20 20 6d 5f ..............................m_
1d500 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 69 20 2d 20 31 5d 2e 75 6e 69 63 6f 64 65 TextParsingBuffer[i.-.1].unicode
1d520 20 3d 20 38 32 33 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.8230;........................
1d540 20 20 20 20 20 20 20 20 20 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 69 5d ..........m_TextParsingBuffer[i]
1d560 2e 75 6e 69 63 6f 64 65 20 3d 20 28 63 68 61 72 29 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 .unicode.=.(char)0;.............
1d580 20 20 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 6d 5f 63 61 63 .......................if.(m_cac
1d5a0 68 65 64 5f 45 6c 6c 69 70 73 69 73 5f 43 68 61 72 61 63 74 65 72 20 21 3d 20 6e 75 6c 6c 29 0d hed_Ellipsis_Character.!=.null).
1d5c0 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 20 20 20 20 20 ................................
1d5e0 20 7b 0d 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 20 20 .{..............................
1d600 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f ........m_textInfo.characterInfo
1d620 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 63 68 61 72 61 63 74 65 72 20 3d 20 28 63 68 61 [ellipsisIndex].character.=.(cha
1d640 72 29 38 32 33 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r)8230;.........................
1d660 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .............m_textInfo.characte
1d680 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 74 65 78 74 45 6c 65 6d 65 6e 74 rInfo[ellipsisIndex].textElement
1d6a0 20 3d 20 6d 5f 63 61 63 68 65 64 5f 45 6c 6c 69 70 73 69 73 5f 43 68 61 72 61 63 74 65 72 3b 0d .=.m_cached_Ellipsis_Character;.
1d6c0 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 20 20 20 20 20 ................................
1d6e0 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c .....m_textInfo.characterInfo[el
1d700 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 66 6f 6e 74 41 73 73 65 74 20 3d 20 6d 5f 6d 61 74 65 72 lipsisIndex].fontAsset.=.m_mater
1d720 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 30 5d 2e 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 ialReferences[0].fontAsset;.....
1d740 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 20 20 20 20 20 ................................
1d760 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 .m_textInfo.characterInfo[ellips
1d780 69 73 49 6e 64 65 78 5d 2e 6d 61 74 65 72 69 61 6c 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 isIndex].material.=.m_materialRe
1d7a0 66 65 72 65 6e 63 65 73 5b 30 5d 2e 6d 61 74 65 72 69 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 ferences[0].material;...........
1d7c0 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 6d 5f 74 65 78 ...........................m_tex
1d7e0 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 tInfo.characterInfo[ellipsisInde
1d800 78 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 6e 64 65 78 20 3d 20 30 3b 0d 0a x].materialReferenceIndex.=.0;..
1d820 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 20 20 20 20 20 ................................
1d840 7d 0d 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 20 20 20 }...............................
1d860 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...else.........................
1d880 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
1d8a0 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 67 ................Debug.LogWarning
1d8c0 28 22 55 6e 61 62 6c 65 20 74 6f 20 75 73 65 20 45 6c 6c 69 70 73 69 73 20 63 68 61 72 61 63 74 ("Unable.to.use.Ellipsis.charact
1d8e0 65 72 20 73 69 6e 63 65 20 69 74 20 77 61 73 6e 27 74 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 er.since.it.wasn't.found.in.the.
1d900 63 75 72 72 65 6e 74 20 46 6f 6e 74 20 41 73 73 65 74 20 5b 22 20 2b 20 6d 5f 66 6f 6e 74 41 73 current.Font.Asset.[".+.m_fontAs
1d920 73 65 74 2e 6e 61 6d 65 20 2b 20 22 5d 2e 20 43 6f 6e 73 69 64 65 72 20 72 65 67 65 6e 65 72 61 set.name.+."]..Consider.regenera
1d940 74 69 6e 67 20 74 68 69 73 20 66 6f 6e 74 20 61 73 73 65 74 20 74 6f 20 69 6e 63 6c 75 64 65 20 ting.this.font.asset.to.include.
1d960 74 68 65 20 45 6c 6c 69 70 73 69 73 20 63 68 61 72 61 63 74 65 72 20 28 75 2b 32 30 32 36 29 2e the.Ellipsis.character.(u+2026).
1d980 5c 6e 4e 6f 74 65 3a 20 57 61 72 6e 69 6e 67 73 20 63 61 6e 20 62 65 20 64 69 73 61 62 6c 65 64 \nNote:.Warnings.can.be.disabled
1d9a0 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 22 2c 20 74 68 69 .in.the.TMP.Settings.file.",.thi
1d9c0 73 29 3b 0d 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 20 s);.............................
1d9e0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....}..........................
1da00 20 20 20 20 20 20 20 20 20 20 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 ..........m_totalCharacterCount.
1da20 3d 20 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 20 2b 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 =.ellipsisIndex.+.1;............
1da40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 ........................Generate
1da60 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 TextMesh();.....................
1da80 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .............return;............
1daa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 63 61 73 65 20 54 65 78 74 4f 76 65 ..................//case.TextOve
1dac0 72 66 6c 6f 77 4d 6f 64 65 73 2e 4d 61 73 6b 69 6e 67 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rflowModes.Masking:.............
1dae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 21 6d 5f 69 73 .................//....if.(!m_is
1db00 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 MaskingEnabled).................
1db20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 45 6e 61 62 6c 65 4d 61 73 .............//........EnableMas
1db40 6b 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 king();.........................
1db60 20 20 20 20 20 2f 2f 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .....//....break;...............
1db80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 63 61 73 65 20 54 65 78 74 4f 76 65 72 66 6c ...............//case.TextOverfl
1dba0 6f 77 4d 6f 64 65 73 2e 53 63 72 6f 6c 6c 52 65 63 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 owModes.ScrollRect:.............
1dbc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 21 6d 5f 69 73 .................//....if.(!m_is
1dbe0 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 MaskingEnabled).................
1dc00 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 45 6e 61 62 6c 65 4d 61 73 .............//........EnableMas
1dc20 6b 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 king();.........................
1dc40 20 20 20 20 20 2f 2f 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .....//....break;...............
1dc60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 ...............case.TextOverflow
1dc80 4d 6f 64 65 73 2e 54 72 75 6e 63 61 74 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Modes.Truncate:.................
1dca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 4d 61 73 6b 69 6e 67 .................if.(m_isMasking
1dcc0 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Enabled)........................
1dce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 3b 0d ..............DisableMasking();.
1dd00 0a 0d 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 20 20 20 ................................
1dd20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 ...m_textInfo.characterInfo[m_ch
1dd40 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 20 3d 20 66 61 6c 73 65 3b aracterCount].isVisible.=.false;
1dd60 0d 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 20 20 20 20 ................................
1dd80 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..break;........................
1dda0 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 4c 69 6e ......case.TextOverflowModes.Lin
1ddc0 6b 65 64 3a 0d 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 ked:............................
1dde0 20 20 20 20 20 20 2f 2f 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f ......//m_textInfo.characterInfo
1de00 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 20 3d 20 66 [m_characterCount].isVisible.=.f
1de20 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 alse;...........................
1de40 20 20 20 20 20 20 20 20 20 2f 2f 69 66 20 28 6d 5f 6c 69 6e 6b 65 64 54 65 78 74 43 6f 6d 70 6f .........//if.(m_linkedTextCompo
1de60 6e 65 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nent.!=.null)...................
1de80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...............//{..............
1dea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 6d 5f 6c 69 6e 6b ....................//....m_link
1dec0 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 2e 74 65 78 74 20 3d 20 74 65 78 74 3b 0d 0a 20 20 edTextComponent.text.=.text;....
1dee0 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 20 20 20 2f 2f ..............................//
1df00 20 20 20 20 6d 5f 6c 69 6e 6b 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 2e 66 69 72 73 74 56 ....m_linkedTextComponent.firstV
1df20 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 isibleCharacter.=.m_characterCou
1df40 6e 74 3b 0d 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 20 nt;.............................
1df60 20 20 20 20 20 2f 2f 20 20 20 20 6d 5f 6c 69 6e 6b 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 .....//....m_linkedTextComponent
1df80 2e 46 6f 72 63 65 4d 65 73 68 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .ForceMeshUpdate();.............
1dfa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 7d 0d 0a 20 20 20 20 20 20 .....................//}........
1dfc0 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 62 72 65 61 6b 3b ..........................break;
1dfe0 0d 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 7d 0d 0a 20 20 20 ..........................}.....
1e000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 .....................#endregion.
1e020 45 6e 64 20 54 65 78 74 20 4f 76 65 72 66 6c 6f 77 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 End.Text.Overflow...............
1e040 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........}......................
1e060 23 65 6e 64 72 65 67 69 6f 6e 20 45 6e 64 20 43 68 65 63 6b 20 66 6f 72 20 43 68 61 72 61 63 74 #endregion.End.Check.for.Charact
1e080 65 72 73 20 45 78 63 65 65 64 69 6e 67 20 57 69 64 74 68 20 6f 66 20 54 65 78 74 20 43 6f 6e 74 ers.Exceeding.Width.of.Text.Cont
1e0a0 61 69 6e 65 72 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ainer........................../
1e0c0 2f 20 53 70 65 63 69 61 6c 20 68 61 6e 64 6c 69 6e 67 20 6f 66 20 63 68 61 72 61 63 74 65 72 73 /.Special.handling.of.characters
1e0e0 20 74 68 61 74 20 61 72 65 20 6e 6f 74 20 69 67 6e 6f 72 65 64 20 61 74 20 74 68 65 20 65 6e 64 .that.are.not.ignored.at.the.end
1e100 20 6f 66 20 61 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .of.a.line......................
1e120 20 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 39 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d .if.(charCode.==.9.||.charCode.=
1e140 3d 20 30 78 41 30 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 32 30 30 37 29 0d 0a 20 =.0xA0.||.charCode.==.0x2007)...
1e160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
1e180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 ..............m_textInfo.charact
1e1a0 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 erInfo[m_characterCount].isVisib
1e1c0 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le.=.false;.....................
1e1e0 20 20 20 20 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e .....m_lastVisibleCharacterOfLin
1e200 65 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 e.=.m_characterCount;...........
1e220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e ...............m_textInfo.lineIn
1e240 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 73 70 61 63 65 43 6f 75 6e 74 20 2b 3d 20 31 fo[m_lineNumber].spaceCount.+=.1
1e260 3b 0d 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 6d 5f 74 65 78 ;..........................m_tex
1e280 74 49 6e 66 6f 2e 73 70 61 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 tInfo.spaceCount.+=.1;..........
1e2a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d ..................if.(charCode.=
1e2c0 3d 20 30 78 41 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.0xA0).........................
1e2e0 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e .....m_textInfo.lineInfo[m_lineN
1e300 75 6d 62 65 72 5d 2e 63 6f 6e 74 72 6f 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 umber].controlCharacterCount.+=.
1e320 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 1;......................}.......
1e340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ...............else.............
1e360 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
1e380 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 56 65 72 74 65 78 20 43 6f 6c 6f 72 0d 0a 20 ....//.Determine.Vertex.Color...
1e3a0 20 20 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 6d 5f 6f 76 65 .......................if.(m_ove
1e3c0 72 72 69 64 65 48 74 6d 6c 43 6f 6c 6f 72 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rrideHtmlColors)................
1e3e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 65 72 74 65 78 43 6f 6c 6f 72 20 3d 20 6d 5f 66 6f ..............vertexColor.=.m_fo
1e400 6e 74 43 6f 6c 6f 72 33 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntColor32;......................
1e420 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....else........................
1e440 20 20 20 20 20 20 76 65 72 74 65 78 43 6f 6c 6f 72 20 3d 20 6d 5f 68 74 6d 6c 43 6f 6c 6f 72 3b ......vertexColor.=.m_htmlColor;
1e460 0d 0a 0d 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 2f 2f 20 53 ............................//.S
1e480 74 6f 72 65 20 43 68 61 72 61 63 74 65 72 20 26 20 53 70 72 69 74 65 20 56 65 72 74 65 78 20 49 tore.Character.&.Sprite.Vertex.I
1e4a0 6e 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nformation......................
1e4c0 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 ....if.(m_textElementType.==.TMP
1e4e0 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 29 0d 0a 20 20 20 _TextElementType.Character).....
1e500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .....................{..........
1e520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 61 76 65 20 43 68 61 72 ....................//.Save.Char
1e540 61 63 74 65 72 20 56 65 72 74 65 78 20 44 61 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 acter.Vertex.Data...............
1e560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 61 76 65 47 6c 79 70 68 56 65 72 74 65 78 49 6e ...............SaveGlyphVertexIn
1e580 66 6f 28 70 61 64 64 69 6e 67 2c 20 73 74 79 6c 65 5f 70 61 64 64 69 6e 67 2c 20 76 65 72 74 65 fo(padding,.style_padding,.verte
1e5a0 78 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 xColor);........................
1e5c0 20 20 7d 0d 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 65 6c 73 ..}..........................els
1e5e0 65 20 69 66 20 28 6d 5f 74 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 e.if.(m_textElementType.==.TMP_T
1e600 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 53 70 72 69 74 65 29 0d 0a 20 20 20 20 20 20 20 20 extElementType.Sprite)..........
1e620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
1e640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 61 76 65 53 70 72 69 74 65 56 65 72 74 65 78 49 ...............SaveSpriteVertexI
1e660 6e 66 6f 28 76 65 72 74 65 78 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nfo(vertexColor);...............
1e680 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........}....................
1e6a0 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ..}..........................//.
1e6c0 49 6e 63 72 65 61 73 65 20 76 69 73 69 62 6c 65 20 63 6f 75 6e 74 20 66 6f 72 20 43 68 61 72 61 Increase.visible.count.for.Chara
1e6e0 63 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 cters.......................if.(
1e700 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 m_textInfo.characterInfo[m_chara
1e720 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c 65 20 26 26 20 63 68 61 72 43 6f 64 65 cterCount].isVisible.&&.charCode
1e740 20 21 3d 20 30 78 41 44 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b .!=.0xAD)......................{
1e760 0d 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 69 66 20 28 69 73 ..........................if.(is
1e780 53 74 61 72 74 4f 66 4e 65 77 4c 69 6e 65 29 20 7b 20 69 73 53 74 61 72 74 4f 66 4e 65 77 4c 69 StartOfNewLine).{.isStartOfNewLi
1e7a0 6e 65 20 3d 20 66 61 6c 73 65 3b 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 ne.=.false;.m_firstVisibleCharac
1e7c0 74 65 72 4f 66 4c 69 6e 65 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 20 7d 0d terOfLine.=.m_characterCount;.}.
1e7e0 0a 0d 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 6d 5f 6c 69 6e ...........................m_lin
1e800 65 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 eVisibleCharacterCount.+=.1;....
1e820 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 61 73 74 56 69 73 69 ......................m_lastVisi
1e840 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 bleCharacterOfLine.=.m_character
1e860 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 Count;......................}...
1e880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
1e8a0 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 2f 2f 20 54 ..else..................{...//.T
1e8c0 68 69 73 20 69 73 20 61 20 53 70 61 63 65 2c 20 54 61 62 2c 20 4c 69 6e 65 46 65 65 64 20 6f 72 his.is.a.Space,.Tab,.LineFeed.or
1e8e0 20 43 61 72 72 69 61 67 65 20 52 65 74 75 72 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .Carriage.Return................
1e900 20 20 20 20 20 20 20 20 2f 2f 20 54 72 61 63 6b 20 23 20 6f 66 20 73 70 61 63 65 73 20 70 65 72 ........//.Track.#.of.spaces.per
1e920 20 6c 69 6e 65 20 77 68 69 63 68 20 69 73 20 75 73 65 64 20 66 6f 72 20 6c 69 6e 65 20 6a 75 73 .line.which.is.used.for.line.jus
1e940 74 69 66 69 63 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tification......................
1e960 20 69 66 20 28 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 31 30 20 7c 7c 20 63 68 61 72 2e 49 73 53 .if.((charCode.==.10.||.char.IsS
1e980 65 70 61 72 61 74 6f 72 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 29 20 26 26 20 63 68 61 eparator((char)charCode)).&&.cha
1e9a0 72 43 6f 64 65 20 21 3d 20 30 78 41 44 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 30 78 32 rCode.!=.0xAD.&&.charCode.!=.0x2
1e9c0 30 30 42 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 30 78 32 30 36 30 29 0d 0a 20 20 20 20 00B.&&.charCode.!=.0x2060)......
1e9e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
1ea00 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d ...........m_textInfo.lineInfo[m
1ea20 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 73 70 61 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 _lineNumber].spaceCount.+=.1;...
1ea40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .......................m_textInf
1ea60 6f 2e 73 70 61 63 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 o.spaceCount.+=.1;..............
1ea80 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ........}..................}....
1eaa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 ..............#endregion.Handle.
1eac0 56 69 73 69 62 6c 65 20 43 68 61 72 61 63 74 65 72 73 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 Visible.Characters..............
1eae0 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 ........//.Check.if.Line.Spacing
1eb00 20 6f 66 20 70 72 65 76 69 6f 75 73 20 6c 69 6e 65 20 6e 65 65 64 73 20 74 6f 20 62 65 20 61 64 .of.previous.line.needs.to.be.ad
1eb20 6a 75 73 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e justed...................#region
1eb40 20 41 64 6a 75 73 74 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 .Adjust.Line.Spacing............
1eb60 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 20 30 20 26 26 20 21 54 ......if.(m_lineNumber.>.0.&&.!T
1eb80 4d 50 5f 4d 61 74 68 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 6d 5f 6d 61 78 4c 69 6e 65 41 MP_Math.Approximately(m_maxLineA
1eba0 73 63 65 6e 64 65 72 2c 20 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 29 20 scender,.m_startOfLineAscender).
1ebc0 26 26 20 6d 5f 6c 69 6e 65 48 65 69 67 68 74 20 3d 3d 20 54 4d 50 5f 4d 61 74 68 2e 46 4c 4f 41 &&.m_lineHeight.==.TMP_Math.FLOA
1ebe0 54 5f 55 4e 53 45 54 20 26 26 20 21 6d 5f 69 73 4e 65 77 50 61 67 65 29 0d 0a 20 20 20 20 20 20 T_UNSET.&&.!m_isNewPage)........
1ec00 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
1ec20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 49 6e 6c 69 6e 65 20 2d 20 41 64 6a 75 73 74 69 6e 67 .//Debug.Log("Inline.-.Adjusting
1ec40 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 6f 6e 20 6c 69 6e 65 20 23 22 20 2b 20 6d 5f 6c 69 6e .Line.Spacing.on.line.#".+.m_lin
1ec60 65 4e 75 6d 62 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f eNumber);....................../
1ec80 2f 66 6c 6f 61 74 20 67 61 70 20 3d 20 30 3b 20 2f 2f 20 43 6f 6d 70 75 74 65 20 67 61 70 2e 0d /float.gap.=.0;.//.Compute.gap..
1eca0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6f 66 66 .......................float.off
1ecc0 73 65 74 44 65 6c 74 61 20 3d 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 2d 20 6d setDelta.=.m_maxLineAscender.-.m
1ece0 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 _startOfLineAscender;...........
1ed00 20 20 20 20 20 20 20 20 20 20 20 41 64 6a 75 73 74 4c 69 6e 65 4f 66 66 73 65 74 28 6d 5f 66 69 ...........AdjustLineOffset(m_fi
1ed20 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 2c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 rstCharacterOfLine,.m_characterC
1ed40 6f 75 6e 74 2c 20 6f 66 66 73 65 74 44 65 6c 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ount,.offsetDelta);.............
1ed60 20 20 20 20 20 20 20 20 20 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 49 49 20 2d 3d 20 6f .........elementDescenderII.-=.o
1ed80 66 66 73 65 74 44 65 6c 74 61 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ffsetDelta;.....................
1eda0 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 20 2b 3d 20 6f 66 66 73 65 74 44 65 6c 74 61 3b 0d 0a 0d .m_lineOffset.+=.offsetDelta;...
1edc0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 74 61 72 74 4f 66 4c 69 .....................m_startOfLi
1ede0 6e 65 41 73 63 65 6e 64 65 72 20 2b 3d 20 6f 66 66 73 65 74 44 65 6c 74 61 3b 0d 0a 20 20 20 20 neAscender.+=.offsetDelta;......
1ee00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 ................m_SavedWordWrapS
1ee20 74 61 74 65 2e 6c 69 6e 65 4f 66 66 73 65 74 20 3d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d tate.lineOffset.=.m_lineOffset;.
1ee40 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 61 76 65 64 57 6f 72 64 .....................m_SavedWord
1ee60 57 72 61 70 53 74 61 74 65 2e 70 72 65 76 69 6f 75 73 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d WrapState.previousLineAscender.=
1ee80 20 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 .m_startOfLineAscender;.........
1eea0 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 .........}..................#end
1eec0 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 region......................//.S
1eee0 74 6f 72 65 20 52 65 63 74 61 6e 67 6c 65 20 70 6f 73 69 74 69 6f 6e 73 20 66 6f 72 20 65 61 63 tore.Rectangle.positions.for.eac
1ef00 68 20 43 68 61 72 61 63 74 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 h.Character...................#r
1ef20 65 67 69 6f 6e 20 53 74 6f 72 65 20 43 68 61 72 61 63 74 65 72 20 44 61 74 61 0d 0a 20 20 20 20 egion.Store.Character.Data......
1ef40 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 ............m_textInfo.character
1ef60 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 6c 69 6e 65 4e 75 6d 62 65 Info[m_characterCount].lineNumbe
1ef80 72 20 3d 20 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 r.=.m_lineNumber;...............
1efa0 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 ...m_textInfo.characterInfo[m_ch
1efc0 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 70 61 67 65 4e 75 6d 62 65 72 20 3d 20 6d 5f 70 61 67 aracterCount].pageNumber.=.m_pag
1efe0 65 4e 75 6d 62 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 eNumber;....................if.(
1f000 63 68 61 72 43 6f 64 65 20 21 3d 20 31 30 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 31 33 charCode.!=.10.&&.charCode.!=.13
1f020 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 38 32 33 30 20 7c 7c 20 6d 5f 74 65 78 74 49 6e .&&.charCode.!=.8230.||.m_textIn
1f040 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 63 68 61 72 61 63 fo.lineInfo[m_lineNumber].charac
1f060 74 65 72 43 6f 75 6e 74 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 terCount.==.1)..................
1f080 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 ....m_textInfo.lineInfo[m_lineNu
1f0a0 6d 62 65 72 5d 2e 61 6c 69 67 6e 6d 65 6e 74 20 3d 20 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 mber].alignment.=.m_lineJustific
1f0c0 61 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 ation;..................#endregi
1f0e0 6f 6e 20 53 74 6f 72 65 20 43 68 61 72 61 63 74 65 72 20 44 61 74 61 0d 0a 0d 0a 0d 0a 20 20 20 on.Store.Character.Data.........
1f100 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 74 65 78 74 20 45 78 .............//.Check.if.text.Ex
1f120 63 65 65 64 73 20 74 68 65 20 76 65 72 74 69 63 61 6c 20 62 6f 75 6e 64 73 20 6f 66 20 74 68 65 ceeds.the.vertical.bounds.of.the
1f140 20 6d 61 72 67 69 6e 20 61 72 65 61 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 .margin.area...................#
1f160 72 65 67 69 6f 6e 20 43 68 65 63 6b 20 56 65 72 74 69 63 61 6c 20 42 6f 75 6e 64 73 20 26 20 41 region.Check.Vertical.Bounds.&.A
1f180 75 74 6f 2d 53 69 7a 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 uto-Sizing..................if.(
1f1a0 6d 5f 6d 61 78 41 73 63 65 6e 64 65 72 20 2d 20 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 m_maxAscender.-.elementDescender
1f1c0 49 49 20 3e 20 6d 61 72 67 69 6e 48 65 69 67 68 74 20 2b 20 30 2e 30 30 30 31 66 29 0d 0a 20 20 II.>.marginHeight.+.0.0001f)....
1f1e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
1f200 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 4c 69 6e 65 20 73 70 61 63 69 6e 67 20 61 64 6a 75 .....//.Handle.Line.spacing.adju
1f220 73 74 6d 65 6e 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 stments......................#re
1f240 67 69 6f 6e 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 41 64 6a 75 73 74 6d 65 6e 74 73 0d 0a 20 gion.Line.Spacing.Adjustments...
1f260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 65 6e 61 62 6c 65 41 ...................if.(m_enableA
1f280 75 74 6f 53 69 7a 69 6e 67 20 26 26 20 6d 5f 6c 69 6e 65 53 70 61 63 69 6e 67 44 65 6c 74 61 20 utoSizing.&&.m_lineSpacingDelta.
1f2a0 3e 20 6d 5f 6c 69 6e 65 53 70 61 63 69 6e 67 4d 61 78 20 26 26 20 6d 5f 6c 69 6e 65 4e 75 6d 62 >.m_lineSpacingMax.&&.m_lineNumb
1f2c0 65 72 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a er.>.0)......................{..
1f2e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 6f 70 43 6f 75 6e ........................loopCoun
1f300 74 41 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tA.=.0;.........................
1f320 20 20 20 6d 5f 6c 69 6e 65 53 70 61 63 69 6e 67 44 65 6c 74 61 20 2d 3d 20 31 3b 0d 0a 20 20 20 ...m_lineSpacingDelta.-=.1;.....
1f340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 54 65 78 .....................GenerateTex
1f360 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tMesh();........................
1f380 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ..return;......................}
1f3a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e ......................#endregion
1f3c0 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e ..........................//.Han
1f3e0 64 6c 65 20 54 65 78 74 20 41 75 74 6f 2d 73 69 7a 69 6e 67 20 72 65 73 75 6c 74 69 6e 67 20 66 dle.Text.Auto-sizing.resulting.f
1f400 72 6f 6d 20 74 65 78 74 20 65 78 63 65 65 64 69 6e 67 20 76 65 72 74 69 63 61 6c 20 62 6f 75 6e rom.text.exceeding.vertical.boun
1f420 64 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e ds.......................#region
1f440 20 54 65 78 74 20 41 75 74 6f 2d 53 69 7a 69 6e 67 20 28 54 65 78 74 20 67 72 65 61 74 65 72 20 .Text.Auto-Sizing.(Text.greater.
1f460 74 68 61 6e 20 76 65 72 74 69 63 61 6c 20 62 6f 75 6e 64 73 29 0d 0a 20 20 20 20 20 20 20 20 20 than.vertical.bounds)...........
1f480 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 65 6e 61 62 6c 65 41 75 74 6f 53 69 7a 69 6e ...........if.(m_enableAutoSizin
1f4a0 67 20 26 26 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 3e 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 6e 29 g.&&.m_fontSize.>.m_fontSizeMin)
1f4c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
1f4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 46 6f 6e 74 53 69 7a 65 20 3d .................m_maxFontSize.=
1f500 20 6d 5f 66 6f 6e 74 53 69 7a 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .m_fontSize;....................
1f520 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 2d 3d 20 4d 61 74 68 66 2e 4d 61 78 28 ........m_fontSize.-=.Mathf.Max(
1f540 28 6d 5f 66 6f 6e 74 53 69 7a 65 20 2d 20 6d 5f 6d 69 6e 46 6f 6e 74 53 69 7a 65 29 20 2f 20 32 (m_fontSize.-.m_minFontSize)./.2
1f560 2c 20 30 2e 30 35 66 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ,.0.05f);.......................
1f580 20 20 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 3d 20 28 69 6e 74 29 28 4d 61 74 68 66 2e 4d 61 78 28 ...m_fontSize.=.(int)(Mathf.Max(
1f5a0 6d 5f 66 6f 6e 74 53 69 7a 65 2c 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 69 6e 29 20 2a 20 32 30 20 m_fontSize,.m_fontSizeMin).*.20.
1f5c0 2b 20 30 2e 35 66 29 20 2f 20 32 30 66 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +.0.5f)./.20f;..................
1f5e0 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 72 65 63 75 72 73 69 76 65 43 6f 75 6e 74 20 3d 20 30 ..........//m_recursiveCount.=.0
1f600 3b 0d 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 69 66 20 28 6c ;..........................if.(l
1f620 6f 6f 70 43 6f 75 6e 74 41 20 3e 20 32 30 29 20 72 65 74 75 72 6e 3b 20 2f 2f 20 41 64 64 65 64 oopCountA.>.20).return;.//.Added
1f640 20 74 6f 20 64 65 62 75 67 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .to.debug.......................
1f660 20 20 20 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 ....GenerateTextMesh();.........
1f680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 .................return;........
1f6a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
1f6c0 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 54 65 78 74 20 41 75 74 6f 2d 53 69 7a 69 6e 67 .....#endregion.Text.Auto-Sizing
1f6e0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 20 69 ........................//.Set.i
1f700 73 54 65 78 74 4f 76 65 72 66 6c 6f 77 69 6e 67 20 61 6e 64 20 66 69 72 73 74 4f 76 65 72 66 6c sTextOverflowing.and.firstOverfl
1f720 6f 77 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 owCharacterIndex................
1f740 20 20 20 20 20 20 69 66 20 28 6d 5f 66 69 72 73 74 4f 76 65 72 66 6c 6f 77 43 68 61 72 61 63 74 ......if.(m_firstOverflowCharact
1f760 65 72 49 6e 64 65 78 20 3d 3d 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erIndex.==.-1)..................
1f780 20 20 20 20 20 20 20 20 6d 5f 66 69 72 73 74 4f 76 65 72 66 6c 6f 77 43 68 61 72 61 63 74 65 72 ........m_firstOverflowCharacter
1f7a0 49 6e 64 65 78 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 Index.=.m_characterCount;.......
1f7c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 54 65 78 74 20 .................//.Handle.Text.
1f7e0 4f 76 65 72 66 6c 6f 77 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 Overflow......................#r
1f800 65 67 69 6f 6e 20 54 65 78 74 20 4f 76 65 72 66 6c 6f 77 0d 0a 20 20 20 20 20 20 20 20 20 20 20 egion.Text.Overflow.............
1f820 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 29 .........switch.(m_overflowMode)
1f840 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
1f860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 4f 76 65 72 66 6c .................case.TextOverfl
1f880 6f 77 4d 6f 64 65 73 2e 4f 76 65 72 66 6c 6f 77 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 owModes.Overflow:...............
1f8a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e ...............if.(m_isMaskingEn
1f8c0 61 62 6c 65 64 29 0d 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 abled)..........................
1f8e0 20 20 20 20 20 20 20 20 44 69 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 ........DisableMasking();.......
1f900 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 62 72 65 61 6b 3b 0d .........................break;.
1f920 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 61 73 65 20 54 65 .........................case.Te
1f940 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 45 6c 6c 69 70 73 69 73 3a 0d 0a 20 20 20 20 20 xtOverflowModes.Ellipsis:.......
1f960 20 20 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 6d 5f 69 73 4d .......................if.(m_isM
1f980 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 askingEnabled)..................
1f9a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 ................DisableMasking()
1f9c0 3b 0d 0a 0d 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 20 ;...............................
1f9e0 20 69 66 20 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 .if.(m_lineNumber.>.0)..........
1fa00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ....................{...........
1fa20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 54 65 78 74 50 61 72 .......................m_TextPar
1fa40 73 69 6e 67 42 75 66 66 65 72 5b 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 singBuffer[m_textInfo.characterI
1fa60 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 69 6e 64 65 78 5d 2e 75 6e 69 63 6f 64 nfo[ellipsisIndex].index].unicod
1fa80 65 20 3d 20 38 32 33 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.=.8230;.......................
1faa0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 6d ...........m_TextParsingBuffer[m
1fac0 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 _textInfo.characterInfo[ellipsis
1fae0 49 6e 64 65 78 5d 2e 69 6e 64 65 78 20 2b 20 31 5d 2e 75 6e 69 63 6f 64 65 20 3d 20 28 63 68 61 Index].index.+.1].unicode.=.(cha
1fb00 72 29 30 3b 0d 0a 0d 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 r)0;............................
1fb20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 61 63 68 65 64 5f 45 6c 6c 69 70 73 69 73 5f 43 68 ........if.(m_cached_Ellipsis_Ch
1fb40 61 72 61 63 74 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aracter.!=.null)................
1fb60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
1fb80 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 6d 5f 74 65 78 74 49 .........................m_textI
1fba0 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d nfo.characterInfo[ellipsisIndex]
1fbc0 2e 63 68 61 72 61 63 74 65 72 20 3d 20 28 63 68 61 72 29 38 32 33 30 3b 0d 0a 20 20 20 20 20 20 .character.=.(char)8230;........
1fbe0 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 20 20 20 6d 5f ..............................m_
1fc00 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 textInfo.characterInfo[ellipsisI
1fc20 6e 64 65 78 5d 2e 74 65 78 74 45 6c 65 6d 65 6e 74 20 3d 20 6d 5f 63 61 63 68 65 64 5f 45 6c 6c ndex].textElement.=.m_cached_Ell
1fc40 69 70 73 69 73 5f 43 68 61 72 61 63 74 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ipsis_Character;................
1fc60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f ......................m_textInfo
1fc80 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 66 6f .characterInfo[ellipsisIndex].fo
1fca0 6e 74 41 73 73 65 74 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 30 ntAsset.=.m_materialReferences[0
1fcc0 5d 2e 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ].fontAsset;....................
1fce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 ..................m_textInfo.cha
1fd00 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 6d 61 74 65 72 69 racterInfo[ellipsisIndex].materi
1fd20 61 6c 20 3d 20 6d 5f 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 30 5d 2e 6d 61 74 al.=.m_materialReferences[0].mat
1fd40 65 72 69 61 6c 3b 0d 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 erial;..........................
1fd60 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 ............m_textInfo.character
1fd80 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 Info[ellipsisIndex].materialRefe
1fda0 72 65 6e 63 65 49 6e 64 65 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 renceIndex.=.0;.................
1fdc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
1fde0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 ....................else........
1fe00 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 7b 0d 0a 20 20 20 ..........................{.....
1fe20 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 20 20 20 20 20 ................................
1fe40 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 20 75 73 65 .Debug.LogWarning("Unable.to.use
1fe60 20 45 6c 6c 69 70 73 69 73 20 63 68 61 72 61 63 74 65 72 20 73 69 6e 63 65 20 69 74 20 77 61 73 .Ellipsis.character.since.it.was
1fe80 6e 27 74 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 46 6f 6e 74 20 41 73 n't.found.in.the.current.Font.As
1fea0 73 65 74 20 5b 22 20 2b 20 6d 5f 66 6f 6e 74 41 73 73 65 74 2e 6e 61 6d 65 20 2b 20 22 5d 2e 20 set.[".+.m_fontAsset.name.+."]..
1fec0 43 6f 6e 73 69 64 65 72 20 72 65 67 65 6e 65 72 61 74 69 6e 67 20 74 68 69 73 20 66 6f 6e 74 20 Consider.regenerating.this.font.
1fee0 61 73 73 65 74 20 74 6f 20 69 6e 63 6c 75 64 65 20 74 68 65 20 45 6c 6c 69 70 73 69 73 20 63 68 asset.to.include.the.Ellipsis.ch
1ff00 61 72 61 63 74 65 72 20 28 75 2b 32 30 32 36 29 2e 5c 6e 4e 6f 74 65 3a 20 57 61 72 6e 69 6e 67 aracter.(u+2026).\nNote:.Warning
1ff20 73 20 63 61 6e 20 62 65 20 64 69 73 61 62 6c 65 64 20 69 6e 20 74 68 65 20 54 4d 50 20 53 65 74 s.can.be.disabled.in.the.TMP.Set
1ff40 74 69 6e 67 73 20 66 69 6c 65 2e 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 tings.file.",.this);............
1ff60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ......................}.........
1ff80 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 6d 5f 74 6f 74 ...........................m_tot
1ffa0 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 alCharacterCount.=.ellipsisIndex
1ffc0 20 2b 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .+.1;...........................
1ffe0 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 .........GenerateTextMesh();....
20000 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 20 20 20 6d 5f ..............................m_
20020 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 isTextTruncated.=.true;.........
20040 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 3b .........................return;
20060 0d 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 20 20 7d 0d ..............................}.
20080 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 20 20 65 6c 73 .............................els
200a0 65 0d 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 20 20 7b e..............................{
200c0 0d 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 20 20 20 20 ................................
200e0 20 20 43 6c 65 61 72 4d 65 73 68 28 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..ClearMesh(false);.............
20100 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 3b 0d 0a 20 20 .....................return;....
20120 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 7d 0d 0a 20 20 20 ..........................}.....
20140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 63 61 73 65 20 54 65 78 74 .....................//case.Text
20160 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 4d 61 73 6b 69 6e 67 3a 0d 0a 20 20 20 20 20 20 20 20 OverflowModes.Masking:..........
20180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 69 66 20 28 21 6d 5f 69 73 4d ................//....if.(!m_isM
201a0 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 askingEnabled)..................
201c0 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 45 6e 61 62 6c 65 4d 61 73 6b 69 6e 67 28 ........//........EnableMasking(
201e0 29 3b 0d 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 2f 2f 20 20 );..........................//..
20200 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..break;........................
20220 20 20 2f 2f 63 61 73 65 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 53 63 72 6f 6c ..//case.TextOverflowModes.Scrol
20240 6c 52 65 63 74 3a 0d 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 lRect:..........................
20260 2f 2f 20 20 20 20 69 66 20 28 21 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 6e 61 62 6c 65 64 29 0d 0a //....if.(!m_isMaskingEnabled)..
20280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 ........................//......
202a0 20 20 45 6e 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..EnableMasking();..............
202c0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 ............//....break;........
202e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 4f 76 65 72 66 ..................case.TextOverf
20300 6c 6f 77 4d 6f 64 65 73 2e 54 72 75 6e 63 61 74 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 lowModes.Truncate:..............
20320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 4d 61 73 6b 69 6e 67 45 ................if.(m_isMaskingE
20340 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nabled).........................
20360 20 20 20 20 20 20 20 20 20 44 69 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 .........DisableMasking();......
20380 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 2f 2f 20 54 4f 44 ..........................//.TOD
203a0 4f 20 3a 20 4f 70 74 69 6d 69 7a 65 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 O.:.Optimize....................
203c0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 20 30 29 ...........if.(m_lineNumber.>.0)
203e0 0d 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 20 20 7b 0d ..............................{.
20400 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 20 20 20 20 20 ................................
20420 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 6d 5f 74 65 78 74 49 6e 66 6f 2e .m_TextParsingBuffer[m_textInfo.
20440 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 5d 2e 69 6e 64 characterInfo[ellipsisIndex].ind
20460 65 78 20 2b 20 31 5d 2e 75 6e 69 63 6f 64 65 20 3d 20 28 63 68 61 72 29 30 3b 0d 0a 0d 0a 20 20 ex.+.1].unicode.=.(char)0;......
20480 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 20 20 20 6d 5f ..............................m_
204a0 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 65 6c 6c 69 70 73 69 73 49 6e totalCharacterCount.=.ellipsisIn
204c0 64 65 78 20 2b 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dex.+.1;........................
204e0 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d ............GenerateTextMesh();.
20500 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 20 20 20 20 20 ................................
20520 20 6d 5f 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 .m_isTextTruncated.=.true;......
20540 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 20 72 65 74 75 ............................retu
20560 72 6e 3b 0d 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 20 rn;.............................
20580 20 7d 0d 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 20 20 .}..............................
205a0 65 6c 73 65 0d 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 else............................
205c0 20 20 7b 0d 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 20 ..{.............................
205e0 20 20 20 20 20 43 6c 65 61 72 4d 65 73 68 28 66 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 .....ClearMesh(false);..........
20600 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 3b 0d ........................return;.
20620 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 20 20 7d 0d 0a .............................}..
20640 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 61 73 65 20 54 65 78 ........................case.Tex
20660 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 tOverflowModes.Page:............
20680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 69 73 4d 61 73 6b 69 6e ..................if.(m_isMaskin
206a0 67 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 gEnabled).......................
206c0 20 20 20 20 20 20 20 20 20 20 20 44 69 73 61 62 6c 65 4d 61 73 6b 69 6e 67 28 29 3b 0d 0a 0d 0a ...........DisableMasking();....
206e0 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 20 2f 2f 20 49 ............................//.I
20700 67 6e 6f 72 65 20 50 61 67 65 20 42 72 65 61 6b 2c 20 4c 69 6e 65 66 65 65 64 20 6f 72 20 63 61 gnore.Page.Break,.Linefeed.or.ca
20720 72 72 69 61 67 65 20 72 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rriage.return...................
20740 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 31 33 20 7c 7c ...........if.(charCode.==.13.||
20760 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 31 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .charCode.==.10)................
20780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 ..................break;........
207a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 74 75 72 ........................//.Retur
207c0 6e 20 69 66 20 74 68 65 20 66 69 72 73 74 20 63 68 61 72 61 63 74 65 72 20 64 6f 65 73 6e 27 74 n.if.the.first.character.doesn't
207e0 20 66 69 74 2e 0d 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 .fit............................
20800 20 20 20 69 66 20 28 69 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...if.(i.==.0)..................
20820 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
20840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6c 65 61 72 4d 65 73 68 28 29 3b 0d 0a 20 20 20 ...............ClearMesh();.....
20860 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 20 20 72 65 74 .............................ret
20880 75 72 6e 3b 0d 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 urn;............................
208a0 20 20 7d 0d 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 20 ..}.............................
208c0 20 65 6c 73 65 20 69 66 20 28 70 72 65 76 69 6f 75 73 50 61 67 65 4f 76 65 72 66 6c 6f 77 43 68 .else.if.(previousPageOverflowCh
208e0 61 72 20 3d 3d 20 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ar.==.i)........................
20900 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......{.........................
20920 20 20 20 20 20 20 20 20 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 42 75 66 66 65 72 5b 69 5d 2e .........m_TextParsingBuffer[i].
20940 75 6e 69 63 6f 64 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 unicode.=.0;....................
20960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 20 ..............m_isTextTruncated.
20980 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.true;.........................
209a0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....}..........................
209c0 20 20 20 20 20 20 70 72 65 76 69 6f 75 73 50 61 67 65 4f 76 65 72 66 6c 6f 77 43 68 61 72 20 3d ......previousPageOverflowChar.=
209e0 20 69 3b 0d 0a 0d 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 .i;.............................
20a00 20 20 20 2f 2f 20 47 6f 20 62 61 63 6b 20 74 6f 20 70 72 65 76 69 6f 75 73 20 6c 69 6e 65 20 61 ...//.Go.back.to.previous.line.a
20a20 6e 64 20 72 65 2d 6c 61 79 6f 75 74 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nd.re-layout....................
20a40 20 20 20 20 20 20 20 20 20 20 20 69 20 3d 20 52 65 73 74 6f 72 65 57 6f 72 64 57 72 61 70 70 69 ...........i.=.RestoreWordWrappi
20a60 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 65 64 4c 69 6e 65 53 74 61 74 65 29 3b 0d 0a ngState(ref.m_SavedLineState);..
20a80 0d 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 20 20 6d 5f ..............................m_
20aa0 69 73 4e 65 77 50 61 67 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 isNewPage.=.true;...............
20ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 3d 20 30 20 2b 20 ...............m_xAdvance.=.0.+.
20ae0 74 61 67 5f 49 6e 64 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tag_Indent;.....................
20b00 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 20 3d 20 30 3b 0d 0a 20 20 20 20 .........m_lineOffset.=.0;......
20b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 41 73 63 ........................m_maxAsc
20b40 65 6e 64 65 72 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ender.=.0;......................
20b60 20 20 20 20 20 20 20 20 70 61 67 65 41 73 63 65 6e 64 65 72 20 3d 20 30 3b 0d 0a 20 20 20 20 20 ........pageAscender.=.0;.......
20b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4e 75 6d .......................m_lineNum
20ba0 62 65 72 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ber.+=.1;.......................
20bc0 20 20 20 20 20 20 20 6d 5f 70 61 67 65 4e 75 6d 62 65 72 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 .......m_pageNumber.+=.1;.......
20be0 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 65 3b .......................continue;
20c00 0d 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 61 73 65 20 54 ..........................case.T
20c20 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 4c 69 6e 6b 65 64 3a 0d 0a 20 20 20 20 20 20 extOverflowModes.Linked:........
20c40 20 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 6d 5f 6c 69 6e 6b ......................if.(m_link
20c60 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 edTextComponent.!=.null)........
20c80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ......................{.........
20ca0 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 6d 5f 6c 69 6e 6b 65 .........................m_linke
20cc0 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 2e 74 65 78 74 20 3d 20 74 65 78 74 3b 0d 0a 20 20 20 dTextComponent.text.=.text;.....
20ce0 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 20 20 6d 5f 6c .............................m_l
20d00 69 6e 6b 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 2e 66 69 72 73 74 56 69 73 69 62 6c 65 43 inkedTextComponent.firstVisibleC
20d20 68 61 72 61 63 74 65 72 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 20 20 haracter.=.m_characterCount;....
20d40 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 20 20 20 6d 5f ..............................m_
20d60 6c 69 6e 6b 65 64 54 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 2e 46 6f 72 63 65 4d 65 73 68 55 70 64 linkedTextComponent.ForceMeshUpd
20d80 61 74 65 28 29 3b 0d 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 ate();..........................
20da0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....}...........................
20dc0 20 20 20 20 20 2f 2f 20 54 72 75 6e 63 61 74 65 20 72 65 6d 61 69 6e 69 6e 67 20 74 65 78 74 0d .....//.Truncate.remaining.text.
20de0 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 20 20 69 66 20 .............................if.
20e00 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 (m_lineNumber.>.0)..............
20e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
20e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 54 65 78 74 50 61 72 73 69 6e 67 ...................m_TextParsing
20e60 42 75 66 66 65 72 5b 69 5d 2e 75 6e 69 63 6f 64 65 20 3d 20 28 63 68 61 72 29 30 3b 0d 0a 0d 0a Buffer[i].unicode.=.(char)0;....
20e80 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 20 20 20 20 20 ................................
20ea0 6d 5f 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 6d 5f 63 68 61 72 61 63 m_totalCharacterCount.=.m_charac
20ec0 74 65 72 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 terCount;.......................
20ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 4f 44 4f 20 3a 20 4f 70 74 69 6d 69 7a 65 20 .............//.TODO.:.Optimize.
20f00 61 73 20 77 65 20 73 68 6f 75 6c 64 20 62 65 20 61 62 6c 65 20 74 6f 20 65 6e 64 20 74 68 65 20 as.we.should.be.able.to.end.the.
20f20 6c 61 79 6f 75 74 20 70 68 61 73 65 20 68 65 72 65 20 77 69 74 68 6f 75 74 20 68 61 76 69 6e 67 layout.phase.here.without.having
20f40 20 74 6f 20 64 6f 20 61 6e 6f 74 68 65 72 20 70 61 73 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 .to.do.another.pass.............
20f60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 61 74 65 54 65 ......................GenerateTe
20f80 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 xtMesh();.......................
20fa0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 54 65 78 74 54 72 75 6e 63 61 74 65 64 20 3d 20 74 ...........m_isTextTruncated.=.t
20fc0 72 75 65 3b 0d 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 rue;............................
20fe0 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......return;...................
21000 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........}....................
21020 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........else..................
21040 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
21060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 6c 65 61 72 4d 65 73 68 28 74 72 75 65 29 3b 0d ...............ClearMesh(true);.
21080 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 20 20 20 20 20 ................................
210a0 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .return;........................
210c0 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ......}......................}..
210e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 45 ....................#endregion.E
21100 6e 64 20 54 65 78 74 20 4f 76 65 72 66 6c 6f 77 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nd.Text.Overflow................
21120 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f ....}..................#endregio
21140 6e 20 43 68 65 63 6b 20 56 65 72 74 69 63 61 6c 20 42 6f 75 6e 64 73 0d 0a 0d 0a 0d 0a 20 20 20 n.Check.Vertical.Bounds.........
21160 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 78 41 64 76 61 6e 63 65 20 .............//.Handle.xAdvance.
21180 26 20 54 61 62 75 6c 61 74 69 6f 6e 20 53 74 6f 70 73 2e 20 54 61 62 20 73 74 6f 70 73 20 61 74 &.Tabulation.Stops..Tab.stops.at
211a0 20 65 76 65 72 79 20 32 35 25 20 6f 66 20 46 6f 6e 74 20 53 69 7a 65 2e 0d 0a 20 20 20 20 20 20 .every.25%.of.Font.Size.........
211c0 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 58 41 64 76 61 6e 63 65 2c 20 54 61 62 75 ..........#region.XAdvance,.Tabu
211e0 6c 61 74 69 6f 6e 20 26 20 53 74 6f 70 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lation.&.Stops..................
21200 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 39 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 if.(charCode.==.9)..............
21220 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 ....{......................float
21240 20 74 61 62 53 69 7a 65 20 3d 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 66 61 .tabSize.=.m_currentFontAsset.fa
21260 63 65 49 6e 66 6f 2e 74 61 62 57 69 64 74 68 20 2a 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 ceInfo.tabWidth.*.m_currentFontA
21280 73 73 65 74 2e 74 61 62 53 69 7a 65 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 sset.tabSize.*.currentElementSca
212a0 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 74 le;......................float.t
212c0 61 62 73 20 3d 20 4d 61 74 68 66 2e 43 65 69 6c 28 6d 5f 78 41 64 76 61 6e 63 65 20 2f 20 74 61 abs.=.Mathf.Ceil(m_xAdvance./.ta
212e0 62 53 69 7a 65 29 20 2a 20 74 61 62 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 bSize).*.tabSize;...............
21300 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 3d 20 74 61 62 73 20 3e 20 6d 5f 78 41 64 .......m_xAdvance.=.tabs.>.m_xAd
21320 76 61 6e 63 65 20 3f 20 74 61 62 73 20 3a 20 6d 5f 78 41 64 76 61 6e 63 65 20 2b 20 74 61 62 53 vance.?.tabs.:.m_xAdvance.+.tabS
21340 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ize;..................}.........
21360 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d 5f 6d 6f 6e 6f 53 70 61 63 69 6e 67 20 .........else.if.(m_monoSpacing.
21380 21 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 !=.0)..................{........
213a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 2b 3d 20 28 6d 5f 6d ..............m_xAdvance.+=.(m_m
213c0 6f 6e 6f 53 70 61 63 69 6e 67 20 2d 20 6d 6f 6e 6f 41 64 76 61 6e 63 65 20 2b 20 28 28 63 68 61 onoSpacing.-.monoAdvance.+.((cha
213e0 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 20 2b 20 6d 5f 63 75 72 72 racterSpacingAdjustment.+.m_curr
21400 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 6e 6f 72 6d 61 6c 53 70 61 63 69 6e 67 4f 66 66 73 65 74 entFontAsset.normalSpacingOffset
21420 29 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 29 20 2b 20 6d 5f 63 53 70 ).*.currentElementScale).+.m_cSp
21440 61 63 69 6e 67 29 20 2a 20 28 31 20 2d 20 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 acing).*.(1.-.m_charWidthAdjDelt
21460 61 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 a);........................if.(c
21480 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 29 har.IsWhiteSpace((char)charCode)
214a0 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 32 30 30 42 29 0d 0a 20 20 20 20 20 20 20 .||.charCode.==.0x200B).........
214c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 2b 3d 20 6d .................m_xAdvance.+=.m
214e0 5f 77 6f 72 64 53 70 61 63 69 6e 67 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 _wordSpacing.*.currentElementSca
21500 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 le;..................}..........
21520 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 21 6d 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 ........else.if.(!m_isRightToLef
21540 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 t)..................{...........
21560 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 63 61 6c 65 46 58 4d 75 6c 74 69 70 6c 69 ...........float.scaleFXMultipli
21580 65 72 20 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 er.=.1;......................if.
215a0 28 6d 5f 69 73 46 58 4d 61 74 72 69 78 53 65 74 29 20 73 63 61 6c 65 46 58 4d 75 6c 74 69 70 6c (m_isFXMatrixSet).scaleFXMultipl
215c0 69 65 72 20 3d 20 6d 5f 46 58 4d 61 74 72 69 78 2e 6c 6f 73 73 79 53 63 61 6c 65 2e 78 3b 0d 0a ier.=.m_FXMatrix.lossyScale.x;..
215e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 ......................m_xAdvance
21600 20 2b 3d 20 28 28 6d 5f 63 61 63 68 65 64 5f 54 65 78 74 45 6c 65 6d 65 6e 74 2e 67 6c 79 70 68 .+=.((m_cached_TextElement.glyph
21620 2e 6d 65 74 72 69 63 73 2e 68 6f 72 69 7a 6f 6e 74 61 6c 41 64 76 61 6e 63 65 20 2a 20 73 63 61 .metrics.horizontalAdvance.*.sca
21640 6c 65 46 58 4d 75 6c 74 69 70 6c 69 65 72 20 2a 20 62 6f 6c 64 5f 78 41 64 76 61 6e 63 65 5f 6d leFXMultiplier.*.bold_xAdvance_m
21660 75 6c 74 69 70 6c 69 65 72 20 2b 20 63 68 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a 75 ultiplier.+.characterSpacingAdju
21680 73 74 6d 65 6e 74 20 2b 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 6e 6f 72 6d stment.+.m_currentFontAsset.norm
216a0 61 6c 53 70 61 63 69 6e 67 4f 66 66 73 65 74 20 2b 20 67 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e alSpacingOffset.+.glyphAdjustmen
216c0 74 73 2e 78 41 64 76 61 6e 63 65 29 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 ts.xAdvance).*.currentElementSca
216e0 6c 65 20 2b 20 6d 5f 63 53 70 61 63 69 6e 67 29 20 2a 20 28 31 20 2d 20 6d 5f 63 68 61 72 57 69 le.+.m_cSpacing).*.(1.-.m_charWi
21700 64 74 68 41 64 6a 44 65 6c 74 61 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 dthAdjDelta);...................
21720 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 28 63 68 61 72 .....if.(char.IsWhiteSpace((char
21740 29 63 68 61 72 43 6f 64 65 29 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 32 30 30 42 )charCode).||.charCode.==.0x200B
21760 29 0d 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 6d 5f 78 41 64 )..........................m_xAd
21780 76 61 6e 63 65 20 2b 3d 20 6d 5f 77 6f 72 64 53 70 61 63 69 6e 67 20 2a 20 63 75 72 72 65 6e 74 vance.+=.m_wordSpacing.*.current
217a0 45 6c 65 6d 65 6e 74 53 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ElementScale;..................}
217c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 ..................else..........
217e0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d ........{......................m
21800 5f 78 41 64 76 61 6e 63 65 20 2d 3d 20 67 6c 79 70 68 41 64 6a 75 73 74 6d 65 6e 74 73 2e 78 41 _xAdvance.-=.glyphAdjustments.xA
21820 64 76 61 6e 63 65 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 3b 0d 0a 20 dvance.*.currentElementScale;...
21840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ...............}................
21860 20 20 20 20 20 20 2f 2f 20 53 74 6f 72 65 20 78 41 64 76 61 6e 63 65 20 69 6e 66 6f 72 6d 61 74 ......//.Store.xAdvance.informat
21880 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e ion..................m_textInfo.
218a0 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e characterInfo[m_characterCount].
218c0 78 41 64 76 61 6e 63 65 20 3d 20 6d 5f 78 41 64 76 61 6e 63 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 xAdvance.=.m_xAdvance;..........
218e0 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 54 61 62 75 6c 61 74 69 6f 6e 20 ..........#endregion.Tabulation.
21900 26 20 53 74 6f 70 73 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 &.Stops......................//.
21920 48 61 6e 64 6c 65 20 43 61 72 72 69 61 67 65 20 52 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 Handle.Carriage.Return..........
21940 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 43 61 72 72 69 61 67 65 20 52 65 74 75 72 6e 0d ........#region.Carriage.Return.
21960 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d .................if.(charCode.==
21980 20 31 33 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 .13)..................{.........
219a0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 3d 20 30 20 2b 20 74 61 .............m_xAdvance.=.0.+.ta
219c0 67 5f 49 6e 64 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 g_Indent;..................}....
219e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 43 61 72 72 69 61 67 ..............#endregion.Carriag
21a00 65 20 52 65 74 75 72 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f e.Return......................//
21a20 20 48 61 6e 64 6c 65 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 41 64 6a 75 73 74 6d 65 6e 74 73 .Handle.Line.Spacing.Adjustments
21a40 20 2b 20 57 6f 72 64 20 57 72 61 70 70 69 6e 67 20 26 20 73 70 65 63 69 61 6c 20 63 61 73 65 20 .+.Word.Wrapping.&.special.case.
21a60 66 6f 72 20 6c 61 73 74 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 for.last.line...................
21a80 23 72 65 67 69 6f 6e 20 43 68 65 63 6b 20 66 6f 72 20 4c 69 6e 65 20 46 65 65 64 20 61 6e 64 20 #region.Check.for.Line.Feed.and.
21aa0 4c 61 73 74 20 43 68 61 72 61 63 74 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Last.Character..................
21ac0 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 31 30 20 7c 7c 20 6d 5f 63 68 61 72 61 63 74 65 if.(charCode.==.10.||.m_characte
21ae0 72 43 6f 75 6e 74 20 3d 3d 20 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 rCount.==.totalCharacterCount.-.
21b00 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 1)..................{...........
21b20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 66 20 4c 69 6e 65 20 53 70 61 63 ...........//.Check.if.Line.Spac
21b40 69 6e 67 20 6f 66 20 70 72 65 76 69 6f 75 73 20 6c 69 6e 65 20 6e 65 65 64 73 20 74 6f 20 62 65 ing.of.previous.line.needs.to.be
21b60 20 61 64 6a 75 73 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .adjusted.......................
21b80 69 66 20 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 20 30 20 26 26 20 21 54 4d 50 5f 4d 61 74 if.(m_lineNumber.>.0.&&.!TMP_Mat
21ba0 68 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 h.Approximately(m_maxLineAscende
21bc0 72 2c 20 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 29 20 26 26 20 6d 5f 6c r,.m_startOfLineAscender).&&.m_l
21be0 69 6e 65 48 65 69 67 68 74 20 3d 3d 20 54 4d 50 5f 4d 61 74 68 2e 46 4c 4f 41 54 5f 55 4e 53 45 ineHeight.==.TMP_Math.FLOAT_UNSE
21c00 54 20 26 26 20 21 6d 5f 69 73 4e 65 77 50 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 T.&&.!m_isNewPage)..............
21c20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........{.......................
21c40 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 4c 69 6e 65 20 46 65 65 64 20 2d 20 41 64 6a 75 ...//Debug.Log("Line.Feed.-.Adju
21c60 73 74 69 6e 67 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 20 6f 6e 20 6c 69 6e 65 20 23 22 20 2b 20 sting.Line.Spacing.on.line.#".+.
21c80 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 m_lineNumber);..................
21ca0 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6f 66 66 73 65 74 44 65 6c 74 61 20 3d 20 6d 5f 6d 61 ........float.offsetDelta.=.m_ma
21cc0 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 2d 20 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 xLineAscender.-.m_startOfLineAsc
21ce0 65 6e 64 65 72 3b 0d 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 ender;..........................
21d00 41 64 6a 75 73 74 4c 69 6e 65 4f 66 66 73 65 74 28 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 AdjustLineOffset(m_firstCharacte
21d20 72 4f 66 4c 69 6e 65 2c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 2c 20 6f 66 66 73 65 rOfLine,.m_characterCount,.offse
21d40 74 44 65 6c 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tDelta);........................
21d60 20 20 65 6c 65 6d 65 6e 74 44 65 73 63 65 6e 64 65 72 49 49 20 2d 3d 20 6f 66 66 73 65 74 44 65 ..elementDescenderII.-=.offsetDe
21d80 6c 74 61 3b 0d 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 6d 5f lta;..........................m_
21da0 6c 69 6e 65 4f 66 66 73 65 74 20 2b 3d 20 6f 66 66 73 65 74 44 65 6c 74 61 3b 0d 0a 20 20 20 20 lineOffset.+=.offsetDelta;......
21dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
21de0 20 20 20 20 20 20 20 6d 5f 69 73 4e 65 77 50 61 67 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 .......m_isNewPage.=.false;.....
21e00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 61 6c 63 75 6c 61 74 65 20 ...................//.Calculate.
21e20 6c 69 6e 65 41 73 63 65 6e 64 65 72 20 26 20 6d 61 6b 65 20 73 75 72 65 20 69 66 20 6c 61 73 74 lineAscender.&.make.sure.if.last
21e40 20 63 68 61 72 61 63 74 65 72 20 69 73 20 73 75 70 65 72 73 63 72 69 70 74 20 6f 72 20 73 75 62 .character.is.superscript.or.sub
21e60 73 63 72 69 70 74 20 74 68 61 74 20 77 65 20 63 68 65 63 6b 20 74 68 61 74 20 61 73 20 77 65 6c script.that.we.check.that.as.wel
21e80 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6c 69 l.......................float.li
21ea0 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 2d neAscender.=.m_maxLineAscender.-
21ec0 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .m_lineOffset;..................
21ee0 20 20 20 20 66 6c 6f 61 74 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 4c ....float.lineDescender.=.m_maxL
21f00 69 6e 65 44 65 73 63 65 6e 64 65 72 20 2d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 0d 0a ineDescender.-.m_lineOffset;....
21f20 20 20 20 20 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 20 6d 61 ....................//.Update.ma
21f40 78 44 65 73 63 65 6e 64 65 72 20 61 6e 64 20 6d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 xDescender.and.maxVisibleDescend
21f60 65 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 61 78 44 65 73 er......................m_maxDes
21f80 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 44 65 73 63 65 6e 64 65 72 20 3c 20 6c 69 6e 65 44 65 cender.=.m_maxDescender.<.lineDe
21fa0 73 63 65 6e 64 65 72 20 3f 20 6d 5f 6d 61 78 44 65 73 63 65 6e 64 65 72 20 3a 20 6c 69 6e 65 44 scender.?.m_maxDescender.:.lineD
21fc0 65 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 escender;......................i
21fe0 66 20 28 21 69 73 4d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 53 65 74 29 0d 0a 20 f.(!isMaxVisibleDescenderSet)...
22000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 78 56 69 73 69 62 6c .......................maxVisibl
22020 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6d 5f 6d 61 78 44 65 73 63 65 6e 64 65 72 3b 0d 0a 0d 0a eDescender.=.m_maxDescender;....
22040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 75 73 65 4d 61 78 ....................if.(m_useMax
22060 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 20 26 26 20 28 6d 5f 63 68 61 72 61 63 74 65 72 VisibleDescender.&&.(m_character
22080 43 6f 75 6e 74 20 3e 3d 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 73 20 Count.>=.m_maxVisibleCharacters.
220a0 7c 7c 20 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 20 3e 3d 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 4c ||.m_lineNumber.>=.m_maxVisibleL
220c0 69 6e 65 73 29 29 0d 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 ines))..........................
220e0 69 73 4d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 53 65 74 20 3d 20 74 72 75 65 3b isMaxVisibleDescenderSet.=.true;
22100 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 61 76 65 20 ........................//.Save.
22120 4c 69 6e 65 20 49 6e 66 6f 72 6d 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Line.Information................
22140 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 ......m_textInfo.lineInfo[m_line
22160 4e 75 6d 62 65 72 5d 2e 66 69 72 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f Number].firstCharacterIndex.=.m_
22180 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 firstCharacterOfLine;...........
221a0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d ...........m_textInfo.lineInfo[m
221c0 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 _lineNumber].firstVisibleCharact
221e0 65 72 49 6e 64 65 78 20 3d 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 erIndex.=.m_firstVisibleCharacte
22200 72 4f 66 4c 69 6e 65 20 3d 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 rOfLine.=.m_firstCharacterOfLine
22220 20 3e 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 .>.m_firstVisibleCharacterOfLine
22240 20 3f 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3a 20 6d 5f 66 69 .?.m_firstCharacterOfLine.:.m_fi
22260 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 3b 0d 0a 20 20 20 20 rstVisibleCharacterOfLine;......
22280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 ................m_textInfo.lineI
222a0 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 nfo[m_lineNumber].lastCharacterI
222c0 6e 64 65 78 20 3d 20 6d 5f 6c 61 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 6d ndex.=.m_lastCharacterOfLine.=.m
222e0 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _characterCount;................
22300 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 ......m_textInfo.lineInfo[m_line
22320 4e 75 6d 62 65 72 5d 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 Number].lastVisibleCharacterInde
22340 78 20 3d 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 x.=.m_lastVisibleCharacterOfLine
22360 20 3d 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 .=.m_lastVisibleCharacterOfLine.
22380 3c 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 <.m_firstVisibleCharacterOfLine.
223a0 3f 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 ?.m_firstVisibleCharacterOfLine.
223c0 3a 20 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 3b 0d :.m_lastVisibleCharacterOfLine;.
223e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .......................m_textInf
22400 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 63 68 61 72 61 63 74 o.lineInfo[m_lineNumber].charact
22420 65 72 43 6f 75 6e 74 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f erCount.=.m_textInfo.lineInfo[m_
22440 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 2d lineNumber].lastCharacterIndex.-
22460 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 .m_textInfo.lineInfo[m_lineNumbe
22480 72 5d 2e 66 69 72 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 2b 20 31 3b 0d 0a 20 20 20 r].firstCharacterIndex.+.1;.....
224a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 .................m_textInfo.line
224c0 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 76 69 73 69 62 6c 65 43 68 61 72 61 63 Info[m_lineNumber].visibleCharac
224e0 74 65 72 43 6f 75 6e 74 20 3d 20 6d 5f 6c 69 6e 65 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 terCount.=.m_lineVisibleCharacte
22500 72 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 rCount;......................m_t
22520 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c extInfo.lineInfo[m_lineNumber].l
22540 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 6d 5f 74 ineExtents.min.=.new.Vector2(m_t
22560 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 66 69 72 73 74 56 69 73 extInfo.characterInfo[m_firstVis
22580 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e ibleCharacterOfLine].bottomLeft.
225a0 78 2c 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 x,.lineDescender);..............
225c0 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 ........m_textInfo.lineInfo[m_li
225e0 6e 65 4e 75 6d 62 65 72 5d 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 20 3d 20 6e 65 77 20 neNumber].lineExtents.max.=.new.
22600 56 65 63 74 6f 72 32 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f Vector2(m_textInfo.characterInfo
22620 5b 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 74 [m_lastVisibleCharacterOfLine].t
22640 6f 70 52 69 67 68 74 2e 78 2c 20 6c 69 6e 65 41 73 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 20 opRight.x,.lineAscender);.......
22660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e ...............m_textInfo.lineIn
22680 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 65 6e 67 74 68 20 3d 20 6d 5f 74 65 78 74 fo[m_lineNumber].length.=.m_text
226a0 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 69 6e 65 Info.lineInfo[m_lineNumber].line
226c0 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 28 70 61 64 64 69 6e 67 20 2a 20 63 75 72 72 65 Extents.max.x.-.(padding.*.curre
226e0 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntElementScale);................
22700 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 ......m_textInfo.lineInfo[m_line
22720 4e 75 6d 62 65 72 5d 2e 77 69 64 74 68 20 3d 20 77 69 64 74 68 3b 0d 0a 0d 0a 20 20 20 20 20 20 Number].width.=.width;..........
22740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e ..............if.(m_textInfo.lin
22760 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 63 68 61 72 61 63 74 65 72 43 6f 75 eInfo[m_lineNumber].characterCou
22780 6e 74 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nt.==.1)........................
227a0 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 ..m_textInfo.lineInfo[m_lineNumb
227c0 65 72 5d 2e 61 6c 69 67 6e 6d 65 6e 74 20 3d 20 6d 5f 6c 69 6e 65 4a 75 73 74 69 66 69 63 61 74 er].alignment.=.m_lineJustificat
227e0 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 ion;........................if.(
22800 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 6c 61 73 74 56 m_textInfo.characterInfo[m_lastV
22820 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d 2e 69 73 56 69 73 69 62 6c 65 isibleCharacterOfLine].isVisible
22840 29 0d 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 6d 5f 74 65 78 )..........................m_tex
22860 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6d 61 78 tInfo.lineInfo[m_lineNumber].max
22880 41 64 76 61 6e 63 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e Advance.=.m_textInfo.characterIn
228a0 66 6f 5b 6d 5f 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 5d fo[m_lastVisibleCharacterOfLine]
228c0 2e 78 41 64 76 61 6e 63 65 20 2d 20 28 63 68 61 72 61 63 74 65 72 53 70 61 63 69 6e 67 41 64 6a .xAdvance.-.(characterSpacingAdj
228e0 75 73 74 6d 65 6e 74 20 2b 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 2e 6e 6f 72 ustment.+.m_currentFontAsset.nor
22900 6d 61 6c 53 70 61 63 69 6e 67 4f 66 66 73 65 74 29 20 2a 20 63 75 72 72 65 6e 74 45 6c 65 6d 65 malSpacingOffset).*.currentEleme
22920 6e 74 53 63 61 6c 65 20 2d 20 6d 5f 63 53 70 61 63 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 ntScale.-.m_cSpacing;...........
22940 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........else.................
22960 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c .........m_textInfo.lineInfo[m_l
22980 69 6e 65 4e 75 6d 62 65 72 5d 2e 6d 61 78 41 64 76 61 6e 63 65 20 3d 20 6d 5f 74 65 78 74 49 6e ineNumber].maxAdvance.=.m_textIn
229a0 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 6c 61 73 74 43 68 61 72 61 63 74 65 72 fo.characterInfo[m_lastCharacter
229c0 4f 66 4c 69 6e 65 5d 2e 78 41 64 76 61 6e 63 65 20 2d 20 28 63 68 61 72 61 63 74 65 72 53 70 61 OfLine].xAdvance.-.(characterSpa
229e0 63 69 6e 67 41 64 6a 75 73 74 6d 65 6e 74 20 2b 20 6d 5f 63 75 72 72 65 6e 74 46 6f 6e 74 41 73 cingAdjustment.+.m_currentFontAs
22a00 73 65 74 2e 6e 6f 72 6d 61 6c 53 70 61 63 69 6e 67 4f 66 66 73 65 74 29 20 2a 20 63 75 72 72 65 set.normalSpacingOffset).*.curre
22a20 6e 74 45 6c 65 6d 65 6e 74 53 63 61 6c 65 20 2d 20 6d 5f 63 53 70 61 63 69 6e 67 3b 0d 0a 0d 0a ntElementScale.-.m_cSpacing;....
22a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c ....................m_textInfo.l
22a60 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 62 61 73 65 6c 69 6e 65 20 3d ineInfo[m_lineNumber].baseline.=
22a80 20 30 20 2d 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .0.-.m_lineOffset;..............
22aa0 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 ........m_textInfo.lineInfo[m_li
22ac0 6e 65 4e 75 6d 62 65 72 5d 2e 61 73 63 65 6e 64 65 72 20 3d 20 6c 69 6e 65 41 73 63 65 6e 64 65 neNumber].ascender.=.lineAscende
22ae0 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e r;......................m_textIn
22b00 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 64 65 73 63 65 6e fo.lineInfo[m_lineNumber].descen
22b20 64 65 72 20 3d 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 der.=.lineDescender;............
22b40 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6d 5f ..........m_textInfo.lineInfo[m_
22b60 6c 69 6e 65 4e 75 6d 62 65 72 5d 2e 6c 69 6e 65 48 65 69 67 68 74 20 3d 20 6c 69 6e 65 41 73 63 lineNumber].lineHeight.=.lineAsc
22b80 65 6e 64 65 72 20 2d 20 6c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 2b 20 6c 69 6e 65 47 61 70 20 ender.-.lineDescender.+.lineGap.
22ba0 2a 20 62 61 73 65 53 63 61 6c 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 *.baseScale;....................
22bc0 20 20 20 20 6d 5f 66 69 72 73 74 43 68 61 72 61 63 74 65 72 4f 66 4c 69 6e 65 20 3d 20 6d 5f 63 ....m_firstCharacterOfLine.=.m_c
22be0 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 haracterCount.+.1;..............
22c00 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 43 6f ........m_lineVisibleCharacterCo
22c20 75 6e 74 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 unt.=.0;........................
22c40 2f 2f 20 41 64 64 20 6e 65 77 20 6c 69 6e 65 20 69 66 20 6e 6f 74 20 6c 61 73 74 20 6c 69 6e 65 //.Add.new.line.if.not.last.line
22c60 20 6f 72 20 63 68 61 72 61 63 74 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .or.character...................
22c80 20 20 20 20 69 66 20 28 63 68 61 72 43 6f 64 65 20 3d 3d 20 31 30 29 0d 0a 20 20 20 20 20 20 20 ....if.(charCode.==.10).........
22ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
22cc0 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 72 65 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 68 ........//.Store.the.state.of.th
22ce0 65 20 6c 69 6e 65 20 62 65 66 6f 72 65 20 73 74 61 72 74 69 6e 67 20 6f 6e 20 74 68 65 20 6e 65 e.line.before.starting.on.the.ne
22d00 77 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 w.line..........................
22d20 20 53 61 76 65 57 6f 72 64 57 72 61 70 70 69 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 .SaveWordWrappingState(ref.m_Sav
22d40 65 64 4c 69 6e 65 53 74 61 74 65 2c 20 69 2c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 edLineState,.i,.m_characterCount
22d60 29 3b 0d 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 2f 2f 20 53 );..........................//.S
22d80 74 6f 72 65 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 6c 61 73 74 20 43 68 61 72 61 tore.the.state.of.the.last.Chara
22da0 63 74 65 72 20 62 65 66 6f 72 65 20 74 68 65 20 6e 65 77 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 cter.before.the.new.line........
22dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 61 76 65 57 6f 72 64 57 72 61 70 70 ...................SaveWordWrapp
22de0 69 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 74 61 74 ingState(ref.m_SavedWordWrapStat
22e00 65 2c 20 69 2c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 29 3b 0d 0a 0d 0a 20 20 20 20 e,.i,.m_characterCount);........
22e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 ....................m_lineNumber
22e40 20 2b 3d 20 31 3b 0d 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 .+=.1;..........................
22e60 69 73 53 74 61 72 74 4f 66 4e 65 77 4c 69 6e 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 isStartOfNewLine.=.true;........
22e80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 67 6e 6f 72 65 4e 6f 6e 42 72 65 61 6b ..................ignoreNonBreak
22ea0 69 6e 67 53 70 61 63 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ingSpace.=.false;...............
22ec0 20 20 20 20 20 20 20 20 20 20 20 69 73 46 69 72 73 74 57 6f 72 64 20 3d 20 74 72 75 65 3b 0d 0a ...........isFirstWord.=.true;..
22ee0 0d 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 2f 2f 20 43 68 65 ..........................//.Che
22f00 63 6b 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 41 72 72 61 79 20 69 73 20 6c 61 72 67 65 20 65 ck.to.make.sure.Array.is.large.e
22f20 6e 6f 75 67 68 20 74 6f 20 68 6f 6c 64 20 61 20 6e 65 77 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 nough.to.hold.a.new.line........
22f40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 65 4e 75 6d ...................if.(m_lineNum
22f60 62 65 72 20 3e 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 2e 4c 65 6e 67 74 ber.>=.m_textInfo.lineInfo.Lengt
22f80 68 29 0d 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 20 20 h)..............................
22fa0 52 65 73 69 7a 65 4c 69 6e 65 45 78 74 65 6e 74 73 28 6d 5f 6c 69 6e 65 4e 75 6d 62 65 72 29 3b ResizeLineExtents(m_lineNumber);
22fc0 0d 0a 0d 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 2f 2f 20 41 ............................//.A
22fe0 70 70 6c 79 20 4c 69 6e 65 20 53 70 61 63 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 pply.Line.Spacing...............
23000 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6c 69 6e 65 48 65 69 67 68 74 20 3d 3d 20 54 ...........if.(m_lineHeight.==.T
23020 4d 50 5f 4d 61 74 68 2e 46 4c 4f 41 54 5f 55 4e 53 45 54 29 0d 0a 20 20 20 20 20 20 20 20 20 20 MP_Math.FLOAT_UNSET)............
23040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
23060 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 69 6e 65 4f 66 66 73 65 74 44 65 6c 74 61 20 3d 20 30 .............lineOffsetDelta.=.0
23080 20 2d 20 6d 5f 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 2b 20 65 6c 65 6d 65 6e 74 41 .-.m_maxLineDescender.+.elementA
230a0 73 63 65 6e 64 65 72 20 2b 20 28 6c 69 6e 65 47 61 70 20 2b 20 6d 5f 6c 69 6e 65 53 70 61 63 69 scender.+.(lineGap.+.m_lineSpaci
230c0 6e 67 20 2b 20 6d 5f 70 61 72 61 67 72 61 70 68 53 70 61 63 69 6e 67 20 2b 20 6d 5f 6c 69 6e 65 ng.+.m_paragraphSpacing.+.m_line
230e0 53 70 61 63 69 6e 67 44 65 6c 74 61 29 20 2a 20 62 61 73 65 53 63 61 6c 65 3b 0d 0a 20 20 20 20 SpacingDelta).*.baseScale;......
23100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4f 66 ........................m_lineOf
23120 66 73 65 74 20 2b 3d 20 6c 69 6e 65 4f 66 66 73 65 74 44 65 6c 74 61 3b 0d 0a 20 20 20 20 20 20 fset.+=.lineOffsetDelta;........
23140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
23160 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .............else...............
23180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6c 69 6e 65 4f 66 66 73 65 74 20 2b 3d 20 6d ...............m_lineOffset.+=.m
231a0 5f 6c 69 6e 65 48 65 69 67 68 74 20 2b 20 28 6d 5f 6c 69 6e 65 53 70 61 63 69 6e 67 20 2b 20 6d _lineHeight.+.(m_lineSpacing.+.m
231c0 5f 70 61 72 61 67 72 61 70 68 53 70 61 63 69 6e 67 29 20 2a 20 62 61 73 65 53 63 61 6c 65 3b 0d _paragraphSpacing).*.baseScale;.
231e0 0a 0d 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 6d 5f 6d 61 78 ...........................m_max
23200 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 6b 5f 4c 61 72 67 65 4e 65 67 61 74 69 76 65 46 6c LineAscender.=.k_LargeNegativeFl
23220 6f 61 74 3b 0d 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 6d 5f oat;..........................m_
23240 6d 61 78 4c 69 6e 65 44 65 73 63 65 6e 64 65 72 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 maxLineDescender.=.k_LargePositi
23260 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 veFloat;........................
23280 20 20 6d 5f 73 74 61 72 74 4f 66 4c 69 6e 65 41 73 63 65 6e 64 65 72 20 3d 20 65 6c 65 6d 65 6e ..m_startOfLineAscender.=.elemen
232a0 74 41 73 63 65 6e 64 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tAscender;......................
232c0 20 20 20 20 20 20 6d 5f 78 41 64 76 61 6e 63 65 20 3d 20 30 20 2b 20 74 61 67 5f 4c 69 6e 65 49 ......m_xAdvance.=.0.+.tag_LineI
232e0 6e 64 65 6e 74 20 2b 20 74 61 67 5f 49 6e 64 65 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 ndent.+.tag_Indent;.............
23300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 6c 69 70 73 69 73 49 6e 64 65 78 20 3d 20 6d ...............ellipsisIndex.=.m
23320 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 _characterCount.-.1;............
23340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 ................m_characterCount
23360 20 2b 3d 20 31 3b 0d 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 .+=.1;..........................
23380 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d continue;......................}
233a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
233c0 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 43 68 65 63 6b 20 66 6f 72 20 4c 69 6e 65 66 65 .....#endregion.Check.for.Linefe
233e0 65 64 20 6f 72 20 4c 61 73 74 20 43 68 61 72 61 63 74 65 72 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 ed.or.Last.Character............
23400 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 74 6f 72 65 20 52 65 63 74 61 6e 67 6c 65 20 70 6f 73 ..........//.Store.Rectangle.pos
23420 69 74 69 6f 6e 73 20 66 6f 72 20 65 61 63 68 20 43 68 61 72 61 63 74 65 72 2e 0d 0a 20 20 20 20 itions.for.each.Character.......
23440 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 53 61 76 65 20 43 68 61 72 61 63 74 ............#region.Save.Charact
23460 65 72 49 6e 66 6f 20 66 6f 72 20 74 68 65 20 63 75 72 72 65 6e 74 20 63 68 61 72 61 63 74 65 72 erInfo.for.the.current.character
23480 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 ...................//.Determine.
234a0 74 68 65 20 62 6f 75 6e 64 73 20 6f 66 20 74 68 65 20 4d 65 73 68 2e 0d 0a 20 20 20 20 20 20 20 the.bounds.of.the.Mesh..........
234c0 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .........if.(m_textInfo.characte
234e0 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 69 73 56 69 73 69 62 6c rInfo[m_characterCount].isVisibl
23500 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 e)..................{...........
23520 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 20 3d ...........m_meshExtents.min.x.=
23540 20 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 2c 20 .Mathf.Min(m_meshExtents.min.x,.
23560 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 m_textInfo.characterInfo[m_chara
23580 63 74 65 72 43 6f 75 6e 74 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 29 3b 0d 0a 20 20 20 20 20 cterCount].bottomLeft.x);.......
235a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e ...............m_meshExtents.min
235c0 2e 79 20 3d 20 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e .y.=.Mathf.Min(m_meshExtents.min
235e0 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 .y,.m_textInfo.characterInfo[m_c
23600 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 79 29 3b 0d 0a 0d haracterCount].bottomLeft.y);...
23620 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 45 78 74 65 6e .....................m_meshExten
23640 74 73 2e 6d 61 78 2e 78 20 3d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 6d 65 73 68 45 78 74 65 6e ts.max.x.=.Mathf.Max(m_meshExten
23660 74 73 2e 6d 61 78 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e ts.max.x,.m_textInfo.characterIn
23680 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 74 6f 70 52 69 67 68 74 2e 78 29 fo[m_characterCount].topRight.x)
236a0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 45 78 74 ;......................m_meshExt
236c0 65 6e 74 73 2e 6d 61 78 2e 79 20 3d 20 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 6d 65 73 68 45 78 74 ents.max.y.=.Mathf.Max(m_meshExt
236e0 65 6e 74 73 2e 6d 61 78 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 ents.max.y,.m_textInfo.character
23700 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 74 6f 70 52 69 67 68 74 2e Info[m_characterCount].topRight.
23720 79 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 6d y);........................//m_m
23740 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 4d 61 74 eshExtents.min.=.new.Vector2(Mat
23760 68 66 2e 4d 69 6e 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 2c 20 6d 5f 74 65 hf.Min(m_meshExtents.min.x,.m_te
23780 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 xtInfo.characterInfo[m_character
237a0 43 6f 75 6e 74 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 29 2c 20 4d 61 74 68 66 2e 4d 69 6e 28 Count].bottomLeft.x),.Mathf.Min(
237c0 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e m_meshExtents.min.y,.m_textInfo.
237e0 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e characterInfo[m_characterCount].
23800 62 6f 74 74 6f 6d 4c 65 66 74 2e 79 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 bottomLeft.y));.................
23820 20 20 20 20 20 2f 2f 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 20 3d 20 6e 65 77 20 56 .....//m_meshExtents.max.=.new.V
23840 65 63 74 6f 72 32 28 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d ector2(Mathf.Max(m_meshExtents.m
23860 61 78 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d ax.x,.m_textInfo.characterInfo[m
23880 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 5d 2e 74 6f 70 52 69 67 68 74 2e 78 29 2c 20 4d 61 _characterCount].topRight.x),.Ma
238a0 74 68 66 2e 4d 61 78 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 2c 20 6d 5f 74 thf.Max(m_meshExtents.max.y,.m_t
238c0 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 extInfo.characterInfo[m_characte
238e0 72 43 6f 75 6e 74 5d 2e 74 6f 70 52 69 67 68 74 2e 79 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 rCount].topRight.y));...........
23900 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .......}......................//
23920 20 53 61 76 65 20 70 61 67 65 49 6e 66 6f 20 44 61 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .Save.pageInfo.Data.............
23940 20 20 20 20 20 69 66 20 28 6d 5f 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 20 3d 3d 20 54 65 78 74 4f .....if.(m_overflowMode.==.TextO
23960 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d verflowModes.Page.&&.charCode.!=
23980 20 31 33 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 31 30 29 20 2f 2f 20 26 26 20 6d 5f 70 .13.&&.charCode.!=.10).//.&&.m_p
239a0 61 67 65 4e 75 6d 62 65 72 20 3c 20 31 36 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ageNumber.<.16).................
239c0 20 7b 0d 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 68 65 63 6b .{......................//.Check
239e0 20 69 66 20 77 65 20 6e 65 65 64 20 74 6f 20 69 6e 63 72 65 61 73 65 20 61 6c 6c 6f 63 61 74 69 .if.we.need.to.increase.allocati
23a00 6f 6e 73 20 66 6f 72 20 74 68 65 20 70 61 67 65 49 6e 66 6f 20 61 72 72 61 79 2e 0d 0a 20 20 20 ons.for.the.pageInfo.array......
23a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 70 61 67 65 4e 75 6d 62 65 .................if.(m_pageNumbe
23a40 72 20 2b 20 31 20 3e 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 2e 4c 65 6e 67 r.+.1.>.m_textInfo.pageInfo.Leng
23a60 74 68 29 0d 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 54 4d 50 th)..........................TMP
23a80 5f 54 65 78 74 49 6e 66 6f 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 74 65 78 74 49 6e 66 6f 2e _TextInfo.Resize(ref.m_textInfo.
23aa0 70 61 67 65 49 6e 66 6f 2c 20 6d 5f 70 61 67 65 4e 75 6d 62 65 72 20 2b 20 31 2c 20 74 72 75 65 pageInfo,.m_pageNumber.+.1,.true
23ac0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 );........................m_text
23ae0 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 6d 5f 70 61 67 65 4e 75 6d 62 65 72 5d 2e 61 73 63 65 Info.pageInfo[m_pageNumber].asce
23b00 6e 64 65 72 20 3d 20 70 61 67 65 41 73 63 65 6e 64 65 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 nder.=.pageAscender;............
23b20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 6d 5f ..........m_textInfo.pageInfo[m_
23b40 70 61 67 65 4e 75 6d 62 65 72 5d 2e 64 65 73 63 65 6e 64 65 72 20 3d 20 65 6c 65 6d 65 6e 74 44 pageNumber].descender.=.elementD
23b60 65 73 63 65 6e 64 65 72 20 3c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 6d escender.<.m_textInfo.pageInfo[m
23b80 5f 70 61 67 65 4e 75 6d 62 65 72 5d 2e 64 65 73 63 65 6e 64 65 72 20 3f 20 65 6c 65 6d 65 6e 74 _pageNumber].descender.?.element
23ba0 44 65 73 63 65 6e 64 65 72 20 3a 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b Descender.:.m_textInfo.pageInfo[
23bc0 6d 5f 70 61 67 65 4e 75 6d 62 65 72 5d 2e 64 65 73 63 65 6e 64 65 72 3b 0d 0a 0d 0a 20 20 20 20 m_pageNumber].descender;........
23be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 70 61 67 65 4e 75 6d 62 65 72 ................if.(m_pageNumber
23c00 20 3d 3d 20 30 20 26 26 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 3d 20 30 29 0d .==.0.&&.m_characterCount.==.0).
23c20 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 6d 5f 74 65 78 74 49 .........................m_textI
23c40 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 6d 5f 70 61 67 65 4e 75 6d 62 65 72 5d 2e 66 69 72 73 74 nfo.pageInfo[m_pageNumber].first
23c60 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e CharacterIndex.=.m_characterCoun
23c80 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 t;......................else.if.
23ca0 28 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3e 20 30 20 26 26 20 6d 5f 70 61 67 65 4e (m_characterCount.>.0.&&.m_pageN
23cc0 75 6d 62 65 72 20 21 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 umber.!=.m_textInfo.characterInf
23ce0 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 5d 2e 70 61 67 65 4e 75 6d 62 o[m_characterCount.-.1].pageNumb
23d00 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 er)......................{......
23d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 ....................m_textInfo.p
23d40 61 67 65 49 6e 66 6f 5b 6d 5f 70 61 67 65 4e 75 6d 62 65 72 20 2d 20 31 5d 2e 6c 61 73 74 43 68 ageInfo[m_pageNumber.-.1].lastCh
23d60 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 aracterIndex.=.m_characterCount.
23d80 2d 20 31 3b 0d 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 6d 5f -.1;..........................m_
23da0 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 6d 5f 70 61 67 65 4e 75 6d 62 65 72 5d 2e textInfo.pageInfo[m_pageNumber].
23dc0 66 69 72 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 firstCharacterIndex.=.m_characte
23de0 72 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a rCount;......................}..
23e00 20 20 20 20 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 63 ....................else.if.(m_c
23e20 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 3d 20 74 6f 74 61 6c 43 68 61 72 61 63 74 65 72 43 haracterCount.==.totalCharacterC
23e40 6f 75 6e 74 20 2d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ount.-.1).......................
23e60 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 6d 5f 70 61 67 65 4e 75 6d ...m_textInfo.pageInfo[m_pageNum
23e80 62 65 72 5d 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6d 5f 63 68 61 72 ber].lastCharacterIndex.=.m_char
23ea0 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a acterCount;..................}..
23ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 53 61 76 69 6e ................#endregion.Savin
23ee0 67 20 43 68 61 72 61 63 74 65 72 49 6e 66 6f 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 g.CharacterInfo.................
23f00 20 20 20 20 20 2f 2f 20 53 61 76 65 20 53 74 61 74 65 20 6f 66 20 4d 65 73 68 20 43 72 65 61 74 .....//.Save.State.of.Mesh.Creat
23f20 69 6f 6e 20 66 6f 72 20 68 61 6e 64 6c 69 6e 67 20 6f 66 20 57 6f 72 64 20 57 72 61 70 70 69 6e ion.for.handling.of.Word.Wrappin
23f40 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 53 61 76 65 20 g..................#region.Save.
23f60 57 6f 72 64 20 57 72 61 70 70 69 6e 67 20 53 74 61 74 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 Word.Wrapping.State.............
23f80 20 20 20 20 20 69 66 20 28 6d 5f 65 6e 61 62 6c 65 57 6f 72 64 57 72 61 70 70 69 6e 67 20 7c 7c .....if.(m_enableWordWrapping.||
23fa0 20 6d 5f 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 20 3d 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d .m_overflowMode.==.TextOverflowM
23fc0 6f 64 65 73 2e 54 72 75 6e 63 61 74 65 20 7c 7c 20 6d 5f 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 20 odes.Truncate.||.m_overflowMode.
23fe0 3d 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 45 6c 6c 69 70 73 69 73 29 0d 0a ==.TextOverflowModes.Ellipsis)..
24000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
24020 20 20 20 20 20 20 20 69 66 20 28 28 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 28 63 .......if.((char.IsWhiteSpace((c
24040 68 61 72 29 63 68 61 72 43 6f 64 65 29 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 32 har)charCode).||.charCode.==.0x2
24060 30 30 42 20 7c 7c 20 63 68 61 72 43 6f 64 65 20 3d 3d 20 30 78 32 44 20 7c 7c 20 63 68 61 72 43 00B.||.charCode.==.0x2D.||.charC
24080 6f 64 65 20 3d 3d 20 30 78 41 44 29 20 26 26 20 28 21 6d 5f 69 73 4e 6f 6e 42 72 65 61 6b 69 6e ode.==.0xAD).&&.(!m_isNonBreakin
240a0 67 53 70 61 63 65 20 7c 7c 20 69 67 6e 6f 72 65 4e 6f 6e 42 72 65 61 6b 69 6e 67 53 70 61 63 65 gSpace.||.ignoreNonBreakingSpace
240c0 29 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 30 78 41 30 20 26 26 20 63 68 61 72 43 6f 64 ).&&.charCode.!=.0xA0.&&.charCod
240e0 65 20 21 3d 20 30 78 32 30 30 37 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 30 78 32 30 31 e.!=.0x2007.&&.charCode.!=.0x201
24100 31 20 26 26 20 63 68 61 72 43 6f 64 65 20 21 3d 20 30 78 32 30 32 46 20 26 26 20 63 68 61 72 43 1.&&.charCode.!=.0x202F.&&.charC
24120 6f 64 65 20 21 3d 20 30 78 32 30 36 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ode.!=.0x2060)..................
24140 20 20 20 20 7b 0d 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 2f ....{........................../
24160 2f 20 57 65 20 73 74 6f 72 65 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 6e 75 6d 65 72 6f 75 73 /.We.store.the.state.of.numerous
24180 20 76 61 72 69 61 62 6c 65 73 20 66 6f 72 20 74 68 65 20 6d 6f 73 74 20 72 65 63 65 6e 74 20 53 .variables.for.the.most.recent.S
241a0 70 61 63 65 2c 20 4c 69 6e 65 46 65 65 64 20 6f 72 20 43 61 72 72 69 61 67 65 20 52 65 74 75 72 pace,.LineFeed.or.Carriage.Retur
241c0 6e 20 74 6f 20 65 6e 61 62 6c 65 20 74 68 65 6d 20 74 6f 20 62 65 20 72 65 73 74 6f 72 65 64 20 n.to.enable.them.to.be.restored.
241e0 0d 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 2f 2f 20 66 6f 72 ..........................//.for
24200 20 57 6f 72 64 20 57 72 61 70 70 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Word.Wrapping..................
24220 20 20 20 20 20 20 20 20 20 53 61 76 65 57 6f 72 64 57 72 61 70 70 69 6e 67 53 74 61 74 65 28 72 .........SaveWordWrappingState(r
24240 65 66 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 74 61 74 65 2c 20 69 2c 20 6d 5f 63 68 ef.m_SavedWordWrapState,.i,.m_ch
24260 61 72 61 63 74 65 72 43 6f 75 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aracterCount);..................
24280 20 20 20 20 20 20 20 20 6d 5f 69 73 43 68 61 72 61 63 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 ........m_isCharacterWrappingEna
242a0 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 bled.=.false;...................
242c0 20 20 20 20 20 20 20 69 73 46 69 72 73 74 57 6f 72 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 .......isFirstWord.=.false;.....
242e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
24300 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 69 6e 67 20 66 6f 72 20 45 61 73 74 20 41 73 69 ........//.Handling.for.East.Asi
24320 61 6e 20 6c 61 6e 67 75 61 67 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 an.languages....................
24340 20 20 65 6c 73 65 20 69 66 20 28 28 20 20 63 68 61 72 43 6f 64 65 20 3e 20 30 78 31 31 30 30 20 ..else.if.((..charCode.>.0x1100.
24360 26 26 20 63 68 61 72 43 6f 64 65 20 3c 20 30 78 31 31 66 66 20 7c 7c 20 2f 2a 20 48 61 6e 67 75 &&.charCode.<.0x11ff.||./*.Hangu
24380 6c 20 4a 61 6d 6f 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 l.Jamo.*/.......................
243a0 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 43 6f 64 65 20 3e 20 30 78 32 45 38 30 20 26 26 20 ...........charCode.>.0x2E80.&&.
243c0 63 68 61 72 43 6f 64 65 20 3c 20 30 78 39 46 46 46 20 7c 7c 20 2f 2a 20 43 4a 4b 20 2a 2f 0d 0a charCode.<.0x9FFF.||./*.CJK.*/..
243e0 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 20 20 20 20 20 ................................
24400 63 68 61 72 43 6f 64 65 20 3e 20 30 78 41 39 36 30 20 26 26 20 63 68 61 72 43 6f 64 65 20 3c 20 charCode.>.0xA960.&&.charCode.<.
24420 30 78 41 39 37 46 20 7c 7c 20 2f 2a 20 48 61 6e 67 75 6c 20 4a 61 6d 65 20 45 78 74 65 6e 64 65 0xA97F.||./*.Hangul.Jame.Extende
24440 64 2d 41 20 2a 2f 0d 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 d-A.*/..........................
24460 20 20 20 20 20 20 20 20 63 68 61 72 43 6f 64 65 20 3e 20 30 78 41 43 30 30 20 26 26 20 63 68 61 ........charCode.>.0xAC00.&&.cha
24480 72 43 6f 64 65 20 3c 20 30 78 44 37 46 46 20 7c 7c 20 2f 2a 20 48 61 6e 67 75 6c 20 53 79 6c 6c rCode.<.0xD7FF.||./*.Hangul.Syll
244a0 61 62 6c 65 73 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ables.*/........................
244c0 20 20 20 20 20 20 20 20 20 20 63 68 61 72 43 6f 64 65 20 3e 20 30 78 46 39 30 30 20 26 26 20 63 ..........charCode.>.0xF900.&&.c
244e0 68 61 72 43 6f 64 65 20 3c 20 30 78 46 41 46 46 20 7c 7c 20 2f 2a 20 43 4a 4b 20 43 6f 6d 70 61 harCode.<.0xFAFF.||./*.CJK.Compa
24500 74 69 62 69 6c 69 74 79 20 49 64 65 6f 67 72 61 70 68 73 20 2a 2f 0d 0a 20 20 20 20 20 20 20 20 tibility.Ideographs.*/..........
24520 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 68 61 72 43 6f 64 65 ........................charCode
24540 20 3e 20 30 78 46 45 33 30 20 26 26 20 63 68 61 72 43 6f 64 65 20 3c 20 30 78 46 45 34 46 20 7c .>.0xFE30.&&.charCode.<.0xFE4F.|
24560 7c 20 2f 2a 20 43 4a 4b 20 43 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 46 6f 72 6d 73 20 2a 2f 0d |./*.CJK.Compatibility.Forms.*/.
24580 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 20 20 20 20 20 ................................
245a0 20 63 68 61 72 43 6f 64 65 20 3e 20 30 78 46 46 30 30 20 26 26 20 63 68 61 72 43 6f 64 65 20 3c .charCode.>.0xFF00.&&.charCode.<
245c0 20 30 78 46 46 45 46 29 20 20 20 2f 2a 20 43 4a 4b 20 48 61 6c 66 77 69 64 74 68 20 2a 2f 0d 0a .0xFFEF).../*.CJK.Halfwidth.*/..
245e0 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 20 20 20 20 20 ................................
24600 26 26 20 21 6d 5f 69 73 4e 6f 6e 42 72 65 61 6b 69 6e 67 53 70 61 63 65 29 0d 0a 20 20 20 20 20 &&.!m_isNonBreakingSpace).......
24620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
24640 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 46 69 72 73 74 57 6f 72 64 20 7c 7c 20 69 73 4c ..........if.(isFirstWord.||.isL
24660 61 73 74 42 72 65 61 6b 69 6e 67 43 68 61 72 20 7c 7c 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e astBreakingChar.||.TMP_Settings.
24680 6c 69 6e 65 62 72 65 61 6b 69 6e 67 52 75 6c 65 73 2e 6c 65 61 64 69 6e 67 43 68 61 72 61 63 74 linebreakingRules.leadingCharact
246a0 65 72 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 63 68 61 72 43 6f 64 65 29 20 3d 3d 20 66 61 6c ers.ContainsKey(charCode).==.fal
246c0 73 65 20 26 26 0d 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 se.&&...........................
246e0 20 20 20 28 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3c 20 74 6f 74 61 6c 43 68 61 72 ...(m_characterCount.<.totalChar
24700 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 acterCount.-.1.&&...............
24720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 53 65 74 74 69 6e 67 73 2e 6c 69 6e 65 ...............TMP_Settings.line
24740 62 72 65 61 6b 69 6e 67 52 75 6c 65 73 2e 66 6f 6c 6c 6f 77 69 6e 67 43 68 61 72 61 63 74 65 72 breakingRules.followingCharacter
24760 73 2e 43 6f 6e 74 61 69 6e 73 4b 65 79 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 s.ContainsKey(m_textInfo.charact
24780 65 72 49 6e 66 6f 5b 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 20 31 5d 2e 63 68 61 erInfo[m_characterCount.+.1].cha
247a0 72 61 63 74 65 72 29 20 3d 3d 20 66 61 6c 73 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 racter).==.false))..............
247c0 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............{...................
247e0 20 20 20 20 20 20 20 20 20 20 20 53 61 76 65 57 6f 72 64 57 72 61 70 70 69 6e 67 53 74 61 74 65 ...........SaveWordWrappingState
24800 28 72 65 66 20 6d 5f 53 61 76 65 64 57 6f 72 64 57 72 61 70 53 74 61 74 65 2c 20 69 2c 20 6d 5f (ref.m_SavedWordWrapState,.i,.m_
24820 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 characterCount);................
24840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 43 68 61 72 61 63 74 65 72 57 72 61 70 70 ..............m_isCharacterWrapp
24860 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ingEnabled.=.false;.............
24880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 46 69 72 73 74 57 6f 72 64 20 3d 20 66 .................isFirstWord.=.f
248a0 61 6c 73 65 3b 0d 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 7d alse;..........................}
248c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
248e0 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 28 69 73 46 69 72 73 74 57 6f .............else.if.((isFirstWo
24900 72 64 20 7c 7c 20 6d 5f 69 73 43 68 61 72 61 63 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c rd.||.m_isCharacterWrappingEnabl
24920 65 64 20 3d 3d 20 74 72 75 65 20 7c 7c 20 69 73 4c 61 73 74 42 72 65 61 6b 69 6e 67 43 68 61 72 ed.==.true.||.isLastBreakingChar
24940 29 29 0d 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 53 61 76 65 ))..........................Save
24960 57 6f 72 64 57 72 61 70 70 69 6e 67 53 74 61 74 65 28 72 65 66 20 6d 5f 53 61 76 65 64 57 6f 72 WordWrappingState(ref.m_SavedWor
24980 64 57 72 61 70 53 74 61 74 65 2c 20 69 2c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 29 dWrapState,.i,.m_characterCount)
249a0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 ;..................}............
249c0 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 53 61 76 65 20 57 6f 72 64 20 57 72 61 70 70 ......#endregion.Save.Word.Wrapp
249e0 69 6e 67 20 53 74 61 74 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 63 ing.State....................m_c
24a00 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 haracterCount.+=.1;.............
24a20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 41 75 74 6f 20 .}................//.Check.Auto.
24a40 53 69 7a 69 6e 67 20 61 6e 64 20 69 6e 63 72 65 61 73 65 20 66 6f 6e 74 20 73 69 7a 65 20 74 6f Sizing.and.increase.font.size.to
24a60 20 66 69 6c 6c 20 74 65 78 74 20 63 6f 6e 74 61 69 6e 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 .fill.text.container............
24a80 20 20 20 23 72 65 67 69 6f 6e 20 43 68 65 63 6b 20 41 75 74 6f 2d 53 69 7a 69 6e 67 20 28 55 70 ...#region.Check.Auto-Sizing.(Up
24aa0 70 65 72 20 46 6f 6e 74 20 53 69 7a 65 20 42 6f 75 6e 64 73 29 0d 0a 20 20 20 20 20 20 20 20 20 per.Font.Size.Bounds)...........
24ac0 20 20 20 66 6f 6e 74 53 69 7a 65 44 65 6c 74 61 20 3d 20 6d 5f 6d 61 78 46 6f 6e 74 53 69 7a 65 ...fontSizeDelta.=.m_maxFontSize
24ae0 20 2d 20 6d 5f 6d 69 6e 46 6f 6e 74 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 .-.m_minFontSize;..............i
24b00 66 20 28 21 6d 5f 69 73 43 68 61 72 61 63 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 f.(!m_isCharacterWrappingEnabled
24b20 20 26 26 20 6d 5f 65 6e 61 62 6c 65 41 75 74 6f 53 69 7a 69 6e 67 20 26 26 20 66 6f 6e 74 53 69 .&&.m_enableAutoSizing.&&.fontSi
24b40 7a 65 44 65 6c 74 61 20 3e 20 30 2e 30 35 31 66 20 26 26 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 3c zeDelta.>.0.051f.&&.m_fontSize.<
24b60 20 6d 5f 66 6f 6e 74 53 69 7a 65 4d 61 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a .m_fontSizeMax)..............{..
24b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 69 6e 46 6f 6e 74 53 69 7a 65 20 3d 20 ................m_minFontSize.=.
24ba0 6d 5f 66 6f 6e 74 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 m_fontSize;..................m_f
24bc0 6f 6e 74 53 69 7a 65 20 2b 3d 20 4d 61 74 68 66 2e 4d 61 78 28 28 6d 5f 6d 61 78 46 6f 6e 74 53 ontSize.+=.Mathf.Max((m_maxFontS
24be0 69 7a 65 20 2d 20 6d 5f 66 6f 6e 74 53 69 7a 65 29 20 2f 20 32 2c 20 30 2e 30 35 66 29 3b 0d 0a ize.-.m_fontSize)./.2,.0.05f);..
24c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 66 6f 6e 74 53 69 7a 65 20 3d 20 28 69 6e ................m_fontSize.=.(in
24c20 74 29 28 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 66 6f 6e 74 53 69 7a 65 2c 20 6d 5f 66 6f 6e 74 53 t)(Mathf.Min(m_fontSize,.m_fontS
24c40 69 7a 65 4d 61 78 29 20 2a 20 32 30 20 2b 20 30 2e 35 66 29 20 2f 20 32 30 66 3b 0d 0a 0d 0a 20 izeMax).*.20.+.0.5f)./.20f;.....
24c60 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 6d 5f 66 6f 6e ...............//Debug.Log(m_fon
24c80 74 53 69 7a 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6c tSize);....................if.(l
24ca0 6f 6f 70 43 6f 75 6e 74 41 20 3e 20 32 30 29 20 72 65 74 75 72 6e 3b 20 2f 2f 20 41 64 64 65 64 oopCountA.>.20).return;.//.Added
24cc0 20 74 6f 20 64 65 62 75 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 47 65 6e 65 72 .to.debug..................Gener
24ce0 61 74 65 54 65 78 74 4d 65 73 68 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ateTextMesh();..................
24d00 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 return;..............}..........
24d20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 45 6e 64 20 41 75 74 6f 2d 73 69 7a 69 6e 67 20 43 ....#endregion.End.Auto-sizing.C
24d40 68 65 63 6b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 69 73 43 68 61 72 61 63 heck..................m_isCharac
24d60 74 65 72 57 72 61 70 70 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 0d terWrappingEnabled.=.false;.....
24d80 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 22 49 74 65 72 61 74 .............//Debug.Log("Iterat
24da0 69 6f 6e 20 43 6f 75 6e 74 3a 20 22 20 2b 20 6c 6f 6f 70 43 6f 75 6e 74 41 20 2b 20 22 2e 20 46 ion.Count:.".+.loopCountA.+."..F
24dc0 69 6e 61 6c 20 50 6f 69 6e 74 20 53 69 7a 65 3a 20 22 20 2b 20 6d 5f 66 6f 6e 74 53 69 7a 65 29 inal.Point.Size:.".+.m_fontSize)
24de0 3b 20 2f 2f 20 2b 20 22 20 20 42 3a 20 22 20 2b 20 6c 6f 6f 70 43 6f 75 6e 74 42 20 2b 20 22 20 ;.//.+."..B:.".+.loopCountB.+.".
24e00 20 43 3a 20 22 20 2b 20 6c 6f 6f 70 43 6f 75 6e 74 43 20 2b 20 22 20 20 44 3a 20 22 20 2b 20 6c .C:.".+.loopCountC.+."..D:.".+.l
24e20 6f 6f 70 43 6f 75 6e 74 44 29 3b 0d 0a 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f oopCountD);..................../
24e40 2f 20 49 66 20 74 68 65 72 65 20 61 72 65 20 6e 6f 20 76 69 73 69 62 6c 65 20 63 68 61 72 61 63 /.If.there.are.no.visible.charac
24e60 74 65 72 73 2e 2e 2e 20 6e 6f 20 6e 65 65 64 20 74 6f 20 63 6f 6e 74 69 6e 75 65 0d 0a 20 20 20 ters....no.need.to.continue.....
24e80 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 3d .........if.(m_characterCount.==
24ea0 20 30 29 20 2f 2f 20 26 26 20 6d 5f 76 69 73 69 62 6c 65 53 70 72 69 74 65 43 6f 75 6e 74 20 3d .0).//.&&.m_visibleSpriteCount.=
24ec0 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 =.0)..............{.............
24ee0 20 20 20 20 20 43 6c 65 61 72 4d 65 73 68 28 74 72 75 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 .....ClearMesh(true);...........
24f00 20 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 69 6e 64 69 63 61 74 69 6e 67 20 74 68 65 .........//.Event.indicating.the
24f20 20 74 65 78 74 20 68 61 73 20 62 65 65 6e 20 72 65 67 65 6e 65 72 61 74 65 64 2e 0d 0a 20 20 20 .text.has.been.regenerated......
24f40 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e 74 4d 61 6e 61 67 65 72 2e .............TMPro_EventManager.
24f60 4f 4e 5f 54 45 58 54 5f 43 48 41 4e 47 45 44 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 ON_TEXT_CHANGED(this);..........
24f80 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a ........return;..............}..
24fa0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 2a 2a 2a 20 50 48 41 53 45 20 49 49 20 ................//.***.PHASE.II.
24fc0 6f 66 20 54 65 78 74 20 47 65 6e 65 72 61 74 69 6f 6e 20 2a 2a 2a 0d 0a 20 20 20 20 20 20 20 20 of.Text.Generation.***..........
24fe0 20 20 20 20 69 6e 74 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 20 3d 20 6d 5f 6d 61 74 65 ....int.last_vert_index.=.m_mate
25000 72 69 61 6c 52 65 66 65 72 65 6e 63 65 73 5b 30 5d 2e 72 65 66 65 72 65 6e 63 65 43 6f 75 6e 74 rialReferences[0].referenceCount
25020 20 2a 20 28 21 6d 5f 69 73 56 6f 6c 75 6d 65 74 72 69 63 54 65 78 74 20 3f 20 34 20 3a 20 38 29 .*.(!m_isVolumetricText.?.4.:.8)
25040 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 72 74 69 61 6c 20 63 6c 65 61 ;................//.Partial.clea
25060 72 20 6f 66 20 74 68 65 20 76 65 72 74 69 63 65 73 20 61 72 72 61 79 20 74 6f 20 6d 61 72 6b 20 r.of.the.vertices.array.to.mark.
25080 75 6e 75 73 65 64 20 76 65 72 74 69 63 65 73 20 61 73 20 64 65 67 65 6e 65 72 61 74 65 2e 0d 0a unused.vertices.as.degenerate...
250a0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b ............m_textInfo.meshInfo[
250c0 30 5d 2e 43 6c 65 61 72 28 66 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 0].Clear(false);................
250e0 2f 2f 20 48 61 6e 64 6c 65 20 54 65 78 74 20 41 6c 69 67 6e 6d 65 6e 74 0d 0a 20 20 20 20 20 20 //.Handle.Text.Alignment........
25100 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 54 65 78 74 20 56 65 72 74 69 63 61 6c 20 41 6c 69 67 ......#region.Text.Vertical.Alig
25120 6e 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 61 6e 63 68 6f nment..............Vector3.ancho
25140 72 4f 66 66 73 65 74 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 rOffset.=.Vector3.zero;.........
25160 20 20 20 20 20 56 65 63 74 6f 72 33 5b 5d 20 63 6f 72 6e 65 72 73 20 3d 20 6d 5f 52 65 63 74 54 .....Vector3[].corners.=.m_RectT
25180 72 61 6e 73 66 6f 72 6d 43 6f 72 6e 65 72 73 3b 20 2f 2f 20 47 65 74 54 65 78 74 43 6f 6e 74 61 ransformCorners;.//.GetTextConta
251a0 69 6e 65 72 4c 6f 63 61 6c 43 6f 72 6e 65 72 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 inerLocalCorners();.............
251c0 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 56 65 72 74 69 63 61 6c 20 54 65 78 74 20 41 6c 69 67 6e ...//.Handle.Vertical.Text.Align
251e0 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 74 65 78 74 ment..............switch.(m_text
25200 41 6c 69 67 6e 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 Alignment)..............{.......
25220 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 6f 70 20 56 65 72 74 69 63 61 6c 6c 79 0d 0a 20 20 ...........//.Top.Vertically....
25240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 ..............case.TextAlignment
25260 4f 70 74 69 6f 6e 73 2e 54 6f 70 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 Options.Top:..................ca
25280 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 4c 65 66 74 3a se.TextAlignmentOptions.TopLeft:
252a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e ..................case.TextAlign
252c0 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 mentOptions.TopRight:...........
252e0 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 .......case.TextAlignmentOptions
25300 2e 54 6f 70 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .TopJustified:..................
25320 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 46 6c 75 case.TextAlignmentOptions.TopFlu
25340 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c sh:..................case.TextAl
25360 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 ignmentOptions.TopGeoAligned:...
25380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6f 76 65 72 66 6c 6f ...................if.(m_overflo
253a0 77 4d 6f 64 65 20 21 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 29 wMode.!=.TextOverflowModes.Page)
253c0 0d 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 61 6e 63 68 6f 72 ..........................anchor
253e0 4f 66 66 73 65 74 20 3d 20 63 6f 72 6e 65 72 73 5b 31 5d 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 Offset.=.corners[1].+.new.Vector
25400 33 28 30 20 2b 20 6d 61 72 67 69 6e 73 2e 78 2c 20 30 20 2d 20 6d 5f 6d 61 78 41 73 63 65 6e 64 3(0.+.margins.x,.0.-.m_maxAscend
25420 65 72 20 2d 20 6d 61 72 67 69 6e 73 2e 79 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 er.-.margins.y,.0);.............
25440 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........else...................
25460 20 20 20 20 20 20 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 20 3d 20 63 6f 72 6e 65 72 73 5b 31 5d .......anchorOffset.=.corners[1]
25480 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2b 20 6d 61 72 67 69 6e 73 2e 78 2c 20 30 20 .+.new.Vector3(0.+.margins.x,.0.
254a0 2d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 70 61 67 65 54 6f 44 69 73 70 -.m_textInfo.pageInfo[pageToDisp
254c0 6c 61 79 5d 2e 61 73 63 65 6e 64 65 72 20 2d 20 6d 61 72 67 69 6e 73 2e 79 2c 20 30 29 3b 0d 0a lay].ascender.-.margins.y,.0);..
254e0 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 0d 0a 0d 0a 20 20 ....................break;......
25500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 69 64 64 6c 65 20 56 65 72 74 69 63 61 6c ..............//.Middle.Vertical
25520 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 ly..................case.TextAli
25540 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4c 65 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 gnmentOptions.Left:.............
25560 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 52 .....case.TextAlignmentOptions.R
25580 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 ight:..................case.Text
255a0 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 65 6e 74 65 72 3a 0d 0a 20 20 20 20 20 20 AlignmentOptions.Center:........
255c0 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 ..........case.TextAlignmentOpti
255e0 6f 6e 73 2e 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ons.Justified:..................
25600 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 46 6c 75 73 68 3a case.TextAlignmentOptions.Flush:
25620 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e ..................case.TextAlign
25640 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 65 6e 74 65 72 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 mentOptions.CenterGeoAligned:...
25660 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6f 76 65 72 66 6c 6f ...................if.(m_overflo
25680 77 4d 6f 64 65 20 21 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 29 wMode.!=.TextOverflowModes.Page)
256a0 0d 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 61 6e 63 68 6f 72 ..........................anchor
256c0 4f 66 66 73 65 74 20 3d 20 28 63 6f 72 6e 65 72 73 5b 30 5d 20 2b 20 63 6f 72 6e 65 72 73 5b 31 Offset.=.(corners[0].+.corners[1
256e0 5d 29 20 2f 20 32 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2b 20 6d 61 72 67 69 6e 73 ])./.2.+.new.Vector3(0.+.margins
25700 2e 78 2c 20 30 20 2d 20 28 6d 5f 6d 61 78 41 73 63 65 6e 64 65 72 20 2b 20 6d 61 72 67 69 6e 73 .x,.0.-.(m_maxAscender.+.margins
25720 2e 79 20 2b 20 6d 61 78 56 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 20 2d 20 6d 61 72 67 69 .y.+.maxVisibleDescender.-.margi
25740 6e 73 2e 77 29 20 2f 20 32 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ns.w)./.2,.0);..................
25760 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....else........................
25780 20 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 20 3d 20 28 63 6f 72 6e 65 72 73 5b 30 5d 20 2b 20 63 ..anchorOffset.=.(corners[0].+.c
257a0 6f 72 6e 65 72 73 5b 31 5d 29 20 2f 20 32 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2b orners[1])./.2.+.new.Vector3(0.+
257c0 20 6d 61 72 67 69 6e 73 2e 78 2c 20 30 20 2d 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 .margins.x,.0.-.(m_textInfo.page
257e0 49 6e 66 6f 5b 70 61 67 65 54 6f 44 69 73 70 6c 61 79 5d 2e 61 73 63 65 6e 64 65 72 20 2b 20 6d Info[pageToDisplay].ascender.+.m
25800 61 72 67 69 6e 73 2e 79 20 2b 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e 66 6f 5b 70 argins.y.+.m_textInfo.pageInfo[p
25820 61 67 65 54 6f 44 69 73 70 6c 61 79 5d 2e 64 65 73 63 65 6e 64 65 72 20 2d 20 6d 61 72 67 69 6e ageToDisplay].descender.-.margin
25840 73 2e 77 29 20 2f 20 32 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.w)./.2,.0);...................
25860 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ...break;....................//.
25880 42 6f 74 74 6f 6d 20 56 65 72 74 69 63 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Bottom.Vertically...............
258a0 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 ...case.TextAlignmentOptions.Bot
258c0 74 6f 6d 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 tom:..................case.TextA
258e0 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f 6d 4c 65 66 74 3a 0d 0a 20 20 20 lignmentOptions.BottomLeft:.....
25900 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f .............case.TextAlignmentO
25920 70 74 69 6f 6e 73 2e 42 6f 74 74 6f 6d 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ptions.BottomRight:.............
25940 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 .....case.TextAlignmentOptions.B
25960 6f 74 74 6f 6d 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ottomJustified:.................
25980 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f .case.TextAlignmentOptions.Botto
259a0 6d 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 mFlush:..................case.Te
259c0 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f 6d 47 65 6f 41 6c 69 67 xtAlignmentOptions.BottomGeoAlig
259e0 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f ned:......................if.(m_
25a00 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 20 21 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 overflowMode.!=.TextOverflowMode
25a20 73 2e 50 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.Page).........................
25a40 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 20 3d 20 63 6f 72 6e 65 72 73 5b 30 5d 20 2b 20 6e 65 77 .anchorOffset.=.corners[0].+.new
25a60 20 56 65 63 74 6f 72 33 28 30 20 2b 20 6d 61 72 67 69 6e 73 2e 78 2c 20 30 20 2d 20 6d 61 78 56 .Vector3(0.+.margins.x,.0.-.maxV
25a80 69 73 69 62 6c 65 44 65 73 63 65 6e 64 65 72 20 2b 20 6d 61 72 67 69 6e 73 2e 77 2c 20 30 29 3b isibleDescender.+.margins.w,.0);
25aa0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 ......................else......
25ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 ....................anchorOffset
25ae0 20 3d 20 63 6f 72 6e 65 72 73 5b 30 5d 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2b 20 .=.corners[0].+.new.Vector3(0.+.
25b00 6d 61 72 67 69 6e 73 2e 78 2c 20 30 20 2d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 49 6e margins.x,.0.-.m_textInfo.pageIn
25b20 66 6f 5b 70 61 67 65 54 6f 44 69 73 70 6c 61 79 5d 2e 64 65 73 63 65 6e 64 65 72 20 2b 20 6d 61 fo[pageToDisplay].descender.+.ma
25b40 72 67 69 6e 73 2e 77 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rgins.w,.0);....................
25b60 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 42 ..break;....................//.B
25b80 61 73 65 6c 69 6e 65 20 56 65 72 74 69 63 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 aseline.Vertically..............
25ba0 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 ....case.TextAlignmentOptions.Ba
25bc0 73 65 6c 69 6e 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 seline:..................case.Te
25be0 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 4c 65 66 74 3a xtAlignmentOptions.BaselineLeft:
25c00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e ..................case.TextAlign
25c20 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 52 69 67 68 74 3a 0d 0a 20 20 20 20 mentOptions.BaselineRight:......
25c40 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 ............case.TextAlignmentOp
25c60 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 tions.BaselineJustified:........
25c80 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 ..........case.TextAlignmentOpti
25ca0 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ons.BaselineFlush:..............
25cc0 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 ....case.TextAlignmentOptions.Ba
25ce0 73 65 6c 69 6e 65 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 selineGeoAligned:...............
25d00 20 20 20 20 20 20 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 20 3d 20 28 63 6f 72 6e 65 72 73 5b 30 .......anchorOffset.=.(corners[0
25d20 5d 20 2b 20 63 6f 72 6e 65 72 73 5b 31 5d 29 20 2f 20 32 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 ].+.corners[1])./.2.+.new.Vector
25d40 33 28 30 20 2b 20 6d 61 72 67 69 6e 73 2e 78 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 3(0.+.margins.x,.0,.0);.........
25d60 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 .............break;.............
25d80 20 20 20 20 20 20 20 2f 2f 20 4d 69 64 6c 69 6e 65 20 56 65 72 74 69 63 61 6c 6c 79 20 0d 0a 20 .......//.Midline.Vertically....
25da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e ...............case.TextAlignmen
25dc0 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 4c 65 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 tOptions.MidlineLeft:...........
25de0 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 .......case.TextAlignmentOptions
25e00 2e 4d 69 64 6c 69 6e 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 .Midline:..................case.
25e20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 52 69 67 68 TextAlignmentOptions.MidlineRigh
25e40 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 t:..................case.TextAli
25e60 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 4a 75 73 74 69 66 69 65 64 3a 0d gnmentOptions.MidlineJustified:.
25e80 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d .................case.TextAlignm
25ea0 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 entOptions.MidlineFlush:........
25ec0 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 ..........case.TextAlignmentOpti
25ee0 6f 6e 73 2e 4d 69 64 6c 69 6e 65 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 ons.MidlineGeoAligned:..........
25f00 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 20 3d 20 28 63 6f 72 6e ............anchorOffset.=.(corn
25f20 65 72 73 5b 30 5d 20 2b 20 63 6f 72 6e 65 72 73 5b 31 5d 29 20 2f 20 32 20 2b 20 6e 65 77 20 56 ers[0].+.corners[1])./.2.+.new.V
25f40 65 63 74 6f 72 33 28 30 20 2b 20 6d 61 72 67 69 6e 73 2e 78 2c 20 30 20 2d 20 28 6d 5f 6d 65 73 ector3(0.+.margins.x,.0.-.(m_mes
25f60 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 20 2b 20 6d 61 72 67 69 6e 73 2e 79 20 2b 20 6d 5f 6d hExtents.max.y.+.margins.y.+.m_m
25f80 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 20 2d 20 6d 61 72 67 69 6e 73 2e 77 29 20 2f 20 eshExtents.min.y.-.margins.w)./.
25fa0 32 2c 20 30 29 3b 0d 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 2,.0);......................brea
25fc0 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 61 70 6c 69 6e 65 k;....................//.Capline
25fe0 20 56 65 72 74 69 63 61 6c 6c 79 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 .Vertically...................ca
26000 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 4c se.TextAlignmentOptions.CaplineL
26020 65 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 eft:..................case.TextA
26040 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 3a 0d 0a 20 20 20 20 20 20 lignmentOptions.Capline:........
26060 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 ..........case.TextAlignmentOpti
26080 6f 6e 73 2e 43 61 70 6c 69 6e 65 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ons.CaplineRight:...............
260a0 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 ...case.TextAlignmentOptions.Cap
260c0 6c 69 6e 65 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lineJustified:..................
260e0 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e case.TextAlignmentOptions.Caplin
26100 65 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 eFlush:..................case.Te
26120 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 47 65 6f 41 6c 69 xtAlignmentOptions.CaplineGeoAli
26140 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 63 68 6f gned:......................ancho
26160 72 4f 66 66 73 65 74 20 3d 20 28 63 6f 72 6e 65 72 73 5b 30 5d 20 2b 20 63 6f 72 6e 65 72 73 5b rOffset.=.(corners[0].+.corners[
26180 31 5d 29 20 2f 20 32 20 2b 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2b 20 6d 61 72 67 69 6e 1])./.2.+.new.Vector3(0.+.margin
261a0 73 2e 78 2c 20 30 20 2d 20 28 6d 5f 6d 61 78 43 61 70 48 65 69 67 68 74 20 2d 20 6d 61 72 67 69 s.x,.0.-.(m_maxCapHeight.-.margi
261c0 6e 73 2e 79 20 2d 20 6d 61 72 67 69 6e 73 2e 77 29 20 2f 20 32 2c 20 30 29 3b 0d 0a 20 20 20 20 ns.y.-.margins.w)./.2,.0);......
261e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 ................break;..........
26200 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d ....}..............#endregion...
26220 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e ...............//.Initialization
26240 20 66 6f 72 20 53 65 63 6f 6e 64 20 50 61 73 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 .for.Second.Pass..............Ve
26260 63 74 6f 72 33 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 3d 20 56 65 63 74 ctor3.justificationOffset.=.Vect
26280 6f 72 33 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 6f or3.zero;..............Vector3.o
262a0 66 66 73 65 74 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 ffset.=.Vector3.zero;...........
262c0 20 20 20 69 6e 74 20 76 65 72 74 5f 69 6e 64 65 78 5f 58 34 20 3d 20 30 3b 0d 0a 20 20 20 20 20 ...int.vert_index_X4.=.0;.......
262e0 20 20 20 20 20 20 20 69 6e 74 20 73 70 72 69 74 65 5f 69 6e 64 65 78 5f 58 34 20 3d 20 30 3b 0d .......int.sprite_index_X4.=.0;.
26300 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 6f 72 64 43 6f 75 6e 74 20 3d 20 30 ...............int.wordCount.=.0
26320 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6c 69 6e 65 43 6f 75 6e 74 20 3d 20 30 ;..............int.lineCount.=.0
26340 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6c 61 73 74 4c 69 6e 65 20 3d 20 30 3b ;..............int.lastLine.=.0;
26360 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 46 69 72 73 74 53 65 70 65 72 61 ..............bool.isFirstSepera
26380 74 6f 72 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c tor.=.false;................bool
263a0 20 69 73 53 74 61 72 74 4f 66 57 6f 72 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 .isStartOfWord.=.false;.........
263c0 20 20 20 20 20 69 6e 74 20 77 6f 72 64 46 69 72 73 74 43 68 61 72 20 3d 20 30 3b 0d 0a 20 20 20 .....int.wordFirstChar.=.0;.....
263e0 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 6f 72 64 4c 61 73 74 43 68 61 72 20 3d 20 30 3b 0d 0a .........int.wordLastChar.=.0;..
26400 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 63 6f 6e 64 20 50 61 73 73 20 3a 20 4c ..............//.Second.Pass.:.L
26420 69 6e 65 20 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 2c 20 55 56 20 4d 61 70 70 69 6e 67 2c 20 43 ine.Justification,.UV.Mapping,.C
26440 68 61 72 61 63 74 65 72 20 26 20 4c 69 6e 65 20 56 69 73 69 62 69 6c 69 74 79 20 26 20 6d 6f 72 haracter.&.Line.Visibility.&.mor
26460 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 6c 6f 73 73 79 53 63 61 6c 65 e...............float.lossyScale
26480 20 3d 20 6d 5f 70 72 65 76 69 6f 75 73 4c 6f 73 73 79 53 63 61 6c 65 59 20 3d 20 74 68 69 73 2e .=.m_previousLossyScaleY.=.this.
264a0 74 72 61 6e 73 66 6f 72 6d 2e 6c 6f 73 73 79 53 63 61 6c 65 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 transform.lossyScale.y;.........
264c0 20 20 20 20 20 20 20 43 6f 6c 6f 72 33 32 20 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 20 3d 20 .......Color32.underlineColor.=.
264e0 43 6f 6c 6f 72 2e 77 68 69 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6c 6f 72 33 Color.white;..............Color3
26500 32 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 20 3d 20 43 6f 6c 6f 72 2e 77 68 69 2.strikethroughColor.=.Color.whi
26520 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 43 6f 6c 6f 72 33 32 20 68 69 67 68 6c 69 67 te;..............Color32.highlig
26540 68 74 43 6f 6c 6f 72 20 3d 20 6e 65 77 20 43 6f 6c 6f 72 33 32 28 32 35 35 2c 20 32 35 35 2c 20 htColor.=.new.Color32(255,.255,.
26560 30 2c 20 36 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 78 53 63 61 6c 0,.64);..............float.xScal
26580 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 78 53 63 61 6c 65 e.=.0;..............float.xScale
265a0 4d 61 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 75 6e 64 65 Max.=.0;..............float.unde
265c0 72 6c 69 6e 65 53 74 61 72 74 53 63 61 6c 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 rlineStartScale.=.0;............
265e0 20 20 66 6c 6f 61 74 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 20 3d 20 30 3b 0d 0a ..float.underlineEndScale.=.0;..
26600 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 ............float.underlineMaxSc
26620 61 6c 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 75 6e 64 65 ale.=.0;..............float.unde
26640 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 76 65 46 rlineBaseLine.=.k_LargePositiveF
26660 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 6c 61 73 74 50 61 67 65 20 loat;..............int.lastPage.
26680 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 74 72 69 6b 65 =.0;................float.strike
266a0 74 68 72 6f 75 67 68 50 6f 69 6e 74 53 69 7a 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 throughPointSize.=.0;...........
266c0 20 20 20 66 6c 6f 61 74 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 20 3d 20 30 3b ...float.strikethroughScale.=.0;
266e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 74 72 69 6b 65 74 68 72 6f 75 67 ..............float.strikethroug
26700 68 42 61 73 65 6c 69 6e 65 20 3d 20 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d hBaseline.=.0;................TM
26720 50 5f 43 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 5d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 P_CharacterInfo[].characterInfos
26740 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 3b 0d 0a 20 20 .=.m_textInfo.characterInfo;....
26760 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 4c 69 6e 65 20 4a 75 ..........#region.Handle.Line.Ju
26780 73 74 69 66 69 63 61 74 69 6f 6e 20 26 20 55 56 20 4d 61 70 70 69 6e 67 20 26 20 43 68 61 72 61 stification.&.UV.Mapping.&.Chara
267a0 63 74 65 72 20 56 69 73 69 62 69 6c 69 74 79 20 26 20 4d 6f 72 65 0d 0a 20 20 20 20 20 20 20 20 cter.Visibility.&.More..........
267c0 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 63 68 61 72 61 63 ....for.(int.i.=.0;.i.<.m_charac
267e0 74 65 72 43 6f 75 6e 74 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 terCount;.i++)..............{...
26800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 46 6f 6e 74 41 73 73 65 74 20 63 75 72 ...............TMP_FontAsset.cur
26820 72 65 6e 74 46 6f 6e 74 41 73 73 65 74 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 rentFontAsset.=.characterInfos[i
26840 5d 2e 66 6f 6e 74 41 73 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ].fontAsset;....................
26860 63 68 61 72 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 20 63 68 61 72 61 63 74 65 char.currentCharacter.=.characte
26880 72 49 6e 66 6f 73 5b 69 5d 2e 63 68 61 72 61 63 74 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 rInfos[i].character;............
268a0 20 20 20 20 20 20 20 20 69 6e 74 20 63 75 72 72 65 6e 74 4c 69 6e 65 20 3d 20 63 68 61 72 61 63 ........int.currentLine.=.charac
268c0 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 6c 69 6e 65 4e 75 6d 62 65 72 3b 0d 0a 20 20 20 20 20 20 20 terInfos[i].lineNumber;.........
268e0 20 20 20 20 20 20 20 20 20 54 4d 50 5f 4c 69 6e 65 49 6e 66 6f 20 6c 69 6e 65 49 6e 66 6f 20 3d .........TMP_LineInfo.lineInfo.=
26900 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 .m_textInfo.lineInfo[currentLine
26920 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 69 6e 65 43 6f 75 6e 74 20 3d 20 ];..................lineCount.=.
26940 63 75 72 72 65 6e 74 4c 69 6e 65 20 2b 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 currentLine.+.1;................
26960 20 20 20 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 20 6c 69 6e 65 41 6c 69 ....TextAlignmentOptions.lineAli
26980 67 6e 6d 65 6e 74 20 3d 20 6c 69 6e 65 49 6e 66 6f 2e 61 6c 69 67 6e 6d 65 6e 74 3b 0d 0a 0d 0a gnment.=.lineInfo.alignment;....
269a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 72 6f 63 65 73 73 20 4c 69 6e 65 20 ................//.Process.Line.
269c0 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 Justification..................#
269e0 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 4c 69 6e 65 20 4a 75 73 74 69 66 69 63 61 74 69 6f 6e region.Handle.Line.Justification
26a00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6c 69 6e 65 41 6c ..................switch.(lineAl
26a20 69 67 6e 6d 65 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ignment)..................{.....
26a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d .................case.TextAlignm
26a60 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 4c 65 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 entOptions.TopLeft:.............
26a80 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f .........case.TextAlignmentOptio
26aa0 6e 73 2e 4c 65 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 ns.Left:......................ca
26ac0 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f 6d 4c 65 se.TextAlignmentOptions.BottomLe
26ae0 66 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 ft:......................case.Te
26b00 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 4c 65 66 74 3a xtAlignmentOptions.BaselineLeft:
26b20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 ......................case.TextA
26b40 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 4c 65 66 74 3a 0d 0a 20 20 lignmentOptions.MidlineLeft:....
26b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e ..................case.TextAlign
26b80 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 4c 65 66 74 3a 0d 0a 20 20 20 20 20 20 mentOptions.CaplineLeft:........
26ba0 20 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 21 6d 5f 69 73 52 ......................if.(!m_isR
26bc0 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ightToLeft).....................
26be0 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 .............justificationOffset
26c00 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 .=.new.Vector3(0.+.lineInfo.marg
26c20 69 6e 4c 65 66 74 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 inLeft,.0,.0);..................
26c40 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............else................
26c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f ..................justificationO
26c80 66 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 20 2d 20 6c 69 6e 65 49 6e 66 6f ffset.=.new.Vector3(0.-.lineInfo
26ca0 2e 6d 61 78 41 64 76 61 6e 63 65 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .maxAdvance,.0,.0);.............
26cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 .................break;.........
26ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e ...............case.TextAlignmen
26d00 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tOptions.Top:...................
26d20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 65 6e ...case.TextAlignmentOptions.Cen
26d40 74 65 72 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 ter:......................case.T
26d60 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f 6d 3a 0d 0a 20 20 20 extAlignmentOptions.Bottom:.....
26d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d .................case.TextAlignm
26da0 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 entOptions.Baseline:............
26dc0 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 ..........case.TextAlignmentOpti
26de0 6f 6e 73 2e 4d 69 64 6c 69 6e 65 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ons.Midline:....................
26e00 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c ..case.TextAlignmentOptions.Capl
26e20 69 6e 65 3a 0d 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 6a 75 ine:..........................ju
26e40 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 stificationOffset.=.new.Vector3(
26e60 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 69 6e 4c 65 66 74 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 77 lineInfo.marginLeft.+.lineInfo.w
26e80 69 64 74 68 20 2f 20 32 20 2d 20 6c 69 6e 65 49 6e 66 6f 2e 6d 61 78 41 64 76 61 6e 63 65 20 2f idth./.2.-.lineInfo.maxAdvance./
26ea0 20 32 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .2,.0,.0);......................
26ec0 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....break;......................
26ee0 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 47 ..case.TextAlignmentOptions.TopG
26f00 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eoAligned:......................
26f20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 65 6e 74 65 72 case.TextAlignmentOptions.Center
26f40 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 GeoAligned:.....................
26f60 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f .case.TextAlignmentOptions.Botto
26f80 6d 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 mGeoAligned:....................
26fa0 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 ..case.TextAlignmentOptions.Base
26fc0 6c 69 6e 65 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lineGeoAligned:.................
26fe0 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d .....case.TextAlignmentOptions.M
27000 69 64 6c 69 6e 65 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 idlineGeoAligned:...............
27020 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 .......case.TextAlignmentOptions
27040 2e 43 61 70 6c 69 6e 65 47 65 6f 41 6c 69 67 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .CaplineGeoAligned:.............
27060 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 .............justificationOffset
27080 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 69 6e 4c 65 .=.new.Vector3(lineInfo.marginLe
270a0 66 74 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 77 69 64 74 68 20 2f 20 32 20 2d 20 28 6c 69 6e 65 49 ft.+.lineInfo.width./.2.-.(lineI
270c0 6e 66 6f 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 20 2b 20 6c 69 6e 65 49 6e 66 6f nfo.lineExtents.min.x.+.lineInfo
270e0 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 29 20 2f 20 32 2c 20 30 2c 20 30 29 3b 0d .lineExtents.max.x)./.2,.0,.0);.
27100 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 62 72 65 61 6b 3b 0d .........................break;.
27120 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 .......................case.Text
27140 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 52 69 67 68 74 3a 0d 0a 20 20 20 20 AlignmentOptions.TopRight:......
27160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 ................case.TextAlignme
27180 6e 74 4f 70 74 69 6f 6e 73 2e 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntOptions.Right:................
271a0 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e ......case.TextAlignmentOptions.
271c0 42 6f 74 74 6f 6d 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 BottomRight:....................
271e0 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 ..case.TextAlignmentOptions.Base
27200 6c 69 6e 65 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lineRight:......................
27220 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e case.TextAlignmentOptions.Midlin
27240 65 52 69 67 68 74 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 eRight:......................cas
27260 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 52 69 e.TextAlignmentOptions.CaplineRi
27280 67 68 74 3a 0d 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 69 66 ght:..........................if
272a0 20 28 21 6d 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .(!m_isRightToLeft).............
272c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 .................justificationOf
272e0 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 fset.=.new.Vector3(lineInfo.marg
27300 69 6e 4c 65 66 74 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 77 69 64 74 68 20 2d 20 6c 69 6e 65 49 6e inLeft.+.lineInfo.width.-.lineIn
27320 66 6f 2e 6d 61 78 41 64 76 61 6e 63 65 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 fo.maxAdvance,.0,.0);...........
27340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ...............else.............
27360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 .................justificationOf
27380 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 fset.=.new.Vector3(lineInfo.marg
273a0 69 6e 4c 65 66 74 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 77 69 64 74 68 2c 20 30 2c 20 30 29 3b 0d inLeft.+.lineInfo.width,.0,.0);.
273c0 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 62 72 65 61 6b 3b 0d .........................break;.
273e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 .......................case.Text
27400 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 4a 75 73 74 69 66 69 65 64 3a 0d 0a AlignmentOptions.TopJustified:..
27420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 ....................case.TextAli
27440 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 gnmentOptions.Justified:........
27460 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 ..............case.TextAlignment
27480 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f 6d 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 20 20 Options.BottomJustified:........
274a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 ..............case.TextAlignment
274c0 4f 70 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 20 Options.BaselineJustified:......
274e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 ................case.TextAlignme
27500 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 20 ntOptions.MidlineJustified:.....
27520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d .................case.TextAlignm
27540 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 4a 75 73 74 69 66 69 65 64 3a 0d 0a 20 20 entOptions.CaplineJustified:....
27560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e ..................case.TextAlign
27580 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 54 6f 70 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 mentOptions.TopFlush:...........
275a0 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 ...........case.TextAlignmentOpt
275c0 69 6f 6e 73 2e 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ions.Flush:.....................
275e0 20 63 61 73 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 6f 74 74 6f .case.TextAlignmentOptions.Botto
27600 6d 46 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 mFlush:......................cas
27620 65 20 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 42 61 73 65 6c 69 6e 65 46 e.TextAlignmentOptions.BaselineF
27640 6c 75 73 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 lush:......................case.
27660 54 65 78 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4d 69 64 6c 69 6e 65 46 6c 75 73 TextAlignmentOptions.MidlineFlus
27680 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 h:......................case.Tex
276a0 74 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 43 61 70 6c 69 6e 65 46 6c 75 73 68 3a 0d tAlignmentOptions.CaplineFlush:.
276c0 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 2f 2f 20 53 6b 69 70 .........................//.Skip
276e0 20 5a 65 72 6f 20 57 69 64 74 68 20 43 68 61 72 61 63 74 65 72 73 0d 0a 20 20 20 20 20 20 20 20 .Zero.Width.Characters..........
27700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 43 68 61 72 61 ................if.(currentChara
27720 63 74 65 72 20 3d 3d 20 30 78 41 44 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 cter.==.0xAD.||.currentCharacter
27740 20 3d 3d 20 30 78 32 30 30 42 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d .==.0x200B.||.currentCharacter.=
27760 3d 20 30 78 32 30 36 30 29 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 =.0x2060).break;................
27780 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 20 6c 61 73 74 43 68 61 72 4f 66 43 75 72 72 65 ............char.lastCharOfCurre
277a0 6e 74 4c 69 6e 65 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 6c 69 6e 65 49 6e 66 6f ntLine.=.characterInfos[lineInfo
277c0 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 63 68 61 72 61 63 74 65 72 3b 0d .lastCharacterIndex].character;.
277e0 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 62 6f 6f 6c 20 69 73 .........................bool.is
27800 46 6c 75 73 68 20 3d 20 28 28 5f 48 6f 72 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 Flush.=.((_HorizontalAlignmentOp
27820 74 69 6f 6e 73 29 6c 69 6e 65 41 6c 69 67 6e 6d 65 6e 74 20 26 20 5f 48 6f 72 69 7a 6f 6e 74 61 tions)lineAlignment.&._Horizonta
27840 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 46 6c 75 73 68 29 20 3d 3d 20 5f 48 6f 72 lAlignmentOptions.Flush).==._Hor
27860 69 7a 6f 6e 74 61 6c 41 6c 69 67 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 46 6c 75 73 68 3b 0d 0a izontalAlignmentOptions.Flush;..
27880 0d 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 2f 2f 20 49 6e 20 ..........................//.In.
278a0 4a 75 73 74 69 66 69 65 64 20 6d 6f 64 65 2c 20 61 6c 6c 20 6c 69 6e 65 73 20 61 72 65 20 6a 75 Justified.mode,.all.lines.are.ju
278c0 73 74 69 66 69 65 64 20 65 78 63 65 70 74 20 74 68 65 20 6c 61 73 74 20 6f 6e 65 2e 0d 0a 20 20 stified.except.the.last.one.....
278e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 20 46 6c 75 73 ......................//.In.Flus
27900 68 20 6d 6f 64 65 2c 20 61 6c 6c 20 6c 69 6e 65 73 20 61 72 65 20 6a 75 73 74 69 66 69 65 64 2e h.mode,.all.lines.are.justified.
27920 0d 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 69 66 20 28 63 68 ..........................if.(ch
27940 61 72 2e 49 73 43 6f 6e 74 72 6f 6c 28 6c 61 73 74 43 68 61 72 4f 66 43 75 72 72 65 6e 74 4c 69 ar.IsControl(lastCharOfCurrentLi
27960 6e 65 29 20 3d 3d 20 66 61 6c 73 65 20 26 26 20 63 75 72 72 65 6e 74 4c 69 6e 65 20 3c 20 6d 5f ne).==.false.&&.currentLine.<.m_
27980 6c 69 6e 65 4e 75 6d 62 65 72 20 7c 7c 20 69 73 46 6c 75 73 68 20 7c 7c 20 6c 69 6e 65 49 6e 66 lineNumber.||.isFlush.||.lineInf
279a0 6f 2e 6d 61 78 41 64 76 61 6e 63 65 20 3e 20 6c 69 6e 65 49 6e 66 6f 2e 77 69 64 74 68 29 0d 0a o.maxAdvance.>.lineInfo.width)..
279c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ........................{.......
279e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 72 73 74 20 .......................//.First.
27a00 63 68 61 72 61 63 74 65 72 20 6f 66 20 65 61 63 68 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 character.of.each.line..........
27a20 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 63 75 72 72 65 6e 74 .....................if.(current
27a40 4c 69 6e 65 20 21 3d 20 6c 61 73 74 4c 69 6e 65 20 7c 7c 20 69 20 3d 3d 20 30 20 7c 7c 20 69 20 Line.!=.lastLine.||.i.==.0.||.i.
27a60 3d 3d 20 6d 5f 66 69 72 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 29 0d 0a 20 20 20 ==.m_firstVisibleCharacter).....
27a80 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 7b 0d 0a 20 20 20 20 .........................{......
27aa0 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 20 69 66 20 28 ............................if.(
27ac0 21 6d 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 !m_isRightToLeft)...............
27ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 .......................justifica
27b00 74 69 6f 6e 4f 66 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6c 69 6e 65 49 6e 66 tionOffset.=.new.Vector3(lineInf
27b20 6f 2e 6d 61 72 67 69 6e 4c 65 66 74 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 o.marginLeft,.0,.0);............
27b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 ......................else......
27b60 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 20 20 20 20 20 ................................
27b80 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 justificationOffset.=.new.Vector
27ba0 33 28 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 69 6e 4c 65 66 74 20 2b 20 6c 69 6e 65 49 6e 66 6f 3(lineInfo.marginLeft.+.lineInfo
27bc0 2e 77 69 64 74 68 2c 20 30 2c 20 30 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .width,.0,.0);..................
27be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 53 65 70 ..................if.(char.IsSep
27c00 61 72 61 74 6f 72 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 29 0d 0a 20 20 20 20 20 arator(currentCharacter)).......
27c20 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 20 20 20 20 69 ...............................i
27c40 73 46 69 72 73 74 53 65 70 65 72 61 74 6f 72 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 sFirstSeperator.=.true;.........
27c60 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 65 6c 73 65 0d 0a 20 .........................else...
27c80 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 20 20 20 20 20 ................................
27ca0 20 20 20 69 73 46 69 72 73 74 53 65 70 65 72 61 74 6f 72 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 ...isFirstSeperator.=.false;....
27cc0 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 7d 0d 0a 20 20 20 ..........................}.....
27ce0 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 65 6c 73 65 0d 0a 20 .........................else...
27d00 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 7b 0d 0a 20 20 ...........................{....
27d20 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 20 20 20 66 6c ..............................fl
27d40 6f 61 74 20 67 61 70 20 3d 20 21 6d 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 20 3f 20 6c 69 6e oat.gap.=.!m_isRightToLeft.?.lin
27d60 65 49 6e 66 6f 2e 77 69 64 74 68 20 2d 20 6c 69 6e 65 49 6e 66 6f 2e 6d 61 78 41 64 76 61 6e 63 eInfo.width.-.lineInfo.maxAdvanc
27d80 65 20 3a 20 6c 69 6e 65 49 6e 66 6f 2e 77 69 64 74 68 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 6d 61 e.:.lineInfo.width.+.lineInfo.ma
27da0 78 41 64 76 61 6e 63 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 xAdvance;.......................
27dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 76 69 73 69 62 6c 65 43 6f 75 6e 74 20 3d 20 .............int.visibleCount.=.
27de0 6c 69 6e 65 49 6e 66 6f 2e 76 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d lineInfo.visibleCharacterCount.-
27e00 20 31 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 63 6f 6e 74 72 6f 6c 43 68 61 72 61 63 74 65 72 43 6f .1.+.lineInfo.controlCharacterCo
27e20 75 6e 74 3b 0d 0a 0d 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 unt;............................
27e40 20 20 20 20 20 20 20 20 2f 2f 20 47 65 74 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 70 61 ........//.Get.the.number.of.spa
27e60 63 65 73 20 66 6f 72 20 65 61 63 68 20 6c 69 6e 65 20 69 67 6e 6f 72 69 6e 67 20 74 68 65 20 6c ces.for.each.line.ignoring.the.l
27e80 61 73 74 20 63 68 61 72 61 63 74 65 72 20 69 66 20 69 74 20 69 73 20 6e 6f 74 20 76 69 73 69 62 ast.character.if.it.is.not.visib
27ea0 6c 65 20 28 69 65 2e 20 61 20 73 70 61 63 65 20 6f 72 20 6c 69 6e 65 66 65 65 64 29 2e 0d 0a 20 le.(ie..a.space.or.linefeed)....
27ec0 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 20 20 20 20 69 ...............................i
27ee0 6e 74 20 73 70 61 63 65 73 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 6c 69 6e 65 nt.spaces.=.(characterInfos[line
27f00 49 6e 66 6f 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 69 73 56 69 73 69 62 Info.lastCharacterIndex].isVisib
27f20 6c 65 20 3f 20 6c 69 6e 65 49 6e 66 6f 2e 73 70 61 63 65 43 6f 75 6e 74 20 3a 20 6c 69 6e 65 49 le.?.lineInfo.spaceCount.:.lineI
27f40 6e 66 6f 2e 73 70 61 63 65 43 6f 75 6e 74 20 2d 20 31 29 20 2d 20 6c 69 6e 65 49 6e 66 6f 2e 63 nfo.spaceCount.-.1).-.lineInfo.c
27f60 6f 6e 74 72 6f 6c 43 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ontrolCharacterCount;...........
27f80 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 69 66 20 28 69 73 46 .........................if.(isF
27fa0 69 72 73 74 53 65 70 65 72 61 74 6f 72 29 20 7b 20 73 70 61 63 65 73 20 2d 3d 20 31 3b 20 76 69 irstSeperator).{.spaces.-=.1;.vi
27fc0 73 69 62 6c 65 43 6f 75 6e 74 20 2b 3d 20 31 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 sibleCount.+=.1;.}..............
27fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 72 61 74 69 ......................float.rati
28000 6f 20 3d 20 73 70 61 63 65 73 20 3e 20 30 20 3f 20 6d 5f 77 6f 72 64 57 72 61 70 70 69 6e 67 52 o.=.spaces.>.0.?.m_wordWrappingR
28020 61 74 69 6f 73 20 3a 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 atios.:.1;......................
28040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 70 61 63 65 73 20 3c 20 31 29 20 73 70 ..............if.(spaces.<.1).sp
28060 61 63 65 73 20 3d 20 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aces.=.1;.......................
28080 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 .............if.(currentCharacte
280a0 72 20 21 3d 20 30 78 41 30 20 26 26 20 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d r.!=.0xA0.&&.(currentCharacter.=
280c0 3d 20 39 20 7c 7c 20 63 68 61 72 2e 49 73 53 65 70 61 72 61 74 6f 72 28 28 63 68 61 72 29 63 75 =.9.||.char.IsSeparator((char)cu
280e0 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 rrentCharacter)))...............
28100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................{............
28120 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 69 66 20 28 21 6d ..........................if.(!m
28140 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _isRightToLeft).................
28160 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 6a 75 73 74 69 66 69 .........................justifi
28180 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 2b 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 67 61 70 20 cationOffset.+=.new.Vector3(gap.
281a0 2a 20 28 31 20 2d 20 72 61 74 69 6f 29 20 2f 20 73 70 61 63 65 73 2c 20 30 2c 20 30 29 3b 0d 0a *.(1.-.ratio)./.spaces,.0,.0);..
281c0 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 20 20 20 20 20 ................................
281e0 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....else........................
28200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f ..................justificationO
28220 66 66 73 65 74 20 2d 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 67 61 70 20 2a 20 28 31 20 2d 20 ffset.-=.new.Vector3(gap.*.(1.-.
28240 72 61 74 69 6f 29 20 2f 20 73 70 61 63 65 73 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 ratio)./.spaces,.0,.0);.........
28260 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 7d 0d 0a 20 20 20 20 .........................}......
28280 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 20 65 6c 73 65 ............................else
282a0 0d 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 20 20 20 20 ................................
282c0 20 20 7b 0d 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 20 ..{.............................
282e0 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a .........if.(!m_isRightToLeft)..
28300 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 20 20 20 20 20 ................................
28320 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 2b 3d 20 6e ........justificationOffset.+=.n
28340 65 77 20 56 65 63 74 6f 72 33 28 67 61 70 20 2a 20 72 61 74 69 6f 20 2f 20 76 69 73 69 62 6c 65 ew.Vector3(gap.*.ratio./.visible
28360 43 6f 75 6e 74 2c 20 30 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Count,.0,.0);...................
28380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 ...................else.........
283a0 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 20 20 20 20 20 ................................
283c0 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 2d 3d 20 6e 65 77 20 56 65 63 74 .justificationOffset.-=.new.Vect
283e0 6f 72 33 28 67 61 70 20 2a 20 72 61 74 69 6f 20 2f 20 76 69 73 69 62 6c 65 43 6f 75 6e 74 2c 20 or3(gap.*.ratio./.visibleCount,.
28400 30 2c 20 30 29 3b 0d 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 0,.0);..........................
28420 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........}.......................
28440 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......}........................
28460 20 20 7d 0d 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 65 6c 73 ..}..........................els
28480 65 0d 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 7b 0d 0a 20 20 e..........................{....
284a0 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 69 66 20 28 21 6d ..........................if.(!m
284c0 5f 69 73 52 69 67 68 74 54 6f 4c 65 66 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _isRightToLeft).................
284e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 .................justificationOf
28500 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6c 69 6e 65 49 6e 66 6f 2e 6d 61 72 67 fset.=.new.Vector3(lineInfo.marg
28520 69 6e 4c 65 66 74 2c 20 30 2c 20 30 29 3b 20 2f 2f 20 4b 65 65 70 20 6c 61 73 74 20 6c 69 6e 65 inLeft,.0,.0);.//.Keep.last.line
28540 20 6c 65 66 74 20 6a 75 73 74 69 66 69 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .left.justified.................
28560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..............else..............
28580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 75 73 74 69 66 69 63 61 74 69 6f ....................justificatio
285a0 6e 4f 66 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6c 69 6e 65 49 6e 66 6f 2e 6d nOffset.=.new.Vector3(lineInfo.m
285c0 61 72 67 69 6e 4c 65 66 74 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 77 69 64 74 68 2c 20 30 2c 20 30 arginLeft.+.lineInfo.width,.0,.0
285e0 29 3b 20 2f 2f 20 4b 65 65 70 20 6c 61 73 74 20 6c 69 6e 65 20 72 69 67 68 74 20 6a 75 73 74 69 );.//.Keep.last.line.right.justi
28600 66 69 65 64 2e 0d 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 7d fied...........................}
28620 0d 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 2f 2f 44 65 62 75 ..........................//Debu
28640 67 2e 4c 6f 67 28 22 43 68 61 72 20 5b 22 20 2b 20 28 63 68 61 72 29 63 68 61 72 43 6f 64 65 20 g.Log("Char.[".+.(char)charCode.
28660 2b 20 22 5d 20 43 6f 64 65 3a 22 20 2b 20 63 68 61 72 43 6f 64 65 20 2b 20 22 20 20 4c 69 6e 65 +."].Code:".+.charCode.+."..Line
28680 20 23 20 22 20 2b 20 63 75 72 72 65 6e 74 4c 69 6e 65 20 2b 20 22 20 20 4f 66 66 73 65 74 3a 22 .#.".+.currentLine.+."..Offset:"
286a0 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 20 2b 20 22 20 20 23 20 53 70 .+.justificationOffset.+."..#.Sp
286c0 61 63 65 73 3a 22 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 73 70 61 63 65 43 6f 75 6e 74 20 2b 20 22 aces:".+.lineInfo.spaceCount.+."
286e0 20 20 23 20 43 68 61 72 61 63 74 65 72 73 3a 22 20 2b 20 6c 69 6e 65 49 6e 66 6f 2e 63 68 61 72 ..#.Characters:".+.lineInfo.char
28700 61 63 74 65 72 43 6f 75 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 acterCount);....................
28720 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ......break;..................}.
28740 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 20 45 6e 64 20 .................#endregion.End.
28760 54 65 78 74 20 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 Text.Justification..............
28780 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 61 6e 63 68 6f 72 4f 66 66 73 65 74 20 2b 20 6a 75 ......offset.=.anchorOffset.+.ju
287a0 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 stificationOffset;..............
287c0 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 55 56 32 20 6d 61 70 70 69 6e 67 20 6f 70 74 69 ......//.Handle.UV2.mapping.opti
287e0 6f 6e 73 20 61 6e 64 20 70 61 63 6b 69 6e 67 20 6f 66 20 73 63 61 6c 65 20 69 6e 66 6f 72 6d 61 ons.and.packing.of.scale.informa
28800 74 69 6f 6e 20 69 6e 74 6f 20 55 56 32 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tion.into.UV2...................
28820 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 69 6e 67 20 6f 66 20 55 56 32 20 6d 61 70 70 69 6e 67 20 #region.Handling.of.UV2.mapping.
28840 26 20 53 63 61 6c 65 20 70 61 63 6b 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 &.Scale.packing.................
28860 20 62 6f 6f 6c 20 69 73 43 68 61 72 61 63 74 65 72 56 69 73 69 62 6c 65 20 3d 20 63 68 61 72 61 .bool.isCharacterVisible.=.chara
28880 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 69 73 56 69 73 69 62 6c 65 3b 0d 0a 20 20 20 20 20 20 20 cterInfos[i].isVisible;.........
288a0 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 43 68 61 72 61 63 74 65 72 56 69 73 69 62 6c 65 29 .........if.(isCharacterVisible)
288c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
288e0 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 20 65 6c 65 .........TMP_TextElementType.ele
28900 6d 65 6e 74 54 79 70 65 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 65 6c 65 mentType.=.characterInfos[i].ele
28920 6d 65 6e 74 54 79 70 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 mentType;......................s
28940 77 69 74 63 68 20 28 65 6c 65 6d 65 6e 74 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 witch.(elementType).............
28960 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
28980 20 20 20 20 2f 2f 20 43 48 41 52 41 43 54 45 52 53 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ....//.CHARACTERS...............
289a0 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 ...........case.TMP_TextElementT
289c0 79 70 65 2e 43 68 61 72 61 63 74 65 72 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ype.Character:..................
289e0 20 20 20 20 20 20 20 20 20 20 20 20 45 78 74 65 6e 74 73 20 6c 69 6e 65 45 78 74 65 6e 74 73 20 ............Extents.lineExtents.
28a00 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 69 6e 65 45 78 74 65 6e 74 73 3b 0d 0a 20 20 20 20 20 20 20 =.lineInfo.lineExtents;.........
28a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 75 76 4f 66 66 .....................float.uvOff
28a40 73 65 74 20 3d 20 28 6d 5f 75 76 4c 69 6e 65 4f 66 66 73 65 74 20 2a 20 63 75 72 72 65 6e 74 4c set.=.(m_uvLineOffset.*.currentL
28a60 69 6e 65 29 20 25 20 31 3b 20 2f 2f 20 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 78 3b 0d 0a 0d 0a ine).%.1;.//.+.m_uvOffset.x;....
28a80 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 20 2f 2f 20 53 ............................//.S
28aa0 65 74 75 70 20 55 56 32 20 62 61 73 65 64 20 6f 6e 20 43 68 61 72 61 63 74 65 72 20 4d 61 70 70 etup.UV2.based.on.Character.Mapp
28ac0 69 6e 67 20 4f 70 74 69 6f 6e 73 20 53 65 6c 65 63 74 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 ing.Options.Selected............
28ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 ..................#region.Handle
28b00 20 55 56 20 4d 61 70 70 69 6e 67 20 4f 70 74 69 6f 6e 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .UV.Mapping.Options.............
28b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 68 6f 72 69 7a .................switch.(m_horiz
28b40 6f 6e 74 61 6c 4d 61 70 70 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ontalMapping)...................
28b60 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
28b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 69 6e ..............case.TextureMappin
28ba0 67 4f 70 74 69 6f 6e 73 2e 43 68 61 72 61 63 74 65 72 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 gOptions.Character:.............
28bc0 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 63 68 61 72 61 63 74 .........................charact
28be0 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 78 20 3d 20 30 3b 20 erInfos[i].vertex_BL.uv2.x.=.0;.
28c00 2f 2f 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 //+.m_uvOffset.x;...............
28c20 20 20 20 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 .......................character
28c40 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 78 20 3d 20 30 3b 20 2f 2f Infos[i].vertex_TL.uv2.x.=.0;.//
28c60 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +.m_uvOffset.x;.................
28c80 20 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 49 6e .....................characterIn
28ca0 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 78 20 3d 20 31 3b 20 2f 2f 2b 20 fos[i].vertex_TR.uv2.x.=.1;.//+.
28cc0 6d 5f 75 76 4f 66 66 73 65 74 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 m_uvOffset.x;...................
28ce0 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 49 6e 66 6f ...................characterInfo
28d00 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 78 20 3d 20 31 3b 20 2f 2f 2b 20 6d 5f s[i].vertex_BR.uv2.x.=.1;.//+.m_
28d20 75 76 4f 66 66 73 65 74 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 uvOffset.x;.....................
28d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 .................break;.........
28d60 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 63 61 73 65 20 ...........................case.
28d80 54 65 78 74 75 72 65 4d 61 70 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 4c 69 6e 65 3a 0d 0a 20 20 20 TextureMappingOptions.Line:.....
28da0 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 20 20 20 20 20 ................................
28dc0 20 69 66 20 28 6d 5f 74 65 78 74 41 6c 69 67 6e 6d 65 6e 74 20 21 3d 20 54 65 78 74 41 6c 69 67 .if.(m_textAlignment.!=.TextAlig
28de0 6e 6d 65 6e 74 4f 70 74 69 6f 6e 73 2e 4a 75 73 74 69 66 69 65 64 29 0d 0a 20 20 20 20 20 20 20 nmentOptions.Justified).........
28e00 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 20 20 7b 0d 0a .............................{..
28e20 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 20 20 20 20 20 ................................
28e40 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 ........characterInfos[i].vertex
28e60 5f 42 4c 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 _BL.uv2.x.=.(characterInfos[i].v
28e80 65 72 74 65 78 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2d 20 6c 69 6e 65 45 78 74 65 6e 74 ertex_BL.position.x.-.lineExtent
28ea0 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 s.min.x)./.(lineExtents.max.x.-.
28ec0 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a lineExtents.min.x).+.uvOffset;..
28ee0 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 20 20 20 20 20 ................................
28f00 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 ........characterInfos[i].vertex
28f20 5f 54 4c 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 _TL.uv2.x.=.(characterInfos[i].v
28f40 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2d 20 6c 69 6e 65 45 78 74 65 6e 74 ertex_TL.position.x.-.lineExtent
28f60 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 s.min.x)./.(lineExtents.max.x.-.
28f80 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a lineExtents.min.x).+.uvOffset;..
28fa0 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 20 20 20 20 20 ................................
28fc0 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 ........characterInfos[i].vertex
28fe0 5f 54 52 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 _TR.uv2.x.=.(characterInfos[i].v
29000 65 72 74 65 78 5f 54 52 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2d 20 6c 69 6e 65 45 78 74 65 6e 74 ertex_TR.position.x.-.lineExtent
29020 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 s.min.x)./.(lineExtents.max.x.-.
29040 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a lineExtents.min.x).+.uvOffset;..
29060 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 20 20 20 20 20 ................................
29080 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 ........characterInfos[i].vertex
290a0 5f 42 52 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 _BR.uv2.x.=.(characterInfos[i].v
290c0 65 72 74 65 78 5f 42 52 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2d 20 6c 69 6e 65 45 78 74 65 6e 74 ertex_BR.position.x.-.lineExtent
290e0 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 s.min.x)./.(lineExtents.max.x.-.
29100 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a lineExtents.min.x).+.uvOffset;..
29120 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 20 20 20 20 20 ................................
29140 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........break;..................
29160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 ....................}...........
29180 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 65 6c 73 65 20 ...........................else.
291a0 2f 2f 20 53 70 65 63 69 61 6c 20 43 61 73 65 20 69 66 20 4a 75 73 74 69 66 69 65 64 20 69 73 20 //.Special.Case.if.Justified.is.
291c0 75 73 65 64 20 69 6e 20 4c 69 6e 65 20 4d 6f 64 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 used.in.Line.Mode...............
291e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ........................{.......
29200 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 20 20 20 20 20 ................................
29220 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 ...characterInfos[i].vertex_BL.u
29240 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 v2.x.=.(characterInfos[i].vertex
29260 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 _BL.position.x.+.justificationOf
29280 66 73 65 74 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2f 20 fset.x.-.m_meshExtents.min.x)./.
292a0 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 (m_meshExtents.max.x.-.m_meshExt
292c0 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 ents.min.x).+.uvOffset;.........
292e0 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 20 20 20 20 20 ................................
29300 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 .characterInfos[i].vertex_TL.uv2
29320 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 .x.=.(characterInfos[i].vertex_T
29340 4c 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 L.position.x.+.justificationOffs
29360 65 74 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6d et.x.-.m_meshExtents.min.x)./.(m
29380 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e _meshExtents.max.x.-.m_meshExten
293a0 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 ts.min.x).+.uvOffset;...........
293c0 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 20 20 20 20 63 ...............................c
293e0 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 78 haracterInfos[i].vertex_TR.uv2.x
29400 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e .=.(characterInfos[i].vertex_TR.
29420 70 6f 73 69 74 69 6f 6e 2e 78 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 position.x.+.justificationOffset
29440 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6d 5f 6d .x.-.m_meshExtents.min.x)./.(m_m
29460 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 eshExtents.max.x.-.m_meshExtents
29480 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .min.x).+.uvOffset;.............
294a0 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 20 20 63 68 61 .............................cha
294c0 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 78 20 3d racterInfos[i].vertex_BR.uv2.x.=
294e0 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 70 6f .(characterInfos[i].vertex_BR.po
29500 73 69 74 69 6f 6e 2e 78 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 2e 78 sition.x.+.justificationOffset.x
29520 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6d 5f 6d 65 73 .-.m_meshExtents.min.x)./.(m_mes
29540 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d hExtents.max.x.-.m_meshExtents.m
29560 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 in.x).+.uvOffset;...............
29580 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 62 72 65 61 6b ...........................break
295a0 3b 0d 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 20 20 20 ;...............................
295c0 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......}........................
295e0 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 69 6e 67 4f ............case.TextureMappingO
29600 70 74 69 6f 6e 73 2e 50 61 72 61 67 72 61 70 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ptions.Paragraph:...............
29620 20 20 20 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 .......................character
29640 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 Infos[i].vertex_BL.uv2.x.=.(char
29660 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e acterInfos[i].vertex_BL.position
29680 2e 78 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 2e 78 20 2d 20 6d 5f 6d .x.+.justificationOffset.x.-.m_m
296a0 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e eshExtents.min.x)./.(m_meshExten
296c0 74 73 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 ts.max.x.-.m_meshExtents.min.x).
296e0 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +.uvOffset;.....................
29700 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 49 6e 66 6f 73 5b .................characterInfos[
29720 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 i].vertex_TL.uv2.x.=.(characterI
29740 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2b 20 6a nfos[i].vertex_TL.position.x.+.j
29760 75 73 74 69 66 69 63 61 74 69 6f 6e 4f 66 66 73 65 74 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 ustificationOffset.x.-.m_meshExt
29780 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 ents.min.x)./.(m_meshExtents.max
297a0 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 .x.-.m_meshExtents.min.x).+.uvOf
297c0 66 73 65 74 3b 0d 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 fset;...........................
297e0 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 ...........characterInfos[i].ver
29800 74 65 78 5f 54 52 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 tex_TR.uv2.x.=.(characterInfos[i
29820 5d 2e 76 65 72 74 65 78 5f 54 52 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2b 20 6a 75 73 74 69 66 69 ].vertex_TR.position.x.+.justifi
29840 63 61 74 69 6f 6e 4f 66 66 73 65 74 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d cationOffset.x.-.m_meshExtents.m
29860 69 6e 2e 78 29 20 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 6d in.x)./.(m_meshExtents.max.x.-.m
29880 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d _meshExtents.min.x).+.uvOffset;.
298a0 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 20 20 20 20 20 ................................
298c0 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 .....characterInfos[i].vertex_BR
298e0 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 .uv2.x.=.(characterInfos[i].vert
29900 65 78 5f 42 52 2e 70 6f 73 69 74 69 6f 6e 2e 78 20 2b 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e ex_BR.position.x.+.justification
29920 4f 66 66 73 65 74 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 Offset.x.-.m_meshExtents.min.x).
29940 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 /.(m_meshExtents.max.x.-.m_meshE
29960 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 xtents.min.x).+.uvOffset;.......
29980 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 20 20 20 20 62 ...............................b
299a0 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 reak;...........................
299c0 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 69 6e 67 4f 70 74 69 .........case.TextureMappingOpti
299e0 6f 6e 73 2e 4d 61 74 63 68 41 73 70 65 63 74 3a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ons.MatchAspect:................
29a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 ........................switch.(
29a20 6d 5f 76 65 72 74 69 63 61 6c 4d 61 70 70 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 m_verticalMapping)..............
29a40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ........................{.......
29a60 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 20 20 20 20 20 ................................
29a80 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 43 68 ...case.TextureMappingOptions.Ch
29aa0 61 72 61 63 74 65 72 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aracter:........................
29ac0 20 20 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 49 ......................characterI
29ae0 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 20 3d 20 30 3b 20 2f 2f 2b nfos[i].vertex_BL.uv2.y.=.0;.//+
29b00 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .m_uvOffset.y;..................
29b20 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 20 63 68 61 72 ............................char
29b40 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 acterInfos[i].vertex_TL.uv2.y.=.
29b60 31 3b 20 2f 2f 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 1;.//+.m_uvOffset.y;............
29b80 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 20 20 20 20 20 ................................
29ba0 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 ..characterInfos[i].vertex_TR.uv
29bc0 32 2e 79 20 3d 20 30 3b 20 2f 2f 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 2.y.=.0;.//+.m_uvOffset.y;......
29be0 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 20 20 20 20 20 ................................
29c00 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 ........characterInfos[i].vertex
29c20 5f 42 52 2e 75 76 32 2e 79 20 3d 20 31 3b 20 2f 2f 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b _BR.uv2.y.=.1;.//+.m_uvOffset.y;
29c40 0d 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 20 20 20 20 ................................
29c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ..............break;............
29c80 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 20 20 20 20 20 ................................
29ca0 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 4c 69 6e 65 3a case.TextureMappingOptions.Line:
29cc0 0d 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 20 20 20 20 ................................
29ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e ..............characterInfos[i].
29d00 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f vertex_BL.uv2.y.=.(characterInfo
29d20 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 6c 69 6e 65 s[i].vertex_BL.position.y.-.line
29d40 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2f 20 28 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 Extents.min.y)./.(lineExtents.ma
29d60 78 2e 79 20 2d 20 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2b 20 75 76 4f 66 66 x.y.-.lineExtents.min.y).+.uvOff
29d80 73 65 74 3b 0d 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 set;............................
29da0 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 49 6e 66 6f 73 ..................characterInfos
29dc0 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 [i].vertex_TL.uv2.y.=.(character
29de0 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 Infos[i].vertex_TL.position.y.-.
29e00 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2f 20 28 6c 69 6e 65 45 78 74 65 6e 74 lineExtents.min.y)./.(lineExtent
29e20 73 2e 6d 61 78 2e 79 20 2d 20 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2b 20 75 s.max.y.-.lineExtents.min.y).+.u
29e40 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 vOffset;........................
29e60 20 20 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 49 ......................characterI
29e80 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 63 nfos[i].vertex_TR.uv2.y.=.charac
29ea0 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 terInfos[i].vertex_BL.uv2.y;....
29ec0 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 20 20 20 20 20 ................................
29ee0 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 ..........characterInfos[i].vert
29f00 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e ex_BR.uv2.y.=.characterInfos[i].
29f20 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 vertex_TL.uv2.y;................
29f40 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 20 20 20 62 72 ..............................br
29f60 65 61 6b 3b 0d 0a 0d 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 eak;............................
29f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 ................case.TextureMapp
29fa0 69 6e 67 4f 70 74 69 6f 6e 73 2e 50 61 72 61 67 72 61 70 68 3a 0d 0a 20 20 20 20 20 20 20 20 20 ingOptions.Paragraph:...........
29fc0 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 20 20 20 20 20 ................................
29fe0 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 ...characterInfos[i].vertex_BL.u
2a000 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 v2.y.=.(characterInfos[i].vertex
2a020 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d _BL.position.y.-.m_meshExtents.m
2a040 69 6e 2e 79 29 20 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 20 2d 20 6d in.y)./.(m_meshExtents.max.y.-.m
2a060 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d _meshExtents.min.y).+.uvOffset;.
2a080 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 20 20 20 20 20 ................................
2a0a0 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 .............characterInfos[i].v
2a0c0 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 ertex_TL.uv2.y.=.(characterInfos
2a0e0 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 6d 5f 6d 65 73 [i].vertex_TL.position.y.-.m_mes
2a100 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 hExtents.min.y)./.(m_meshExtents
2a120 2e 6d 61 78 2e 79 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2b 20 .max.y.-.m_meshExtents.min.y).+.
2a140 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 uvOffset;.......................
2a160 20 20 20 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 .......................character
2a180 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 Infos[i].vertex_TR.uv2.y.=.chara
2a1a0 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 3b 0d 0a 20 cterInfos[i].vertex_BL.uv2.y;...
2a1c0 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 20 20 20 20 20 ................................
2a1e0 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 ...........characterInfos[i].ver
2a200 74 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d tex_BR.uv2.y.=.characterInfos[i]
2a220 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .vertex_TL.uv2.y;...............
2a240 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 20 20 20 20 62 ...............................b
2a260 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 reak;...........................
2a280 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 .................case.TextureMap
2a2a0 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 4d 61 74 63 68 41 73 70 65 63 74 3a 0d 0a 20 20 20 20 20 20 pingOptions.MatchAspect:........
2a2c0 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 20 20 20 20 20 ................................
2a2e0 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 28 22 45 52 52 4f 52 3a 20 43 61 6e 6e 6f 74 20 4d ......Debug.Log("ERROR:.Cannot.M
2a300 61 74 63 68 20 62 6f 74 68 20 56 65 72 74 69 63 61 6c 20 26 20 48 6f 72 69 7a 6f 6e 74 61 6c 2e atch.both.Vertical.&.Horizontal.
2a320 22 29 3b 0d 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 20 ");.............................
2a340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 .................break;.........
2a360 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 20 20 7d 0d 0a .............................}..
2a380 0d 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 20 20 20 20 ................................
2a3a0 20 20 20 20 20 20 2f 2f 66 6c 6f 61 74 20 78 44 65 6c 74 61 20 3d 20 31 20 2d 20 28 5f 75 76 32 ......//float.xDelta.=.1.-.(_uv2
2a3c0 73 5b 76 65 72 74 5f 69 6e 64 65 78 20 2b 20 30 5d 2e 79 20 2a 20 74 65 78 74 4d 65 73 68 43 68 s[vert_index.+.0].y.*.textMeshCh
2a3e0 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 41 73 70 65 63 74 52 61 74 69 6f 29 3b 20 2f 2f 20 aracterInfo[i].AspectRatio);.//.
2a400 4c 65 66 74 20 61 6c 69 67 6e 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Left.aligned....................
2a420 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 78 44 65 6c 74 61 20 3d ..................float.xDelta.=
2a440 20 28 31 20 2d 20 28 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 .(1.-.((characterInfos[i].vertex
2a460 5f 42 4c 2e 75 76 32 2e 79 20 2b 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 _BL.uv2.y.+.characterInfos[i].ve
2a480 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 29 20 2a 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b rtex_TL.uv2.y).*.characterInfos[
2a4a0 69 5d 2e 61 73 70 65 63 74 52 61 74 69 6f 29 29 20 2f 20 32 3b 20 2f 2f 20 43 65 6e 74 65 72 20 i].aspectRatio))./.2;.//.Center.
2a4c0 6f 66 20 52 65 63 74 61 6e 67 6c 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 of.Rectangle....................
2a4e0 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 49 6e 66 ....................characterInf
2a500 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 os[i].vertex_BL.uv2.x.=.(charact
2a520 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 20 2a 20 63 68 61 erInfos[i].vertex_BL.uv2.y.*.cha
2a540 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 61 73 70 65 63 74 52 61 74 69 6f 29 20 2b 20 78 44 racterInfos[i].aspectRatio).+.xD
2a560 65 6c 74 61 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 elta.+.uvOffset;................
2a580 20 20 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 49 ......................characterI
2a5a0 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 78 20 3d 20 63 68 61 72 61 63 nfos[i].vertex_TL.uv2.x.=.charac
2a5c0 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 78 3b 0d 0a 20 20 terInfos[i].vertex_BL.uv2.x;....
2a5e0 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 20 20 20 20 20 ................................
2a600 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 ..characterInfos[i].vertex_TR.uv
2a620 32 2e 78 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 2.x.=.(characterInfos[i].vertex_
2a640 54 4c 2e 75 76 32 2e 79 20 2a 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 61 73 70 TL.uv2.y.*.characterInfos[i].asp
2a660 65 63 74 52 61 74 69 6f 29 20 2b 20 78 44 65 6c 74 61 20 2b 20 75 76 4f 66 66 73 65 74 3b 0d 0a ectRatio).+.xDelta.+.uvOffset;..
2a680 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 20 20 20 20 20 ................................
2a6a0 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e ....characterInfos[i].vertex_BR.
2a6c0 75 76 32 2e 78 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 uv2.x.=.characterInfos[i].vertex
2a6e0 5f 54 52 2e 75 76 32 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _TR.uv2.x;......................
2a700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 ................break;..........
2a720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 ....................}...........
2a740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 76 .....................switch.(m_v
2a760 65 72 74 69 63 61 6c 4d 61 70 70 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erticalMapping).................
2a780 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
2a7a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 70 ................case.TextureMapp
2a7c0 69 6e 67 4f 70 74 69 6f 6e 73 2e 43 68 61 72 61 63 74 65 72 3a 0d 0a 20 20 20 20 20 20 20 20 20 ingOptions.Character:...........
2a7e0 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 63 68 61 72 61 ...........................chara
2a800 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 20 3d 20 30 cterInfos[i].vertex_BL.uv2.y.=.0
2a820 3b 20 2f 2f 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ;.//+.m_uvOffset.y;.............
2a840 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 63 68 61 72 61 63 74 .........................charact
2a860 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 31 3b 20 erInfos[i].vertex_TL.uv2.y.=.1;.
2a880 2f 2f 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 //+.m_uvOffset.y;...............
2a8a0 20 20 20 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 .......................character
2a8c0 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 79 20 3d 20 31 3b 20 2f 2f Infos[i].vertex_TR.uv2.y.=.1;.//
2a8e0 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +.m_uvOffset.y;.................
2a900 20 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 49 6e .....................characterIn
2a920 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 30 3b 20 2f 2f 2b 20 fos[i].vertex_BR.uv2.y.=.0;.//+.
2a940 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 m_uvOffset.y;...................
2a960 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 0d 0a 0d 0a 20 20 20 ...................break;.......
2a980 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 20 20 63 61 73 .............................cas
2a9a0 65 20 54 65 78 74 75 72 65 4d 61 70 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 4c 69 6e 65 3a 0d 0a 20 e.TextureMappingOptions.Line:...
2a9c0 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 20 20 20 20 20 ................................
2a9e0 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 ...characterInfos[i].vertex_BL.u
2aa00 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 v2.y.=.(characterInfos[i].vertex
2aa20 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 6c 69 6e 65 49 6e 66 6f 2e 64 65 73 63 65 6e _BL.position.y.-.lineInfo.descen
2aa40 64 65 72 29 20 2f 20 28 6c 69 6e 65 49 6e 66 6f 2e 61 73 63 65 6e 64 65 72 20 2d 20 6c 69 6e 65 der)./.(lineInfo.ascender.-.line
2aa60 49 6e 66 6f 2e 64 65 73 63 65 6e 64 65 72 29 3b 20 2f 2f 20 2b 20 6d 5f 75 76 4f 66 66 73 65 74 Info.descender);.//.+.m_uvOffset
2aa80 2e 79 3b 0d 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 20 .y;.............................
2aaa0 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 .........characterInfos[i].verte
2aac0 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e x_TL.uv2.y.=.(characterInfos[i].
2aae0 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 6c 69 6e 65 49 6e 66 6f 2e vertex_TL.position.y.-.lineInfo.
2ab00 64 65 73 63 65 6e 64 65 72 29 20 2f 20 28 6c 69 6e 65 49 6e 66 6f 2e 61 73 63 65 6e 64 65 72 20 descender)./.(lineInfo.ascender.
2ab20 2d 20 6c 69 6e 65 49 6e 66 6f 2e 64 65 73 63 65 6e 64 65 72 29 3b 20 2f 2f 20 2b 20 6d 5f 75 76 -.lineInfo.descender);.//.+.m_uv
2ab40 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Offset.y;.......................
2ab60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d ...............characterInfos[i]
2ab80 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f .vertex_TR.uv2.y.=.characterInfo
2aba0 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 s[i].vertex_TL.uv2.y;...........
2abc0 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 63 68 61 72 61 ...........................chara
2abe0 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 63 cterInfos[i].vertex_BR.uv2.y.=.c
2ac00 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 haracterInfos[i].vertex_BL.uv2.y
2ac20 3b 0d 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 20 20 20 ;...............................
2ac40 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......break;...................
2ac60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 70 .................case.TextureMap
2ac80 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 50 61 72 61 67 72 61 70 68 3a 0d 0a 20 20 20 20 20 20 20 20 pingOptions.Paragraph:..........
2aca0 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 20 63 68 61 72 ............................char
2acc0 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 20 3d 20 acterInfos[i].vertex_BL.uv2.y.=.
2ace0 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 70 6f 73 (characterInfos[i].vertex_BL.pos
2ad00 69 74 69 6f 6e 2e 79 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2f ition.y.-.m_meshExtents.min.y)./
2ad20 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 20 2d 20 6d 5f 6d 65 73 68 45 78 .(m_meshExtents.max.y.-.m_meshEx
2ad40 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 3b 20 2f 2f 20 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b tents.min.y);.//.+.m_uvOffset.y;
2ad60 0d 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 20 20 20 20 ................................
2ad80 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 ......characterInfos[i].vertex_T
2ada0 4c 2e 75 76 32 2e 79 20 3d 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 L.uv2.y.=.(characterInfos[i].ver
2adc0 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 2e 79 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 tex_TL.position.y.-.m_meshExtent
2ade0 73 2e 6d 69 6e 2e 79 29 20 2f 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 20 s.min.y)./.(m_meshExtents.max.y.
2ae00 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 3b 20 2f 2f 20 2b 20 6d 5f 75 -.m_meshExtents.min.y);.//.+.m_u
2ae20 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 vOffset.y;......................
2ae40 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 49 6e 66 6f 73 5b 69 ................characterInfos[i
2ae60 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 ].vertex_TR.uv2.y.=.characterInf
2ae80 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 os[i].vertex_TL.uv2.y;..........
2aea0 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 20 63 68 61 72 ............................char
2aec0 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 acterInfos[i].vertex_BR.uv2.y.=.
2aee0 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e characterInfos[i].vertex_BL.uv2.
2af00 79 3b 0d 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 20 20 y;..............................
2af20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........break;..................
2af40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 54 65 78 74 75 72 65 4d 61 ..................case.TextureMa
2af60 70 70 69 6e 67 4f 70 74 69 6f 6e 73 2e 4d 61 74 63 68 41 73 70 65 63 74 3a 0d 0a 20 20 20 20 20 ppingOptions.MatchAspect:.......
2af80 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 20 20 20 20 66 ...............................f
2afa0 6c 6f 61 74 20 79 44 65 6c 74 61 20 3d 20 28 31 20 2d 20 28 28 63 68 61 72 61 63 74 65 72 49 6e loat.yDelta.=.(1.-.((characterIn
2afc0 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 78 20 2b 20 63 68 61 72 61 63 74 fos[i].vertex_BL.uv2.x.+.charact
2afe0 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 78 29 20 2f 20 63 68 erInfos[i].vertex_TR.uv2.x)./.ch
2b000 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 61 73 70 65 63 74 52 61 74 69 6f 29 29 20 2f 20 aracterInfos[i].aspectRatio))./.
2b020 32 3b 20 2f 2f 20 43 65 6e 74 65 72 20 6f 66 20 52 65 63 74 61 6e 67 6c 65 0d 0a 0d 0a 20 20 20 2;.//.Center.of.Rectangle.......
2b040 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 20 20 20 20 20 ................................
2b060 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 .characterInfos[i].vertex_BL.uv2
2b080 2e 79 20 3d 20 79 44 65 6c 74 61 20 2b 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d .y.=.yDelta.+.(characterInfos[i]
2b0a0 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 78 20 2f 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f .vertex_BL.uv2.x./.characterInfo
2b0c0 73 5b 69 5d 2e 61 73 70 65 63 74 52 61 74 69 6f 29 3b 20 2f 2f 20 2b 20 6d 5f 75 76 4f 66 66 73 s[i].aspectRatio);.//.+.m_uvOffs
2b0e0 65 74 2e 79 3b 0d 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 et.y;...........................
2b100 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 ...........characterInfos[i].ver
2b120 74 65 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 79 44 65 6c 74 61 20 2b 20 28 63 68 61 72 61 63 74 tex_TL.uv2.y.=.yDelta.+.(charact
2b140 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 78 20 2f 20 63 68 61 erInfos[i].vertex_TR.uv2.x./.cha
2b160 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 61 73 70 65 63 74 52 61 74 69 6f 29 3b 20 2f 2f 20 racterInfos[i].aspectRatio);.//.
2b180 2b 20 6d 5f 75 76 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 +.m_uvOffset.y;.................
2b1a0 20 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 49 6e .....................characterIn
2b1c0 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 63 68 61 72 61 63 74 fos[i].vertex_BR.uv2.y.=.charact
2b1e0 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 erInfos[i].vertex_BL.uv2.y;.....
2b200 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 20 20 20 20 20 ................................
2b220 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 .characterInfos[i].vertex_TR.uv2
2b240 2e 79 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c .y.=.characterInfos[i].vertex_TL
2b260 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .uv2.y;.........................
2b280 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .............break;.............
2b2a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
2b2c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 ................#endregion......
2b2e0 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 2f 2f 20 50 61 63 ..........................//.Pac
2b300 6b 20 55 56 27 73 20 73 6f 20 74 68 61 74 20 77 65 20 63 61 6e 20 70 61 73 73 20 58 73 63 61 6c k.UV's.so.that.we.can.pass.Xscal
2b320 65 20 6e 65 65 64 65 64 20 66 6f 72 20 53 68 61 64 65 72 20 74 6f 20 6d 61 69 6e 74 61 69 6e 20 e.needed.for.Shader.to.maintain.
2b340 31 3a 31 20 72 61 74 69 6f 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 1:1.ratio.......................
2b360 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 50 61 63 6b 20 53 63 61 6c 65 20 69 6e 74 6f 20 ........#region.Pack.Scale.into.
2b380 55 56 32 0d 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 20 UV2.............................
2b3a0 20 78 53 63 61 6c 65 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 73 63 61 6c .xScale.=.characterInfos[i].scal
2b3c0 65 20 2a 20 4d 61 74 68 66 2e 41 62 73 28 6c 6f 73 73 79 53 63 61 6c 65 29 20 2a 20 28 31 20 2d e.*.Mathf.Abs(lossyScale).*.(1.-
2b3e0 20 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 .m_charWidthAdjDelta);..........
2b400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 63 68 61 72 61 63 74 ....................if.(!charact
2b420 65 72 49 6e 66 6f 73 5b 69 5d 2e 69 73 55 73 69 6e 67 41 6c 74 65 72 6e 61 74 65 54 79 70 65 66 erInfos[i].isUsingAlternateTypef
2b440 61 63 65 20 26 26 20 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 73 74 79 6c 65 20 ace.&&.(characterInfos[i].style.
2b460 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 &.FontStyles.Bold).==.FontStyles
2b480 2e 42 6f 6c 64 29 20 78 53 63 61 6c 65 20 2a 3d 20 2d 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .Bold).xScale.*=.-1;............
2b4a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 69 6e 74 20 69 73 42 6f 6c 64 ....................//int.isBold
2b4c0 20 3d 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e .=.(m_textInfo.characterInfo[i].
2b4e0 73 74 79 6c 65 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 style.&.FontStyles.Bold).==.Font
2b500 53 74 79 6c 65 73 2e 42 6f 6c 64 20 3f 20 31 20 3a 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 Styles.Bold.?.1.:.0;............
2b520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 56 65 63 74 6f 72 32 20 76 65 72 74 ..................//Vector2.vert
2b540 65 78 44 61 74 61 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 69 73 42 6f 6c 64 2c 20 78 53 63 exData.=.new.Vector2(isBold,.xSc
2b560 61 6c 65 29 3b 0d 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 ale);...........................
2b580 20 20 20 2f 2f 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c ...//characterInfos[i].vertex_BL
2b5a0 2e 75 76 34 20 3d 20 76 65 72 74 65 78 44 61 74 61 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .uv4.=.vertexData;..............
2b5c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 ................//characterInfos
2b5e0 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 34 20 3d 20 76 65 72 74 65 78 44 61 74 61 3b 0d [i].vertex_TL.uv4.=.vertexData;.
2b600 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 20 20 2f 2f 63 .............................//c
2b620 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 34 20 3d haracterInfos[i].vertex_TR.uv4.=
2b640 20 76 65 72 74 65 78 44 61 74 61 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .vertexData;....................
2b660 20 20 20 20 20 20 20 20 20 20 2f 2f 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 ..........//characterInfos[i].ve
2b680 72 74 65 78 5f 42 52 2e 75 76 34 20 3d 20 76 65 72 74 65 78 44 61 74 61 3b 0d 0a 0d 0a 20 20 20 rtex_BR.uv4.=.vertexData;.......
2b6a0 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 66 6c 6f 61 74 20 78 .........................float.x
2b6c0 30 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 0.=.characterInfos[i].vertex_BL.
2b6e0 75 76 32 2e 78 3b 0d 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 uv2.x;..........................
2b700 20 20 20 20 66 6c 6f 61 74 20 79 30 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d ....float.y0.=.characterInfos[i]
2b720 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .vertex_BL.uv2.y;...............
2b740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 78 31 20 3d 20 63 68 61 72 61 63 ...............float.x1.=.charac
2b760 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 78 3b 0d 0a 20 20 terInfos[i].vertex_TR.uv2.x;....
2b780 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 66 6c 6f 61 74 20 ..........................float.
2b7a0 79 31 20 3d 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 y1.=.characterInfos[i].vertex_TR
2b7c0 2e 75 76 32 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .uv2.y;.........................
2b7e0 20 20 20 20 20 20 20 66 6c 6f 61 74 20 64 78 20 3d 20 28 69 6e 74 29 78 30 3b 0d 0a 20 20 20 20 .......float.dx.=.(int)x0;......
2b800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 64 79 ........................float.dy
2b820 20 3d 20 28 69 6e 74 29 79 30 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .=.(int)y0;.....................
2b840 20 20 20 20 20 20 20 20 20 20 20 78 30 20 3d 20 78 30 20 2d 20 64 78 3b 0d 0a 20 20 20 20 20 20 ...........x0.=.x0.-.dx;........
2b860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 78 31 20 3d 20 78 31 20 2d 20 ......................x1.=.x1.-.
2b880 64 78 3b 0d 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 20 dx;.............................
2b8a0 20 79 30 20 3d 20 79 30 20 2d 20 64 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .y0.=.y0.-.dy;..................
2b8c0 20 20 20 20 20 20 20 20 20 20 20 20 79 31 20 3d 20 79 31 20 2d 20 64 79 3b 0d 0a 0d 0a 20 20 20 ............y1.=.y1.-.dy;.......
2b8e0 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 2f 2f 20 4f 70 74 69 .........................//.Opti
2b900 6d 69 7a 61 74 69 6f 6e 20 74 6f 20 61 76 6f 69 64 20 68 61 76 69 6e 67 20 61 20 76 65 63 74 6f mization.to.avoid.having.a.vecto
2b920 72 32 20 72 65 74 75 72 6e 65 64 20 66 72 6f 6d 20 74 68 65 20 50 61 63 6b 20 55 56 20 66 75 6e r2.returned.from.the.Pack.UV.fun
2b940 63 74 69 6f 6e 2e 0d 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 ction...........................
2b960 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e ....characterInfos[i].vertex_BL.
2b980 75 76 32 2e 78 20 3d 20 50 61 63 6b 55 56 28 78 30 2c 20 79 30 29 3b 20 63 68 61 72 61 63 74 65 uv2.x.=.PackUV(x0,.y0);.characte
2b9a0 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 75 76 32 2e 79 20 3d 20 78 53 63 61 rInfos[i].vertex_BL.uv2.y.=.xSca
2b9c0 6c 65 3b 0d 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 20 le;.............................
2b9e0 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 .characterInfos[i].vertex_TL.uv2
2ba00 2e 78 20 3d 20 50 61 63 6b 55 56 28 78 30 2c 20 79 31 29 3b 20 63 68 61 72 61 63 74 65 72 49 6e .x.=.PackUV(x0,.y1);.characterIn
2ba20 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 75 76 32 2e 79 20 3d 20 78 53 63 61 6c 65 3b fos[i].vertex_TL.uv2.y.=.xScale;
2ba40 0d 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 20 20 63 68 ..............................ch
2ba60 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 78 20 aracterInfos[i].vertex_TR.uv2.x.
2ba80 3d 20 50 61 63 6b 55 56 28 78 31 2c 20 79 31 29 3b 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 =.PackUV(x1,.y1);.characterInfos
2baa0 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 75 76 32 2e 79 20 3d 20 78 53 63 61 6c 65 3b 0d 0a 20 [i].vertex_TR.uv2.y.=.xScale;...
2bac0 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 63 68 61 72 61 ...........................chara
2bae0 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 78 20 3d 20 50 cterInfos[i].vertex_BR.uv2.x.=.P
2bb00 61 63 6b 55 56 28 78 31 2c 20 79 30 29 3b 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d ackUV(x1,.y0);.characterInfos[i]
2bb20 2e 76 65 72 74 65 78 5f 42 52 2e 75 76 32 2e 79 20 3d 20 78 53 63 61 6c 65 3b 0d 0a 20 20 20 20 .vertex_BR.uv2.y.=.xScale;......
2bb40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 ........................#endregi
2bb60 6f 6e 0d 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 20 20 on..............................
2bb80 62 72 65 61 6b 3b 0d 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 break;..........................
2bba0 0d 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 2f 2f 20 53 50 52 ..........................//.SPR
2bbc0 49 54 45 53 0d 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 61 ITES..........................ca
2bbe0 73 65 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 53 70 72 69 74 65 3a 0d 0a se.TMP_TextElementType.Sprite:..
2bc00 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 20 2f 2f 20 4e ............................//.N
2bc20 6f 74 68 69 6e 67 20 72 69 67 68 74 20 6e 6f 77 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 othing.right.now................
2bc40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ..............break;............
2bc60 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........}.....................
2bc80 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 6d 61 78 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 ...//.Handle.maxVisibleCharacter
2bca0 73 2c 20 6d 61 78 56 69 73 69 62 6c 65 4c 69 6e 65 73 20 61 6e 64 20 4f 76 65 72 66 6c 6f 77 20 s,.maxVisibleLines.and.Overflow.
2bcc0 50 61 67 65 20 4d 6f 64 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Page.Mode.......................
2bce0 23 72 65 67 69 6f 6e 20 48 61 6e 64 6c 65 20 6d 61 78 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 #region.Handle.maxVisibleCharact
2bd00 65 72 73 20 2f 20 6d 61 78 56 69 73 69 62 6c 65 4c 69 6e 65 73 20 2f 20 50 61 67 65 20 4d 6f 64 ers./.maxVisibleLines./.Page.Mod
2bd20 65 0d 0a 20 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 3c 20 6d e......................if.(i.<.m
2bd40 5f 6d 61 78 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 73 20 26 26 20 77 6f 72 64 43 6f 75 _maxVisibleCharacters.&&.wordCou
2bd60 6e 74 20 3c 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 57 6f 72 64 73 20 26 26 20 63 75 72 72 65 6e nt.<.m_maxVisibleWords.&&.curren
2bd80 74 4c 69 6e 65 20 3c 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 4c 69 6e 65 73 20 26 26 20 6d 5f 6f tLine.<.m_maxVisibleLines.&&.m_o
2bda0 76 65 72 66 6c 6f 77 4d 6f 64 65 20 21 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 verflowMode.!=.TextOverflowModes
2bdc0 2e 50 61 67 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 .Page)......................{...
2bde0 20 20 20 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 .......................character
2be00 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 6f Infos[i].vertex_BL.position.+=.o
2be20 66 66 73 65 74 3b 0d 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 ffset;..........................
2be40 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 characterInfos[i].vertex_TL.posi
2be60 74 69 6f 6e 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tion.+=.offset;.................
2be80 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 .........characterInfos[i].verte
2bea0 78 5f 54 52 2e 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 x_TR.position.+=.offset;........
2bec0 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 49 6e 66 6f 73 ..................characterInfos
2bee0 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 6f 66 66 73 65 74 [i].vertex_BR.position.+=.offset
2bf00 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ;......................}........
2bf20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 69 20 3c 20 6d 5f 6d 61 78 ..............else.if.(i.<.m_max
2bf40 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 73 20 26 26 20 77 6f 72 64 43 6f 75 6e 74 20 3c VisibleCharacters.&&.wordCount.<
2bf60 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 57 6f 72 64 73 20 26 26 20 63 75 72 72 65 6e 74 4c 69 6e .m_maxVisibleWords.&&.currentLin
2bf80 65 20 3c 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 4c 69 6e 65 73 20 26 26 20 6d 5f 6f 76 65 72 66 e.<.m_maxVisibleLines.&&.m_overf
2bfa0 6c 6f 77 4d 6f 64 65 20 3d 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 lowMode.==.TextOverflowModes.Pag
2bfc0 65 20 26 26 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 70 61 67 65 4e 75 6d 62 65 e.&&.characterInfos[i].pageNumbe
2bfe0 72 20 3d 3d 20 70 61 67 65 54 6f 44 69 73 70 6c 61 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 r.==.pageToDisplay).............
2c000 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
2c020 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 4c 2e ....characterInfos[i].vertex_BL.
2c040 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 position.+=.offset;.............
2c060 20 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 .............characterInfos[i].v
2c080 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 ertex_TL.position.+=.offset;....
2c0a0 20 20 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 49 ......................characterI
2c0c0 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 52 2e 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 6f 66 nfos[i].vertex_TR.position.+=.of
2c0e0 66 73 65 74 3b 0d 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 fset;..........................c
2c100 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 70 6f 73 69 74 haracterInfos[i].vertex_BR.posit
2c120 69 6f 6e 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ion.+=.offset;..................
2c140 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d ....}......................else.
2c160 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 .....................{..........
2c180 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 49 6e 66 6f 73 5b 69 ................characterInfos[i
2c1a0 5d 2e 76 65 72 74 65 78 5f 42 4c 2e 70 6f 73 69 74 69 6f 6e 20 3d 20 56 65 63 74 6f 72 33 2e 7a ].vertex_BL.position.=.Vector3.z
2c1c0 65 72 6f 3b 0d 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 68 ero;..........................ch
2c1e0 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 aracterInfos[i].vertex_TL.positi
2c200 6f 6e 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 on.=.Vector3.zero;..............
2c220 20 20 20 20 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 ............characterInfos[i].ve
2c240 72 74 65 78 5f 54 52 2e 70 6f 73 69 74 69 6f 6e 20 3d 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b rtex_TR.position.=.Vector3.zero;
2c260 0d 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 68 61 72 61 63 ..........................charac
2c280 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 2e 70 6f 73 69 74 69 6f 6e 20 3d terInfos[i].vertex_BR.position.=
2c2a0 20 56 65 63 74 6f 72 33 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .Vector3.zero;..................
2c2c0 20 20 20 20 20 20 20 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 5d 2e 69 73 56 69 73 69 ........characterInfos[i].isVisi
2c2e0 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ble.=.false;....................
2c300 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 ..}......................#endreg
2c320 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ion..........................//.
2c340 46 69 6c 6c 20 56 65 72 74 65 78 20 42 75 66 66 65 72 73 20 66 6f 72 20 74 68 65 20 76 61 72 69 Fill.Vertex.Buffers.for.the.vari
2c360 6f 75 73 20 74 79 70 65 73 20 6f 66 20 65 6c 65 6d 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 ous.types.of.element............
2c380 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 ..........if.(elementType.==.TMP
2c3a0 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 29 0d 0a 20 20 20 _TextElementType.Character).....
2c3c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................{..............
2c3e0 20 20 20 20 20 20 20 20 20 20 20 20 46 69 6c 6c 43 68 61 72 61 63 74 65 72 56 65 72 74 65 78 42 ............FillCharacterVertexB
2c400 75 66 66 65 72 73 28 69 2c 20 76 65 72 74 5f 69 6e 64 65 78 5f 58 34 2c 20 6d 5f 69 73 56 6f 6c uffers(i,.vert_index_X4,.m_isVol
2c420 75 6d 65 74 72 69 63 54 65 78 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 umetricText);...................
2c440 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 ...}......................else.i
2c460 66 20 28 65 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 5f 54 65 78 74 45 6c 65 6d 65 6e f.(elementType.==.TMP_TextElemen
2c480 74 54 79 70 65 2e 53 70 72 69 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tType.Sprite)...................
2c4a0 20 20 20 7b 0d 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 46 69 ...{..........................Fi
2c4c0 6c 6c 53 70 72 69 74 65 56 65 72 74 65 78 42 75 66 66 65 72 73 28 69 2c 20 73 70 72 69 74 65 5f llSpriteVertexBuffers(i,.sprite_
2c4e0 69 6e 64 65 78 5f 58 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 index_X4);......................
2c500 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 }..................}............
2c520 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ......#endregion................
2c540 20 20 20 20 2f 2f 20 41 70 70 6c 79 20 41 6c 69 67 6e 6d 65 6e 74 20 61 6e 64 20 4a 75 73 74 69 ....//.Apply.Alignment.and.Justi
2c560 66 69 63 61 74 69 6f 6e 20 4f 66 66 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 fication.Offset.................
2c580 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 6f 74 .m_textInfo.characterInfo[i].bot
2c5a0 74 6f 6d 4c 65 66 74 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 tomLeft.+=.offset;..............
2c5c0 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e ....m_textInfo.characterInfo[i].
2c5e0 74 6f 70 4c 65 66 74 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 topLeft.+=.offset;..............
2c600 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e ....m_textInfo.characterInfo[i].
2c620 74 6f 70 52 69 67 68 74 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 topRight.+=.offset;.............
2c640 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d .....m_textInfo.characterInfo[i]
2c660 2e 62 6f 74 74 6f 6d 52 69 67 68 74 20 2b 3d 20 6f 66 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 .bottomRight.+=.offset;.........
2c680 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 ...........m_textInfo.characterI
2c6a0 6e 66 6f 5b 69 5d 2e 6f 72 69 67 69 6e 20 2b 3d 20 6f 66 66 73 65 74 2e 78 3b 0d 0a 20 20 20 20 nfo[i].origin.+=.offset.x;......
2c6c0 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 ............m_textInfo.character
2c6e0 49 6e 66 6f 5b 69 5d 2e 78 41 64 76 61 6e 63 65 20 2b 3d 20 6f 66 66 73 65 74 2e 78 3b 0d 0a 0d Info[i].xAdvance.+=.offset.x;...
2c700 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 .................m_textInfo.char
2c720 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 61 73 63 65 6e 64 65 72 20 2b 3d 20 6f 66 66 73 65 74 2e acterInfo[i].ascender.+=.offset.
2c740 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 y;..................m_textInfo.c
2c760 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 64 65 73 63 65 6e 64 65 72 20 2b 3d 20 6f 66 66 haracterInfo[i].descender.+=.off
2c780 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e set.y;..................m_textIn
2c7a0 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 3d 20 fo.characterInfo[i].baseLine.+=.
2c7c0 6f 66 66 73 65 74 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 offset.y;....................//.
2c7e0 55 70 64 61 74 65 20 4d 65 73 68 45 78 74 65 6e 74 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Update.MeshExtents..............
2c800 20 20 20 20 69 66 20 28 69 73 43 68 61 72 61 63 74 65 72 56 69 73 69 62 6c 65 29 0d 0a 20 20 20 ....if.(isCharacterVisible).....
2c820 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
2c840 20 20 20 20 2f 2f 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 20 3d 20 6e 65 77 20 56 65 ....//m_meshExtents.min.=.new.Ve
2c860 63 74 6f 72 32 28 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 ctor2(Mathf.Min(m_meshExtents.mi
2c880 6e 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d n.x,.m_textInfo.characterInfo[i]
2c8a0 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 29 2c 20 4d 61 74 68 66 2e 4d 69 6e 28 6d 5f 6d 65 73 68 .bottomLeft.x),.Mathf.Min(m_mesh
2c8c0 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 Extents.min.y,.m_textInfo.charac
2c8e0 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 79 29 29 3b 0d 0a 20 20 20 20 terInfo[i].bottomLeft.y));......
2c900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e ................//m_meshExtents.
2c920 6d 61 78 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 4d 61 74 68 66 2e 4d 61 78 28 6d 5f 6d 65 max.=.new.Vector2(Mathf.Max(m_me
2c940 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 shExtents.max.x,.m_textInfo.char
2c960 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 29 2c 20 4d 61 74 68 66 2e acterInfo[i].topRight.x),.Mathf.
2c980 4d 61 78 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 2c 20 6d 5f 74 65 78 74 49 Max(m_meshExtents.max.y,.m_textI
2c9a0 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 4c 65 66 74 2e 79 29 29 nfo.characterInfo[i].topLeft.y))
2c9c0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ;..................}............
2c9e0 20 20 20 20 20 20 20 20 2f 2f 20 4e 65 65 64 20 74 6f 20 72 65 63 6f 6d 70 75 74 65 20 6c 69 6e ........//.Need.to.recompute.lin
2ca00 65 45 78 74 65 6e 74 20 74 6f 20 61 63 63 6f 75 6e 74 20 66 6f 72 20 74 68 65 20 6f 66 66 73 65 eExtent.to.account.for.the.offse
2ca20 74 20 66 72 6f 6d 20 6a 75 73 74 69 66 69 63 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 t.from.justification............
2ca40 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 41 64 6a 75 73 74 20 6c 69 6e 65 45 78 74 65 6e 74 .......#region.Adjust.lineExtent
2ca60 73 20 72 65 73 75 6c 74 69 6e 67 20 66 72 6f 6d 20 61 6c 69 67 6e 6d 65 6e 74 20 6f 66 66 73 65 s.resulting.from.alignment.offse
2ca80 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 4c 69 t..................if.(currentLi
2caa0 6e 65 20 21 3d 20 6c 61 73 74 4c 69 6e 65 20 7c 7c 20 69 20 3d 3d 20 6d 5f 63 68 61 72 61 63 74 ne.!=.lastLine.||.i.==.m_charact
2cac0 65 72 43 6f 75 6e 74 20 2d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d erCount.-.1)..................{.
2cae0 0a 20 20 20 20 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 20 74 .....................//.Update.t
2cb00 68 65 20 70 72 65 76 69 6f 75 73 20 6c 69 6e 65 27 73 20 65 78 74 65 6e 74 73 0d 0a 20 20 20 20 he.previous.line's.extents......
2cb20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 4c 69 6e 65 20 ................if.(currentLine.
2cb40 21 3d 20 6c 61 73 74 4c 69 6e 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 !=.lastLine)....................
2cb60 20 20 7b 0d 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 6d 5f 74 ..{..........................m_t
2cb80 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 62 61 73 65 6c extInfo.lineInfo[lastLine].basel
2cba0 69 6e 65 20 2b 3d 20 6f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ine.+=.offset.y;................
2cbc0 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 ..........m_textInfo.lineInfo[la
2cbe0 73 74 4c 69 6e 65 5d 2e 61 73 63 65 6e 64 65 72 20 2b 3d 20 6f 66 66 73 65 74 2e 79 3b 0d 0a 20 stLine].ascender.+=.offset.y;...
2cc00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .......................m_textInf
2cc20 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 64 65 73 63 65 6e 64 65 72 20 2b o.lineInfo[lastLine].descender.+
2cc40 3d 20 6f 66 66 73 65 74 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.offset.y;.....................
2cc60 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c .......m_textInfo.lineInfo[lastL
2cc80 69 6e 65 5d 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 20 3d 20 6e 65 77 20 56 65 63 74 6f ine].lineExtents.min.=.new.Vecto
2cca0 72 32 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 65 r2(m_textInfo.characterInfo[m_te
2ccc0 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 66 69 72 73 74 43 xtInfo.lineInfo[lastLine].firstC
2cce0 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 2c 20 6d 5f 74 haracterIndex].bottomLeft.x,.m_t
2cd00 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 64 65 73 63 65 extInfo.lineInfo[lastLine].desce
2cd20 6e 64 65 72 29 3b 0d 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 nder);..........................
2cd40 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 6c 69 m_textInfo.lineInfo[lastLine].li
2cd60 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 6d 5f 74 65 neExtents.max.=.new.Vector2(m_te
2cd80 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6d 5f 74 65 78 74 49 6e 66 6f 2e xtInfo.characterInfo[m_textInfo.
2cda0 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 lineInfo[lastLine].lastVisibleCh
2cdc0 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d 5f 74 65 78 74 aracterIndex].topRight.x,.m_text
2cde0 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 6c 61 73 74 4c 69 6e 65 5d 2e 61 73 63 65 6e 64 65 72 Info.lineInfo[lastLine].ascender
2ce00 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 );......................}.......
2ce20 20 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 20 74 68 65 20 63 .................//.Update.the.c
2ce40 75 72 72 65 6e 74 20 6c 69 6e 65 27 73 20 65 78 74 65 6e 74 73 0d 0a 20 20 20 20 20 20 20 20 20 urrent.line's.extents...........
2ce60 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3d 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 ...........if.(i.==.m_characterC
2ce80 6f 75 6e 74 20 2d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b ount.-.1)......................{
2cea0 0d 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 6d 5f 74 65 78 74 ..........................m_text
2cec0 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d 2e 62 61 73 65 6c Info.lineInfo[currentLine].basel
2cee0 69 6e 65 20 2b 3d 20 6f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ine.+=.offset.y;................
2cf00 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 ..........m_textInfo.lineInfo[cu
2cf20 72 72 65 6e 74 4c 69 6e 65 5d 2e 61 73 63 65 6e 64 65 72 20 2b 3d 20 6f 66 66 73 65 74 2e 79 3b rrentLine].ascender.+=.offset.y;
2cf40 0d 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 6d 5f 74 65 78 74 ..........................m_text
2cf60 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d 2e 64 65 73 63 65 Info.lineInfo[currentLine].desce
2cf80 6e 64 65 72 20 2b 3d 20 6f 66 66 73 65 74 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nder.+=.offset.y;...............
2cfa0 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f .............m_textInfo.lineInfo
2cfc0 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 69 6e 20 3d 20 [currentLine].lineExtents.min.=.
2cfe0 6e 65 77 20 56 65 63 74 6f 72 32 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 new.Vector2(m_textInfo.character
2d000 49 6e 66 6f 5b 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 6e 74 Info[m_textInfo.lineInfo[current
2d020 4c 69 6e 65 5d 2e 66 69 72 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 62 6f 74 74 6f Line].firstCharacterIndex].botto
2d040 6d 4c 65 66 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 mLeft.x,.m_textInfo.lineInfo[cur
2d060 72 65 6e 74 4c 69 6e 65 5d 2e 64 65 73 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 rentLine].descender);...........
2d080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e ...............m_textInfo.lineIn
2d0a0 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d 2e 6c 69 6e 65 45 78 74 65 6e 74 73 2e 6d 61 78 20 fo[currentLine].lineExtents.max.
2d0c0 3d 20 6e 65 77 20 56 65 63 74 6f 72 32 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 =.new.Vector2(m_textInfo.charact
2d0e0 65 72 49 6e 66 6f 5b 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 erInfo[m_textInfo.lineInfo[curre
2d100 6e 74 4c 69 6e 65 5d 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 ntLine].lastVisibleCharacterInde
2d120 78 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e x].topRight.x,.m_textInfo.lineIn
2d140 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d 2e 61 73 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 fo[currentLine].ascender);......
2d160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
2d180 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e ...}..................#endregion
2d1a0 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 72 61 63 6b 20 57 ......................//.Track.W
2d1c0 6f 72 64 20 43 6f 75 6e 74 20 70 65 72 20 6c 69 6e 65 20 61 6e 64 20 66 6f 72 20 74 68 65 20 6f ord.Count.per.line.and.for.the.o
2d1e0 62 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 54 bject..................#region.T
2d200 72 61 63 6b 20 57 6f 72 64 20 43 6f 75 6e 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rack.Word.Count.................
2d220 20 69 66 20 28 63 68 61 72 2e 49 73 4c 65 74 74 65 72 4f 72 44 69 67 69 74 28 63 75 72 72 65 6e .if.(char.IsLetterOrDigit(curren
2d240 74 43 68 61 72 61 63 74 65 72 29 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 tCharacter).||.currentCharacter.
2d260 3d 3d 20 30 78 32 44 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 3d 20 30 ==.0x2D.||.currentCharacter.==.0
2d280 78 41 44 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 3d 20 30 78 32 30 31 xAD.||.currentCharacter.==.0x201
2d2a0 30 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 3d 20 30 78 32 30 31 31 29 0.||.currentCharacter.==.0x2011)
2d2c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
2d2e0 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 53 74 61 72 74 4f 66 57 6f 72 64 20 3d 3d 20 66 61 .........if.(isStartOfWord.==.fa
2d300 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 lse)......................{.....
2d320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 53 74 61 72 74 4f 66 57 6f .....................isStartOfWo
2d340 72 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rd.=.true;......................
2d360 20 20 20 20 77 6f 72 64 46 69 72 73 74 43 68 61 72 20 3d 20 69 3b 0d 0a 20 20 20 20 20 20 20 20 ....wordFirstChar.=.i;..........
2d380 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............}...................
2d3a0 20 20 20 20 20 2f 2f 20 49 66 20 6c 61 73 74 20 63 68 61 72 61 63 74 65 72 20 69 73 20 61 20 77 .....//.If.last.character.is.a.w
2d3c0 6f 72 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 53 ord......................if.(isS
2d3e0 74 61 72 74 4f 66 57 6f 72 64 20 26 26 20 69 20 3d 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f tartOfWord.&&.i.==.m_characterCo
2d400 75 6e 74 20 2d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d unt.-.1)......................{.
2d420 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 69 6e 74 20 73 69 7a .........................int.siz
2d440 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 6e 66 6f 2e 4c 65 6e 67 74 68 3b 0d e.=.m_textInfo.wordInfo.Length;.
2d460 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 69 6e 74 20 69 6e 64 .........................int.ind
2d480 65 78 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 ex.=.m_textInfo.wordCount;......
2d4a0 20 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 6d 5f 74 65 78 74 ......................if.(m_text
2d4c0 49 6e 66 6f 2e 77 6f 72 64 43 6f 75 6e 74 20 2b 20 31 20 3e 20 73 69 7a 65 29 0d 0a 20 20 20 20 Info.wordCount.+.1.>.size)......
2d4e0 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 54 65 78 74 ........................TMP_Text
2d500 49 6e 66 6f 2e 52 65 73 69 7a 65 28 72 65 66 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 Info.Resize(ref.m_textInfo.wordI
2d520 6e 66 6f 2c 20 73 69 7a 65 20 2b 20 31 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nfo,.size.+.1);.................
2d540 20 20 20 20 20 20 20 20 20 20 20 77 6f 72 64 4c 61 73 74 43 68 61 72 20 3d 20 69 3b 0d 0a 0d 0a ...........wordLastChar.=.i;....
2d560 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e ........................m_textIn
2d580 66 6f 2e 77 6f 72 64 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 66 69 72 73 74 43 68 61 72 61 63 74 65 fo.wordInfo[index].firstCharacte
2d5a0 72 49 6e 64 65 78 20 3d 20 77 6f 72 64 46 69 72 73 74 43 68 61 72 3b 0d 0a 20 20 20 20 20 20 20 rIndex.=.wordFirstChar;.........
2d5c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 .................m_textInfo.word
2d5e0 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d Info[index].lastCharacterIndex.=
2d600 20 77 6f 72 64 4c 61 73 74 43 68 61 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .wordLastChar;..................
2d620 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 6e 66 6f 5b 69 6e 64 65 ........m_textInfo.wordInfo[inde
2d640 78 5d 2e 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 77 6f 72 64 4c 61 73 74 43 68 61 72 x].characterCount.=.wordLastChar
2d660 20 2d 20 77 6f 72 64 46 69 72 73 74 43 68 61 72 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 .-.wordFirstChar.+.1;...........
2d680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 6e ...............m_textInfo.wordIn
2d6a0 66 6f 5b 69 6e 64 65 78 5d 2e 74 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 20 3d 20 74 68 69 73 3b 0d fo[index].textComponent.=.this;.
2d6c0 0a 0d 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 77 6f 72 64 43 ...........................wordC
2d6e0 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ount.+=.1;......................
2d700 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a ....m_textInfo.wordCount.+=.1;..
2d720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e ........................m_textIn
2d740 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d 2e 77 6f 72 64 43 6f 75 fo.lineInfo[currentLine].wordCou
2d760 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d nt.+=.1;......................}.
2d780 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .................}..............
2d7a0 20 20 20 20 65 6c 73 65 20 69 66 20 28 69 73 53 74 61 72 74 4f 66 57 6f 72 64 20 7c 7c 20 69 20 ....else.if.(isStartOfWord.||.i.
2d7c0 3d 3d 20 30 20 26 26 20 28 21 63 68 61 72 2e 49 73 50 75 6e 63 74 75 61 74 69 6f 6e 28 63 75 72 ==.0.&&.(!char.IsPunctuation(cur
2d7e0 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 20 7c 7c 20 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 rentCharacter).||.char.IsWhiteSp
2d800 61 63 65 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 20 7c 7c 20 63 75 72 72 65 6e 74 ace(currentCharacter).||.current
2d820 43 68 61 72 61 63 74 65 72 20 3d 3d 20 30 78 32 30 30 42 20 7c 7c 20 69 20 3d 3d 20 6d 5f 63 68 Character.==.0x200B.||.i.==.m_ch
2d840 61 72 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 aracterCount.-.1))..............
2d860 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 ....{......................if.(i
2d880 20 3e 20 30 20 26 26 20 69 20 3c 20 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 2e 4c 65 6e 67 74 .>.0.&&.i.<.characterInfos.Lengt
2d8a0 68 20 2d 20 31 20 26 26 20 69 20 3c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 26 26 h.-.1.&&.i.<.m_characterCount.&&
2d8c0 20 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 3d 20 33 39 20 7c 7c 20 63 75 72 72 .(currentCharacter.==.39.||.curr
2d8e0 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 3d 20 38 32 31 37 29 20 26 26 20 63 68 61 72 2e 49 73 entCharacter.==.8217).&&.char.Is
2d900 4c 65 74 74 65 72 4f 72 44 69 67 69 74 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 20 2d LetterOrDigit(characterInfos[i.-
2d920 20 31 5d 2e 63 68 61 72 61 63 74 65 72 29 20 26 26 20 63 68 61 72 2e 49 73 4c 65 74 74 65 72 4f .1].character).&&.char.IsLetterO
2d940 72 44 69 67 69 74 28 63 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 20 2b 20 31 5d 2e 63 68 61 rDigit(characterInfos[i.+.1].cha
2d960 72 61 63 74 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d racter))......................{.
2d980 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 .......................}........
2d9a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..............else..............
2d9c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........{.......................
2d9e0 20 20 20 77 6f 72 64 4c 61 73 74 43 68 61 72 20 3d 20 69 20 3d 3d 20 6d 5f 63 68 61 72 61 63 74 ...wordLastChar.=.i.==.m_charact
2da00 65 72 43 6f 75 6e 74 20 2d 20 31 20 26 26 20 63 68 61 72 2e 49 73 4c 65 74 74 65 72 4f 72 44 69 erCount.-.1.&&.char.IsLetterOrDi
2da20 67 69 74 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 20 3f 20 69 20 3a 20 69 20 2d 20 git(currentCharacter).?.i.:.i.-.
2da40 31 3b 0d 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 69 73 53 74 1;..........................isSt
2da60 61 72 74 4f 66 57 6f 72 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 artOfWord.=.false;..............
2da80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 73 69 7a 65 20 3d 20 6d 5f 74 65 78 74 49 ..............int.size.=.m_textI
2daa0 6e 66 6f 2e 77 6f 72 64 49 6e 66 6f 2e 4c 65 6e 67 74 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 nfo.wordInfo.Length;............
2dac0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 6e 64 65 78 20 3d 20 6d 5f 74 65 78 74 ..............int.index.=.m_text
2dae0 49 6e 66 6f 2e 77 6f 72 64 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 Info.wordCount;.................
2db00 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 43 6f ...........if.(m_textInfo.wordCo
2db20 75 6e 74 20 2b 20 31 20 3e 20 73 69 7a 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 unt.+.1.>.size).................
2db40 20 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 5f 54 65 78 74 49 6e 66 6f 2e 52 65 73 69 7a 65 .............TMP_TextInfo.Resize
2db60 28 72 65 66 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 6e 66 6f 2c 20 73 69 7a 65 20 2b (ref.m_textInfo.wordInfo,.size.+
2db80 20 31 29 3b 0d 0a 0d 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 .1);............................
2dba0 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 66 69 72 73 74 m_textInfo.wordInfo[index].first
2dbc0 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 77 6f 72 64 46 69 72 73 74 43 68 61 72 3b 0d CharacterIndex.=.wordFirstChar;.
2dbe0 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 6d 5f 74 65 78 74 49 .........................m_textI
2dc00 6e 66 6f 2e 77 6f 72 64 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 6c 61 73 74 43 68 61 72 61 63 74 65 nfo.wordInfo[index].lastCharacte
2dc20 72 49 6e 64 65 78 20 3d 20 77 6f 72 64 4c 61 73 74 43 68 61 72 3b 0d 0a 20 20 20 20 20 20 20 20 rIndex.=.wordLastChar;..........
2dc40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 49 ................m_textInfo.wordI
2dc60 6e 66 6f 5b 69 6e 64 65 78 5d 2e 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 20 77 6f 72 64 nfo[index].characterCount.=.word
2dc80 4c 61 73 74 43 68 61 72 20 2d 20 77 6f 72 64 46 69 72 73 74 43 68 61 72 20 2b 20 31 3b 0d 0a 20 LastChar.-.wordFirstChar.+.1;...
2dca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .......................m_textInf
2dcc0 6f 2e 77 6f 72 64 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 74 65 78 74 43 6f 6d 70 6f 6e 65 6e 74 20 o.wordInfo[index].textComponent.
2dce0 3d 20 74 68 69 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.this;.........................
2dd00 20 20 20 77 6f 72 64 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...wordCount.+=.1;..............
2dd20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 43 6f 75 6e 74 ............m_textInfo.wordCount
2dd40 20 2b 3d 20 31 3b 0d 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 .+=.1;..........................
2dd60 6d 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 49 6e 66 6f 5b 63 75 72 72 65 6e 74 4c 69 6e 65 5d m_textInfo.lineInfo[currentLine]
2dd80 2e 77 6f 72 64 43 6f 75 6e 74 20 2b 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .wordCount.+=.1;................
2dda0 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 ......}..................}......
2ddc0 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 ............#endregion..........
2dde0 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 75 70 20 26 20 48 61 6e 64 6c 65 20 55 6e ............//.Setup.&.Handle.Un
2de00 64 65 72 6c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e derline..................#region
2de20 20 55 6e 64 65 72 6c 69 6e 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e .Underline..................//.N
2de40 4f 54 45 3a 20 4e 65 65 64 20 74 6f 20 66 69 67 75 72 65 20 6f 75 74 20 68 6f 77 20 75 6e 64 65 OTE:.Need.to.figure.out.how.unde
2de60 72 6c 69 6e 65 20 77 69 6c 6c 20 62 65 20 68 61 6e 64 6c 65 64 20 77 69 74 68 20 6d 75 6c 74 69 rline.will.be.handled.with.multi
2de80 70 6c 65 20 66 6f 6e 74 73 20 61 6e 64 20 77 68 69 63 68 20 66 6f 6e 74 20 77 69 6c 6c 20 62 65 ple.fonts.and.which.font.will.be
2dea0 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 75 6e 64 65 72 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 .used.for.the.underline.........
2dec0 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 55 6e 64 65 72 6c 69 6e 65 20 3d 20 28 6d 5f ..........bool.isUnderline.=.(m_
2dee0 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 74 79 6c 65 20 textInfo.characterInfo[i].style.
2df00 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 55 6e 64 65 72 6c 69 6e 65 29 20 3d 3d 20 46 6f 6e 74 53 &.FontStyles.Underline).==.FontS
2df20 74 79 6c 65 73 2e 55 6e 64 65 72 6c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tyles.Underline;................
2df40 20 20 69 66 20 28 69 73 55 6e 64 65 72 6c 69 6e 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..if.(isUnderline)..............
2df60 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 ....{......................bool.
2df80 69 73 55 6e 64 65 72 6c 69 6e 65 56 69 73 69 62 6c 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 isUnderlineVisible.=.true;......
2dfa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 63 75 72 72 65 6e 74 50 61 67 65 20 ................int.currentPage.
2dfc0 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 70 61 =.m_textInfo.characterInfo[i].pa
2dfe0 67 65 4e 75 6d 62 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 geNumber;.......................
2e000 20 69 66 20 28 69 20 3e 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 73 20 .if.(i.>.m_maxVisibleCharacters.
2e020 7c 7c 20 63 75 72 72 65 6e 74 4c 69 6e 65 20 3e 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 4c 69 6e ||.currentLine.>.m_maxVisibleLin
2e040 65 73 20 7c 7c 20 28 6d 5f 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 20 3d 3d 20 54 65 78 74 4f 76 65 es.||.(m_overflowMode.==.TextOve
2e060 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 20 26 26 20 63 75 72 72 65 6e 74 50 61 67 65 20 2b rflowModes.Page.&&.currentPage.+
2e080 20 31 20 21 3d 20 6d 5f 70 61 67 65 54 6f 44 69 73 70 6c 61 79 29 29 0d 0a 20 20 20 20 20 20 20 .1.!=.m_pageToDisplay)).........
2e0a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 55 6e 64 65 72 6c 69 6e 65 56 69 73 69 .................isUnderlineVisi
2e0c0 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ble.=.false;....................
2e0e0 20 20 20 20 2f 2f 20 57 65 20 6f 6e 6c 79 20 75 73 65 20 74 68 65 20 73 63 61 6c 65 20 6f 66 20 ....//.We.only.use.the.scale.of.
2e100 76 69 73 69 62 6c 65 20 63 68 61 72 61 63 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 visible.characters..............
2e120 20 20 20 20 20 20 20 20 20 69 66 20 28 21 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 .........if.(!char.IsWhiteSpace(
2e140 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 20 26 26 20 63 75 72 72 65 6e 74 43 68 61 72 currentCharacter).&&.currentChar
2e160 61 63 74 65 72 20 21 3d 20 30 78 32 30 30 42 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 acter.!=.0x200B)................
2e180 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......{.........................
2e1a0 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 20 3d 20 4d 61 74 68 66 2e 4d 61 78 28 75 .underlineMaxScale.=.Mathf.Max(u
2e1c0 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 nderlineMaxScale,.m_textInfo.cha
2e1e0 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 63 61 6c 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 racterInfo[i].scale);...........
2e200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 78 53 63 61 6c 65 4d 61 78 20 3d 20 4d 61 74 68 66 ...............xScaleMax.=.Mathf
2e220 2e 4d 61 78 28 78 53 63 61 6c 65 4d 61 78 2c 20 4d 61 74 68 66 2e 41 62 73 28 78 53 63 61 6c 65 .Max(xScaleMax,.Mathf.Abs(xScale
2e240 29 29 3b 0d 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 75 6e 64 ));..........................und
2e260 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d 20 4d 61 74 68 66 2e 4d 69 6e 28 63 75 72 72 65 erlineBaseLine.=.Mathf.Min(curre
2e280 6e 74 50 61 67 65 20 3d 3d 20 6c 61 73 74 50 61 67 65 20 3f 20 75 6e 64 65 72 6c 69 6e 65 42 61 ntPage.==.lastPage.?.underlineBa
2e2a0 73 65 4c 69 6e 65 20 3a 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 76 65 46 6c 6f 61 74 2c 20 6d seLine.:.k_LargePositiveFloat,.m
2e2c0 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c _textInfo.characterInfo[i].baseL
2e2e0 69 6e 65 20 2b 20 66 6f 6e 74 2e 66 61 63 65 49 6e 66 6f 2e 75 6e 64 65 72 6c 69 6e 65 4f 66 66 ine.+.font.faceInfo.underlineOff
2e300 73 65 74 20 2a 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 29 3b 0d 0a 20 20 20 20 20 set.*.underlineMaxScale);.......
2e320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 73 74 50 61 67 65 20 3d 20 63 75 ...................lastPage.=.cu
2e340 72 72 65 6e 74 50 61 67 65 3b 20 2f 2f 20 4e 65 65 64 20 74 6f 20 74 72 61 63 6b 20 70 61 67 65 rrentPage;.//.Need.to.track.page
2e360 73 20 74 6f 20 65 6e 73 75 72 65 20 77 65 20 72 65 73 65 74 20 62 61 73 65 6c 69 6e 65 20 66 6f s.to.ensure.we.reset.baseline.fo
2e380 72 20 74 68 65 20 6e 65 77 20 70 61 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r.the.new.pages.................
2e3a0 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 ......}........................i
2e3c0 66 20 28 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 3d 3d 20 66 61 6c 73 65 20 26 26 20 69 73 f.(beginUnderline.==.false.&&.is
2e3e0 55 6e 64 65 72 6c 69 6e 65 56 69 73 69 62 6c 65 20 3d 3d 20 74 72 75 65 20 26 26 20 69 20 3c 3d UnderlineVisible.==.true.&&.i.<=
2e400 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e .lineInfo.lastVisibleCharacterIn
2e420 64 65 78 20 26 26 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 21 3d 20 31 30 20 26 26 dex.&&.currentCharacter.!=.10.&&
2e440 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 21 3d 20 31 33 29 0d 0a 20 20 20 20 20 20 .currentCharacter.!=.13)........
2e460 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
2e480 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3d 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 .........if.(i.==.lineInfo.lastV
2e4a0 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 26 26 20 63 68 61 72 2e 49 73 53 isibleCharacterIndex.&&.char.IsS
2e4c0 65 70 61 72 61 74 6f 72 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 29 0d 0a 20 20 20 eparator(currentCharacter)).....
2e4e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 7d 0d 0a 20 20 20 20 20 20 .....................{.}........
2e500 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 ..................else..........
2e520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
2e540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 3d 20 ...............beginUnderline.=.
2e560 74 72 75 65 3b 0d 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 true;...........................
2e580 20 20 20 75 6e 64 65 72 6c 69 6e 65 53 74 61 72 74 53 63 61 6c 65 20 3d 20 6d 5f 74 65 78 74 49 ...underlineStartScale.=.m_textI
2e5a0 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 63 61 6c 65 3b 0d 0a 20 20 20 nfo.characterInfo[i].scale;.....
2e5c0 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 69 66 20 28 75 6e 64 .........................if.(und
2e5e0 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 erlineMaxScale.==.0)............
2e600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
2e620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 4d 61 .....................underlineMa
2e640 78 53 63 61 6c 65 20 3d 20 75 6e 64 65 72 6c 69 6e 65 53 74 61 72 74 53 63 61 6c 65 3b 0d 0a 20 xScale.=.underlineStartScale;...
2e660 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 20 20 20 20 78 ...............................x
2e680 53 63 61 6c 65 4d 61 78 20 3d 20 78 53 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ScaleMax.=.xScale;..............
2e6a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................}...............
2e6c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 5f 73 74 61 72 74 20 3d ...............underline_start.=
2e6e0 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .new.Vector3(m_textInfo.characte
2e700 72 49 6e 66 6f 5b 69 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 2c 20 75 6e 64 65 72 6c 69 6e 65 rInfo[i].bottomLeft.x,.underline
2e720 42 61 73 65 4c 69 6e 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 BaseLine,.0);...................
2e740 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 20 3d 20 6d 5f 74 65 ...........underlineColor.=.m_te
2e760 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 75 6e 64 65 72 6c 69 6e xtInfo.characterInfo[i].underlin
2e780 65 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eColor;.........................
2e7a0 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 .}......................}.......
2e7c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 64 20 55 6e 64 65 72 6c 69 6e .................//.End.Underlin
2e7e0 65 20 69 66 20 74 65 78 74 20 6f 6e 6c 79 20 63 6f 6e 74 61 69 6e 73 20 6f 6e 65 20 63 68 61 72 e.if.text.only.contains.one.char
2e800 61 63 74 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 acter.......................if.(
2e820 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 26 26 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 beginUnderline.&&.m_characterCou
2e840 6e 74 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d nt.==.1)......................{.
2e860 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 62 65 67 69 6e 55 6e .........................beginUn
2e880 64 65 72 6c 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 derline.=.false;................
2e8a0 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 ..........underline_end.=.new.Ve
2e8c0 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 ctor3(m_textInfo.characterInfo[i
2e8e0 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 2c ].topRight.x,.underlineBaseLine,
2e900 20 30 29 3b 0d 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 75 6e .0);..........................un
2e920 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 derlineEndScale.=.m_textInfo.cha
2e940 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 63 61 6c 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 racterInfo[i].scale;............
2e960 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 55 6e 64 65 72 6c 69 6e 65 4d 65 73 ................DrawUnderlineMes
2e980 68 28 75 6e 64 65 72 6c 69 6e 65 5f 73 74 61 72 74 2c 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 h(underline_start,.underline_end
2e9a0 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 75 6e 64 65 72 6c 69 6e 65 ,.ref.last_vert_index,.underline
2e9c0 53 74 61 72 74 53 63 61 6c 65 2c 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 2c 20 75 StartScale,.underlineEndScale,.u
2e9e0 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 4d 61 78 2c 20 75 6e 64 nderlineMaxScale,.xScaleMax,.und
2ea00 65 72 6c 69 6e 65 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erlineColor);...................
2ea20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 20 3d 20 30 3b 0d 0a 20 .......underlineMaxScale.=.0;...
2ea40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 78 53 63 61 6c 65 4d 61 78 .......................xScaleMax
2ea60 20 3d 20 30 3b 0d 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 75 .=.0;..........................u
2ea80 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 nderlineBaseLine.=.k_LargePositi
2eaa0 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d veFloat;......................}.
2eac0 0a 20 20 20 20 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 62 65 .....................else.if.(be
2eae0 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 26 26 20 28 69 20 3d 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c ginUnderline.&&.(i.==.lineInfo.l
2eb00 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 7c 7c 20 69 20 3e 3d 20 6c 69 6e 65 49 6e astCharacterIndex.||.i.>=.lineIn
2eb20 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 29 29 0d 0a fo.lastVisibleCharacterIndex))..
2eb40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 ....................{...........
2eb60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 65 72 6d 69 6e 61 74 65 20 75 6e 64 65 ...............//.Terminate.unde
2eb80 72 6c 69 6e 65 20 61 74 20 70 72 65 76 69 6f 75 73 20 76 69 73 69 62 6c 65 20 63 68 61 72 61 63 rline.at.previous.visible.charac
2eba0 74 65 72 20 69 66 20 73 70 61 63 65 20 6f 72 20 63 61 72 72 69 61 67 65 20 72 65 74 75 72 6e 2e ter.if.space.or.carriage.return.
2ebc0 0d 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 69 66 20 28 63 68 ..........................if.(ch
2ebe0 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 ar.IsWhiteSpace(currentCharacter
2ec00 29 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d 3d 20 30 78 32 30 30 42 29 ).||.currentCharacter.==.0x200B)
2ec20 0d 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 7b 0d 0a 20 20 20 ..........................{.....
2ec40 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 69 6e 74 20 6c 61 73 .........................int.las
2ec60 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 3d 20 6c 69 6e 65 49 6e 66 tVisibleCharacterIndex.=.lineInf
2ec80 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 3b 0d 0a 20 20 o.lastVisibleCharacterIndex;....
2eca0 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 75 6e 64 65 72 6c ..........................underl
2ecc0 69 6e 65 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f ine_end.=.new.Vector3(m_textInfo
2ece0 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 .characterInfo[lastVisibleCharac
2ed00 74 65 72 49 6e 64 65 78 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 75 6e 64 65 72 6c 69 6e 65 42 terIndex].topRight.x,.underlineB
2ed20 61 73 65 4c 69 6e 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aseLine,.0);....................
2ed40 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 20 3d 20 6d 5f ..........underlineEndScale.=.m_
2ed60 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6c 61 73 74 56 69 73 69 62 textInfo.characterInfo[lastVisib
2ed80 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 73 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 leCharacterIndex].scale;........
2eda0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................}.............
2edc0 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 .............else...............
2ede0 20 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 2f 2f 20 45 6e 64 20 75 6e 64 65 72 6c 69 6e 65 20 ...........{...//.End.underline.
2ee00 69 66 20 6c 61 73 74 20 63 68 61 72 61 63 74 65 72 20 6f 66 20 74 68 65 20 6c 69 6e 65 2e 0d 0a if.last.character.of.the.line...
2ee20 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 20 75 6e 64 65 ............................unde
2ee40 72 6c 69 6e 65 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e rline_end.=.new.Vector3(m_textIn
2ee60 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 fo.characterInfo[i].topRight.x,.
2ee80 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 underlineBaseLine,.0);..........
2eea0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 ....................underlineEnd
2eec0 53 63 61 6c 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f Scale.=.m_textInfo.characterInfo
2eee0 5b 69 5d 2e 73 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 [i].scale;......................
2ef00 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....}...........................
2ef20 20 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 .beginUnderline.=.false;........
2ef40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 55 6e 64 65 72 6c 69 6e 65 4d ..................DrawUnderlineM
2ef60 65 73 68 28 75 6e 64 65 72 6c 69 6e 65 5f 73 74 61 72 74 2c 20 75 6e 64 65 72 6c 69 6e 65 5f 65 esh(underline_start,.underline_e
2ef80 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 75 6e 64 65 72 6c 69 nd,.ref.last_vert_index,.underli
2efa0 6e 65 53 74 61 72 74 53 63 61 6c 65 2c 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 2c neStartScale,.underlineEndScale,
2efc0 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 4d 61 78 2c 20 75 .underlineMaxScale,.xScaleMax,.u
2efe0 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nderlineColor);.................
2f000 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 20 3d 20 30 3b 0d .........underlineMaxScale.=.0;.
2f020 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 78 53 63 61 6c 65 4d .........................xScaleM
2f040 61 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ax.=.0;.........................
2f060 20 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 .underlineBaseLine.=.k_LargePosi
2f080 74 69 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tiveFloat;......................
2f0a0 7d 0d 0a 20 20 20 20 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 }......................else.if.(
2f0c0 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 26 26 20 21 69 73 55 6e 64 65 72 6c 69 6e 65 56 69 beginUnderline.&&.!isUnderlineVi
2f0e0 73 69 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 sible)......................{...
2f100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 55 6e 64 65 .......................beginUnde
2f120 72 6c 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rline.=.false;..................
2f140 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 ........underline_end.=.new.Vect
2f160 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 20 2d or3(m_textInfo.characterInfo[i.-
2f180 20 31 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e .1].topRight.x,.underlineBaseLin
2f1a0 65 2c 20 30 29 3b 0d 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 e,.0);..........................
2f1c0 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 underlineEndScale.=.m_textInfo.c
2f1e0 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 20 2d 20 31 5d 2e 73 63 61 6c 65 3b 0d 0a 0d 0a 20 20 haracterInfo[i.-.1].scale;......
2f200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 55 6e 64 65 72 6c ......................DrawUnderl
2f220 69 6e 65 4d 65 73 68 28 75 6e 64 65 72 6c 69 6e 65 5f 73 74 61 72 74 2c 20 75 6e 64 65 72 6c 69 ineMesh(underline_start,.underli
2f240 6e 65 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 75 6e 64 ne_end,.ref.last_vert_index,.und
2f260 65 72 6c 69 6e 65 53 74 61 72 74 53 63 61 6c 65 2c 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 erlineStartScale,.underlineEndSc
2f280 61 6c 65 2c 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 4d 61 ale,.underlineMaxScale,.xScaleMa
2f2a0 78 2c 20 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 x,.underlineColor);.............
2f2c0 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 20 3d .............underlineMaxScale.=
2f2e0 20 30 3b 0d 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 78 53 63 .0;..........................xSc
2f300 61 6c 65 4d 61 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aleMax.=.0;.....................
2f320 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d 20 6b 5f 4c 61 72 67 65 .....underlineBaseLine.=.k_Large
2f340 50 6f 73 69 74 69 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 PositiveFloat;..................
2f360 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 ....}......................else.
2f380 69 66 20 28 62 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 26 26 20 69 20 3c 20 6d 5f 63 68 61 72 if.(beginUnderline.&&.i.<.m_char
2f3a0 61 63 74 65 72 43 6f 75 6e 74 20 2d 20 31 20 26 26 20 21 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f acterCount.-.1.&&.!underlineColo
2f3c0 72 2e 43 6f 6d 70 61 72 65 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e r.Compare(m_textInfo.characterIn
2f3e0 66 6f 5b 69 20 2b 20 31 5d 2e 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 29 29 0d 0a 20 20 20 20 fo[i.+.1].underlineColor))......
2f400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
2f420 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 64 20 75 6e 64 65 72 6c 69 6e 65 20 69 66 20 75 ...........//.End.underline.if.u
2f440 6e 64 65 72 6c 69 6e 65 20 63 6f 6c 6f 72 20 68 61 73 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 nderline.color.has.changed......
2f460 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 55 6e 64 65 72 6c .....................beginUnderl
2f480 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ine.=.false;....................
2f4a0 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 ......underline_end.=.new.Vector
2f4c0 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 3(m_textInfo.characterInfo[i].to
2f4e0 70 52 69 67 68 74 2e 78 2c 20 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 2c 20 30 29 3b pRight.x,.underlineBaseLine,.0);
2f500 0d 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 75 6e 64 65 72 6c ..........................underl
2f520 69 6e 65 45 6e 64 53 63 61 6c 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 ineEndScale.=.m_textInfo.charact
2f540 65 72 49 6e 66 6f 5b 69 5d 2e 73 63 61 6c 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 erInfo[i].scale;................
2f560 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 55 6e 64 65 72 6c 69 6e 65 4d 65 73 68 28 75 6e ............DrawUnderlineMesh(un
2f580 64 65 72 6c 69 6e 65 5f 73 74 61 72 74 2c 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 2c 20 72 65 derline_start,.underline_end,.re
2f5a0 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 75 6e 64 65 72 6c 69 6e 65 53 74 61 72 f.last_vert_index,.underlineStar
2f5c0 74 53 63 61 6c 65 2c 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 2c 20 75 6e 64 65 72 tScale,.underlineEndScale,.under
2f5e0 6c 69 6e 65 4d 61 78 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 4d 61 78 2c 20 75 6e 64 65 72 6c 69 lineMaxScale,.xScaleMax,.underli
2f600 6e 65 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 neColor);.......................
2f620 20 20 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 ...underlineMaxScale.=.0;.......
2f640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 78 53 63 61 6c 65 4d 61 78 20 3d 20 30 ...................xScaleMax.=.0
2f660 3b 0d 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 75 6e 64 65 72 ;..........................under
2f680 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 76 65 46 6c lineBaseLine.=.k_LargePositiveFl
2f6a0 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 oat;......................}.....
2f6c0 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............}..................
2f6e0 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 else..................{.........
2f700 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 64 20 55 6e 64 65 72 6c 69 6e 65 0d 0a 20 .............//.End.Underline...
2f720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 65 67 69 6e 55 6e 64 65 ...................if.(beginUnde
2f740 72 6c 69 6e 65 20 3d 3d 20 74 72 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rline.==.true)..................
2f760 20 20 20 20 7b 0d 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 62 ....{..........................b
2f780 65 67 69 6e 55 6e 64 65 72 6c 69 6e 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 eginUnderline.=.false;..........
2f7a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 20 3d 20 ................underline_end.=.
2f7c0 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 new.Vector3(m_textInfo.character
2f7e0 49 6e 66 6f 5b 69 20 2d 20 31 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 75 6e 64 65 72 6c 69 6e Info[i.-.1].topRight.x,.underlin
2f800 65 42 61 73 65 4c 69 6e 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eBaseLine,.0);..................
2f820 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 45 6e 64 53 63 61 6c 65 20 3d 20 6d 5f 74 65 ........underlineEndScale.=.m_te
2f840 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 20 2d 20 31 5d 2e 73 63 61 6c xtInfo.characterInfo[i.-.1].scal
2f860 65 3b 0d 0a 0d 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 44 72 e;............................Dr
2f880 61 77 55 6e 64 65 72 6c 69 6e 65 4d 65 73 68 28 75 6e 64 65 72 6c 69 6e 65 5f 73 74 61 72 74 2c awUnderlineMesh(underline_start,
2f8a0 20 75 6e 64 65 72 6c 69 6e 65 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e .underline_end,.ref.last_vert_in
2f8c0 64 65 78 2c 20 75 6e 64 65 72 6c 69 6e 65 53 74 61 72 74 53 63 61 6c 65 2c 20 75 6e 64 65 72 6c dex,.underlineStartScale,.underl
2f8e0 69 6e 65 45 6e 64 53 63 61 6c 65 2c 20 75 6e 64 65 72 6c 69 6e 65 4d 61 78 53 63 61 6c 65 2c 20 ineEndScale,.underlineMaxScale,.
2f900 78 53 63 61 6c 65 4d 61 78 2c 20 75 6e 64 65 72 6c 69 6e 65 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 xScaleMax,.underlineColor);.....
2f920 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 4d 61 .....................underlineMa
2f940 78 53 63 61 6c 65 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 xScale.=.0;.....................
2f960 20 20 20 20 20 78 53 63 61 6c 65 4d 61 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .....xScaleMax.=.0;.............
2f980 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 64 65 72 6c 69 6e 65 42 61 73 65 4c 69 6e 65 20 3d .............underlineBaseLine.=
2f9a0 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 76 65 46 6c 6f 61 74 3b 0d 0a 20 20 20 20 20 20 20 20 .k_LargePositiveFloat;..........
2f9c0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d ............}..................}
2f9e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a ..................#endregion....
2fa00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 74 75 70 20 26 20 48 61 6e ..................//.Setup.&.Han
2fa20 64 6c 65 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 dle.Strikethrough...............
2fa40 20 20 20 23 72 65 67 69 6f 6e 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 0d 0a 20 20 20 20 20 20 ...#region.Strikethrough........
2fa60 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 4e 65 65 64 20 74 6f 20 66 69 67 75 72 ..........//.NOTE:.Need.to.figur
2fa80 65 20 6f 75 74 20 68 6f 77 20 75 6e 64 65 72 6c 69 6e 65 20 77 69 6c 6c 20 62 65 20 68 61 6e 64 e.out.how.underline.will.be.hand
2faa0 6c 65 64 20 77 69 74 68 20 6d 75 6c 74 69 70 6c 65 20 66 6f 6e 74 73 20 61 6e 64 20 77 68 69 63 led.with.multiple.fonts.and.whic
2fac0 68 20 66 6f 6e 74 20 77 69 6c 6c 20 62 65 20 75 73 65 64 20 66 6f 72 20 74 68 65 20 75 6e 64 65 h.font.will.be.used.for.the.unde
2fae0 72 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 53 rline...................bool.isS
2fb00 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 trikethrough.=.(m_textInfo.chara
2fb20 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 74 79 6c 65 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 53 cterInfo[i].style.&.FontStyles.S
2fb40 74 72 69 6b 65 74 68 72 6f 75 67 68 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 53 74 72 69 trikethrough).==.FontStyles.Stri
2fb60 6b 65 74 68 72 6f 75 67 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 6f 61 kethrough;..................floa
2fb80 74 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 3d 20 63 75 72 72 65 6e 74 46 t.strikethroughOffset.=.currentF
2fba0 6f 6e 74 41 73 73 65 74 2e 66 61 63 65 49 6e 66 6f 2e 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f ontAsset.faceInfo.strikethroughO
2fbc0 66 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 ffset;....................if.(is
2fbe0 53 74 72 69 6b 65 74 68 72 6f 75 67 68 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Strikethrough)..................
2fc00 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 53 74 {......................bool.isSt
2fc20 72 69 6b 65 54 68 72 6f 75 67 68 56 69 73 69 62 6c 65 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 rikeThroughVisible.=.true;......
2fc40 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 6d 5f 6d 61 78 56 ..................if.(i.>.m_maxV
2fc60 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 73 20 7c 7c 20 63 75 72 72 65 6e 74 4c 69 6e 65 20 isibleCharacters.||.currentLine.
2fc80 3e 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 4c 69 6e 65 73 20 7c 7c 20 28 6d 5f 6f 76 65 72 66 6c >.m_maxVisibleLines.||.(m_overfl
2fca0 6f 77 4d 6f 64 65 20 3d 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 owMode.==.TextOverflowModes.Page
2fcc0 20 26 26 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e .&&.m_textInfo.characterInfo[i].
2fce0 70 61 67 65 4e 75 6d 62 65 72 20 2b 20 31 20 21 3d 20 6d 5f 70 61 67 65 54 6f 44 69 73 70 6c 61 pageNumber.+.1.!=.m_pageToDispla
2fd00 79 29 29 0d 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 69 73 53 y))..........................isS
2fd20 74 72 69 6b 65 54 68 72 6f 75 67 68 56 69 73 69 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a trikeThroughVisible.=.false;....
2fd40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 65 67 69 6e 53 74 72 ....................if.(beginStr
2fd60 69 6b 65 74 68 72 6f 75 67 68 20 3d 3d 20 66 61 6c 73 65 20 26 26 20 69 73 53 74 72 69 6b 65 54 ikethrough.==.false.&&.isStrikeT
2fd80 68 72 6f 75 67 68 56 69 73 69 62 6c 65 20 26 26 20 69 20 3c 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c hroughVisible.&&.i.<=.lineInfo.l
2fda0 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 26 26 20 63 75 72 72 astVisibleCharacterIndex.&&.curr
2fdc0 65 6e 74 43 68 61 72 61 63 74 65 72 20 21 3d 20 31 30 20 26 26 20 63 75 72 72 65 6e 74 43 68 61 entCharacter.!=.10.&&.currentCha
2fde0 72 61 63 74 65 72 20 21 3d 20 31 33 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 racter.!=.13)...................
2fe00 20 20 20 7b 0d 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 69 66 ...{..........................if
2fe20 20 28 69 20 3d 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 .(i.==.lineInfo.lastVisibleChara
2fe40 63 74 65 72 49 6e 64 65 78 20 26 26 20 63 68 61 72 2e 49 73 53 65 70 61 72 61 74 6f 72 28 63 75 cterIndex.&&.char.IsSeparator(cu
2fe60 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rrentCharacter))................
2fe80 20 20 20 20 20 20 20 20 20 20 7b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.}...................
2fea0 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......else.....................
2fec0 20 20 20 20 20 7b 0d 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 .....{..........................
2fee0 20 20 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 74 72 75 65 3b 0d 0a ....beginStrikethrough.=.true;..
2ff00 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 20 73 74 72 69 ............................stri
2ff20 6b 65 74 68 72 6f 75 67 68 50 6f 69 6e 74 53 69 7a 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e kethroughPointSize.=.m_textInfo.
2ff40 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 70 6f 69 6e 74 53 69 7a 65 3b 0d 0a 20 20 20 characterInfo[i].pointSize;.....
2ff60 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 73 74 72 69 6b 65 74 .........................striket
2ff80 68 72 6f 75 67 68 53 63 61 6c 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 hroughScale.=.m_textInfo.charact
2ffa0 65 72 49 6e 66 6f 5b 69 5d 2e 73 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 erInfo[i].scale;................
2ffc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 ..............strikethrough_star
2ffe0 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 t.=.new.Vector3(m_textInfo.chara
30000 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 2c 20 6d 5f 74 65 78 74 cterInfo[i].bottomLeft.x,.m_text
30020 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c 69 6e 65 20 2b Info.characterInfo[i].baseLine.+
30040 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 2a 20 73 74 72 69 6b 65 74 68 72 .strikethroughOffset.*.strikethr
30060 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 oughScale,.0);..................
30080 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 20 3d ............strikethroughColor.=
300a0 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 74 72 .m_textInfo.characterInfo[i].str
300c0 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ikethroughColor;................
300e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 42 61 73 65 6c ..............strikethroughBasel
30100 69 6e 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 ine.=.m_textInfo.characterInfo[i
30120 5d 2e 62 61 73 65 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ].baseLine;.....................
30140 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 43 68 61 72 20 5b 22 20 2b 20 .........//Debug.Log("Char.[".+.
30160 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 2b 20 22 5d 20 53 74 61 72 74 20 53 74 72 69 currentCharacter.+."].Start.Stri
30180 6b 65 74 68 72 6f 75 67 68 20 50 4f 53 3a 20 22 20 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 kethrough.POS:.".+.strikethrough
301a0 5f 73 74 61 72 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 _start);........................
301c0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ..}......................}......
301e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 64 20 53 74 72 69 6b 65 74 ..................//.End.Striket
30200 68 72 6f 75 67 68 20 69 66 20 74 65 78 74 20 6f 6e 6c 79 20 63 6f 6e 74 61 69 6e 73 20 6f 6e 65 hrough.if.text.only.contains.one
30220 20 63 68 61 72 61 63 74 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .character......................
30240 20 69 66 20 28 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 26 26 20 6d 5f 63 68 61 .if.(beginStrikethrough.&&.m_cha
30260 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 racterCount.==.1)...............
30280 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......{........................
302a0 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 ..beginStrikethrough.=.false;...
302c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6b 65 74 68 72 .......................strikethr
302e0 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 ough_end.=.new.Vector3(m_textInf
30300 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d o.characterInfo[i].topRight.x,.m
30320 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c _textInfo.characterInfo[i].baseL
30340 69 6e 65 20 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 2a 20 73 74 72 69 ine.+.strikethroughOffset.*.stri
30360 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 kethroughScale,.0);.............
30380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 55 6e 64 65 72 6c 69 6e 65 4d 65 73 68 ...............DrawUnderlineMesh
303a0 28 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 74 2c 20 73 74 72 69 6b 65 74 68 72 6f (strikethrough_start,.strikethro
303c0 75 67 68 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 73 74 ugh_end,.ref.last_vert_index,.st
303e0 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 rikethroughScale,.strikethroughS
30400 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 cale,.strikethroughScale,.xScale
30420 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 ,.strikethroughColor);..........
30440 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............}...................
30460 20 20 20 65 6c 73 65 20 69 66 20 28 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 26 ...else.if.(beginStrikethrough.&
30480 26 20 69 20 3d 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 &.i.==.lineInfo.lastCharacterInd
304a0 65 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 ex)......................{......
304c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 65 72 6d 69 6e 61 74 65 ....................//.Terminate
304e0 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 61 74 20 70 72 65 76 69 6f 75 73 20 76 69 73 69 62 .Strikethrough.at.previous.visib
30500 6c 65 20 63 68 61 72 61 63 74 65 72 20 69 66 20 73 70 61 63 65 20 6f 72 20 63 61 72 72 69 61 67 le.character.if.space.or.carriag
30520 65 20 72 65 74 75 72 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e.return........................
30540 20 20 20 69 66 20 28 63 68 61 72 2e 49 73 57 68 69 74 65 53 70 61 63 65 28 63 75 72 72 65 6e 74 ...if.(char.IsWhiteSpace(current
30560 43 68 61 72 61 63 74 65 72 29 20 7c 7c 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 20 3d Character).||.currentCharacter.=
30580 3d 20 30 78 32 30 30 42 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.0x200B).......................
305a0 20 20 20 7b 0d 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 ...{............................
305c0 20 20 69 6e 74 20 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 ..int.lastVisibleCharacterIndex.
305e0 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 =.lineInfo.lastVisibleCharacterI
30600 6e 64 65 78 3b 0d 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 ndex;...........................
30620 20 20 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f ...strikethrough_end.=.new.Vecto
30640 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6c 61 73 74 r3(m_textInfo.characterInfo[last
30660 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 74 6f 70 52 69 67 68 74 2e VisibleCharacterIndex].topRight.
30680 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6c 61 73 74 x,.m_textInfo.characterInfo[last
306a0 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 62 61 73 65 4c 69 6e 65 20 VisibleCharacterIndex].baseLine.
306c0 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 2a 20 73 74 72 69 6b 65 74 68 +.strikethroughOffset.*.striketh
306e0 72 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 roughScale,.0);.................
30700 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........}......................
30720 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....else........................
30740 20 20 7b 0d 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 20 ..{.............................
30760 20 2f 2f 20 54 65 72 6d 69 6e 61 74 65 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 61 74 20 6c .//.Terminate.Strikethrough.at.l
30780 61 73 74 20 63 68 61 72 61 63 74 65 72 20 6f 66 20 6c 69 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 ast.character.of.line...........
307a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 69 6b 65 74 68 72 6f 75 67 ....................strikethroug
307c0 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 h_end.=.new.Vector3(m_textInfo.c
307e0 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d 5f 74 65 haracterInfo[i].topRight.x,.m_te
30800 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c 69 6e 65 xtInfo.characterInfo[i].baseLine
30820 20 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 2a 20 73 74 72 69 6b 65 74 .+.strikethroughOffset.*.striket
30840 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hroughScale,.0);................
30860 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........}.....................
30880 20 20 20 20 20 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 66 61 6c 73 .......beginStrikethrough.=.fals
308a0 65 3b 0d 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 44 72 61 77 e;..........................Draw
308c0 55 6e 64 65 72 6c 69 6e 65 4d 65 73 68 28 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 UnderlineMesh(strikethrough_star
308e0 74 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 t,.strikethrough_end,.ref.last_v
30900 65 72 74 5f 69 6e 64 65 78 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 ert_index,.strikethroughScale,.s
30920 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 trikethroughScale,.strikethrough
30940 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f Scale,.xScale,.strikethroughColo
30960 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 r);......................}......
30980 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 62 65 67 69 6e 53 74 ................else.if.(beginSt
309a0 72 69 6b 65 74 68 72 6f 75 67 68 20 26 26 20 69 20 3c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f rikethrough.&&.i.<.m_characterCo
309c0 75 6e 74 20 26 26 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f unt.&&.(m_textInfo.characterInfo
309e0 5b 69 20 2b 20 31 5d 2e 70 6f 69 6e 74 53 69 7a 65 20 21 3d 20 73 74 72 69 6b 65 74 68 72 6f 75 [i.+.1].pointSize.!=.strikethrou
30a00 67 68 50 6f 69 6e 74 53 69 7a 65 20 7c 7c 20 21 54 4d 50 5f 4d 61 74 68 2e 41 70 70 72 6f 78 69 ghPointSize.||.!TMP_Math.Approxi
30a20 6d 61 74 65 6c 79 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b mately(m_textInfo.characterInfo[
30a40 69 20 2b 20 31 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 20 6f 66 66 73 65 74 2e 79 2c 20 73 74 72 69 i.+.1].baseLine.+.offset.y,.stri
30a60 6b 65 74 68 72 6f 75 67 68 42 61 73 65 6c 69 6e 65 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 kethroughBaseline)))............
30a80 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
30aa0 20 20 20 20 20 2f 2f 20 54 65 72 6d 69 6e 61 74 65 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 .....//.Terminate.Strikethrough.
30ac0 69 66 20 73 63 61 6c 65 20 63 68 61 6e 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 if.scale.changes................
30ae0 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 ...........beginStrikethrough.=.
30b00 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 false;..........................
30b20 20 20 69 6e 74 20 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 ..int.lastVisibleCharacterIndex.
30b40 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 =.lineInfo.lastVisibleCharacterI
30b60 6e 64 65 78 3b 0d 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 69 ndex;..........................i
30b80 66 20 28 69 20 3e 20 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 f.(i.>.lastVisibleCharacterIndex
30ba0 29 0d 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 20 20 73 )..............................s
30bc0 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d trikethrough_end.=.new.Vector3(m
30be0 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6c 61 73 74 56 69 73 69 _textInfo.characterInfo[lastVisi
30c00 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d bleCharacterIndex].topRight.x,.m
30c20 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 6c 61 73 74 56 69 73 69 _textInfo.characterInfo[lastVisi
30c40 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 20 73 74 bleCharacterIndex].baseLine.+.st
30c60 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 65 74 20 2a 20 73 74 72 69 6b 65 74 68 72 6f 75 67 rikethroughOffset.*.strikethroug
30c80 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 hScale,.0);.....................
30ca0 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....else.......................
30cc0 20 20 20 20 20 20 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 .......strikethrough_end.=.new.V
30ce0 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b ector3(m_textInfo.characterInfo[
30d00 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 i].topRight.x,.m_textInfo.charac
30d20 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 20 73 74 72 69 6b 65 74 68 72 6f terInfo[i].baseLine.+.strikethro
30d40 75 67 68 4f 66 66 73 65 74 20 2a 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 ughOffset.*.strikethroughScale,.
30d60 30 29 3b 0d 0a 0d 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 44 0);............................D
30d80 72 61 77 55 6e 64 65 72 6c 69 6e 65 4d 65 73 68 28 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 rawUnderlineMesh(strikethrough_s
30da0 74 61 72 74 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 tart,.strikethrough_end,.ref.las
30dc0 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 t_vert_index,.strikethroughScale
30de0 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f ,.strikethroughScale,.strikethro
30e00 75 67 68 53 63 61 6c 65 2c 20 78 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 ughScale,.xScale,.strikethroughC
30e20 6f 6c 6f 72 29 3b 0d 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 olor);..........................
30e40 2f 2f 44 65 62 75 67 2e 4c 6f 67 28 22 43 68 61 72 20 5b 22 20 2b 20 63 75 72 72 65 6e 74 43 68 //Debug.Log("Char.[".+.currentCh
30e60 61 72 61 63 74 65 72 20 2b 20 22 5d 20 61 74 20 49 6e 64 65 78 3a 20 22 20 2b 20 69 20 2b 20 22 aracter.+."].at.Index:.".+.i.+."
30e80 20 20 45 6e 64 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 50 4f 53 3a 20 22 20 2b 20 73 74 72 ..End.Strikethrough.POS:.".+.str
30ea0 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 20 2b 20 22 20 20 42 61 73 65 6c 69 6e 65 3a 20 22 20 ikethrough_end.+."..Baseline:.".
30ec0 2b 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 +.m_textInfo.characterInfo[i].ba
30ee0 73 65 4c 69 6e 65 2e 54 6f 53 74 72 69 6e 67 28 22 66 33 22 29 29 3b 0d 0a 20 20 20 20 20 20 20 seLine.ToString("f3"));.........
30f00 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............}..................
30f20 20 20 20 20 65 6c 73 65 20 69 66 20 28 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 ....else.if.(beginStrikethrough.
30f40 26 26 20 69 20 3c 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 26 26 20 63 75 72 72 65 &&.i.<.m_characterCount.&&.curre
30f60 6e 74 46 6f 6e 74 41 73 73 65 74 2e 47 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 20 21 3d 20 63 ntFontAsset.GetInstanceID().!=.c
30f80 68 61 72 61 63 74 65 72 49 6e 66 6f 73 5b 69 20 2b 20 31 5d 2e 66 6f 6e 74 41 73 73 65 74 2e 47 haracterInfos[i.+.1].fontAsset.G
30fa0 65 74 49 6e 73 74 61 6e 63 65 49 44 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 etInstanceID()).................
30fc0 20 20 20 20 20 7b 0d 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 .....{..........................
30fe0 2f 2f 20 54 65 72 6d 69 6e 61 74 65 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 69 66 20 66 6f //.Terminate.Strikethrough.if.fo
31000 6e 74 20 61 73 73 65 74 20 63 68 61 6e 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 nt.asset.changes................
31020 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 ...........beginStrikethrough.=.
31040 66 61 6c 73 65 3b 0d 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 false;..........................
31060 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 strikethrough_end.=.new.Vector3(
31080 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 m_textInfo.characterInfo[i].topR
310a0 69 67 68 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f ight.x,.m_textInfo.characterInfo
310c0 5b 69 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 73 [i].baseLine.+.strikethroughOffs
310e0 65 74 20 2a 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 0d 0a et.*.strikethroughScale,.0);....
31100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 55 6e 64 65 ........................DrawUnde
31120 72 6c 69 6e 65 4d 65 73 68 28 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 74 2c 20 73 rlineMesh(strikethrough_start,.s
31140 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f trikethrough_end,.ref.last_vert_
31160 69 6e 64 65 78 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b index,.strikethroughScale,.strik
31180 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c ethroughScale,.strikethroughScal
311a0 65 2c 20 78 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 29 3b 0d e,.xScale,.strikethroughColor);.
311c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 .....................}..........
311e0 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 62 65 67 69 6e 53 74 72 69 6b 65 ............else.if.(beginStrike
31200 74 68 72 6f 75 67 68 20 26 26 20 21 69 73 53 74 72 69 6b 65 54 68 72 6f 75 67 68 56 69 73 69 62 through.&&.!isStrikeThroughVisib
31220 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 le)......................{......
31240 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 65 72 6d 69 6e 61 74 65 ....................//.Terminate
31260 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 69 66 20 63 68 61 72 61 63 74 65 72 20 69 73 20 6e .Strikethrough.if.character.is.n
31280 6f 74 20 76 69 73 69 62 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ot.visible......................
312a0 20 20 20 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 66 61 6c 73 65 3b .....beginStrikethrough.=.false;
312c0 0d 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 73 74 72 69 6b 65 ..........................strike
312e0 74 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 through_end.=.new.Vector3(m_text
31300 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 20 2d 20 31 5d 2e 74 6f 70 52 69 67 Info.characterInfo[i.-.1].topRig
31320 68 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 ht.x,.m_textInfo.characterInfo[i
31340 20 2d 20 31 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 .-.1].baseLine.+.strikethroughOf
31360 66 73 65 74 20 2a 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a fset.*.strikethroughScale,.0);..
31380 0d 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 44 72 61 77 55 6e ..........................DrawUn
313a0 64 65 72 6c 69 6e 65 4d 65 73 68 28 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 74 2c derlineMesh(strikethrough_start,
313c0 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 .strikethrough_end,.ref.last_ver
313e0 74 5f 69 6e 64 65 78 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 t_index,.strikethroughScale,.str
31400 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 ikethroughScale,.strikethroughSc
31420 61 6c 65 2c 20 78 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 29 ale,.xScale,.strikethroughColor)
31440 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ;......................}........
31460 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 ..........}..................els
31480 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 e..................{............
314a0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 64 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 0d 0a ..........//.End.Strikethrough..
314c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 65 67 69 6e 53 74 72 ....................if.(beginStr
314e0 69 6b 65 74 68 72 6f 75 67 68 20 3d 3d 20 74 72 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ikethrough.==.true).............
31500 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
31520 20 20 20 20 62 65 67 69 6e 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 3d 20 66 61 6c 73 65 3b 0d ....beginStrikethrough.=.false;.
31540 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 73 74 72 69 6b 65 74 .........................striket
31560 68 72 6f 75 67 68 5f 65 6e 64 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 hrough_end.=.new.Vector3(m_textI
31580 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 20 2d 20 31 5d 2e 74 6f 70 52 69 67 68 nfo.characterInfo[i.-.1].topRigh
315a0 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 20 t.x,.m_textInfo.characterInfo[i.
315c0 2d 20 31 5d 2e 62 61 73 65 4c 69 6e 65 20 2b 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 4f 66 66 -.1].baseLine.+.strikethroughOff
315e0 73 65 74 20 2a 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 30 29 3b 0d 0a 0d set.*.strikethroughScale,.0);...
31600 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 44 72 61 77 55 6e 64 .........................DrawUnd
31620 65 72 6c 69 6e 65 4d 65 73 68 28 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 73 74 61 72 74 2c 20 erlineMesh(strikethrough_start,.
31640 73 74 72 69 6b 65 74 68 72 6f 75 67 68 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 strikethrough_end,.ref.last_vert
31660 5f 69 6e 64 65 78 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 _index,.strikethroughScale,.stri
31680 6b 65 74 68 72 6f 75 67 68 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 53 63 61 kethroughScale,.strikethroughSca
316a0 6c 65 2c 20 78 53 63 61 6c 65 2c 20 73 74 72 69 6b 65 74 68 72 6f 75 67 68 43 6f 6c 6f 72 29 3b le,.xScale,.strikethroughColor);
316c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 ......................}.........
316e0 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 .........}..................#end
31700 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 region......................//.H
31720 41 4e 44 4c 45 20 54 45 58 54 20 48 49 47 48 4c 49 47 48 54 49 4e 47 0d 0a 20 20 20 20 20 20 20 ANDLE.TEXT.HIGHLIGHTING.........
31740 20 20 20 20 20 20 20 20 20 23 72 65 67 69 6f 6e 20 54 65 78 74 20 48 69 67 68 6c 69 67 68 74 69 .........#region.Text.Highlighti
31760 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 48 69 67 68 6c ng..................bool.isHighl
31780 69 67 68 74 20 3d 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f ight.=.(m_textInfo.characterInfo
317a0 5b 69 5d 2e 73 74 79 6c 65 20 26 20 46 6f 6e 74 53 74 79 6c 65 73 2e 48 69 67 68 6c 69 67 68 74 [i].style.&.FontStyles.Highlight
317c0 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 48 69 67 68 6c 69 67 68 74 3b 0d 0a 20 20 20 20 ).==.FontStyles.Highlight;......
317e0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 48 69 67 68 6c 69 67 68 74 29 0d 0a 20 20 ............if.(isHighlight)....
31800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
31820 20 20 20 20 20 62 6f 6f 6c 20 69 73 48 69 67 68 6c 69 67 68 74 56 69 73 69 62 6c 65 20 3d 20 74 .....bool.isHighlightVisible.=.t
31840 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 20 63 75 rue;......................int.cu
31860 72 72 65 6e 74 50 61 67 65 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 rrentPage.=.m_textInfo.character
31880 49 6e 66 6f 5b 69 5d 2e 70 61 67 65 4e 75 6d 62 65 72 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 Info[i].pageNumber;.............
318a0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 3e 20 6d 5f 6d 61 78 56 69 73 69 62 6c 65 43 ...........if.(i.>.m_maxVisibleC
318c0 68 61 72 61 63 74 65 72 73 20 7c 7c 20 63 75 72 72 65 6e 74 4c 69 6e 65 20 3e 20 6d 5f 6d 61 78 haracters.||.currentLine.>.m_max
318e0 56 69 73 69 62 6c 65 4c 69 6e 65 73 20 7c 7c 20 28 6d 5f 6f 76 65 72 66 6c 6f 77 4d 6f 64 65 20 VisibleLines.||.(m_overflowMode.
31900 3d 3d 20 54 65 78 74 4f 76 65 72 66 6c 6f 77 4d 6f 64 65 73 2e 50 61 67 65 20 26 26 20 63 75 72 ==.TextOverflowModes.Page.&&.cur
31920 72 65 6e 74 50 61 67 65 20 2b 20 31 20 21 3d 20 6d 5f 70 61 67 65 54 6f 44 69 73 70 6c 61 79 29 rentPage.+.1.!=.m_pageToDisplay)
31940 29 0d 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 69 73 48 69 67 )..........................isHig
31960 68 6c 69 67 68 74 56 69 73 69 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 hlightVisible.=.false;..........
31980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 ..............if.(beginHighlight
319a0 20 3d 3d 20 66 61 6c 73 65 20 26 26 20 69 73 48 69 67 68 6c 69 67 68 74 56 69 73 69 62 6c 65 20 .==.false.&&.isHighlightVisible.
319c0 3d 3d 20 74 72 75 65 20 26 26 20 69 20 3c 3d 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 ==.true.&&.i.<=.lineInfo.lastVis
319e0 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 26 26 20 63 75 72 72 65 6e 74 43 68 61 ibleCharacterIndex.&&.currentCha
31a00 72 61 63 74 65 72 20 21 3d 20 31 30 20 26 26 20 63 75 72 72 65 6e 74 43 68 61 72 61 63 74 65 72 racter.!=.10.&&.currentCharacter
31a20 20 21 3d 20 31 33 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a .!=.13)......................{..
31a40 20 20 20 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 69 20 3d 3d ........................if.(i.==
31a60 20 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e .lineInfo.lastVisibleCharacterIn
31a80 64 65 78 20 26 26 20 63 68 61 72 2e 49 73 53 65 70 61 72 61 74 6f 72 28 63 75 72 72 65 6e 74 43 dex.&&.char.IsSeparator(currentC
31aa0 68 61 72 61 63 74 65 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 haracter))......................
31ac0 20 20 20 20 7b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ....{.}.........................
31ae0 20 65 6c 73 65 0d 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 7b .else..........................{
31b00 0d 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 20 20 62 65 ..............................be
31b20 67 69 6e 48 69 67 68 6c 69 67 68 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ginHighlight.=.true;............
31b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 73 74 61 72 ..................highlight_star
31b60 74 20 3d 20 6b 5f 4c 61 72 67 65 50 6f 73 69 74 69 76 65 56 65 63 74 6f 72 32 3b 0d 0a 20 20 20 t.=.k_LargePositiveVector2;.....
31b80 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 68 69 67 68 6c 69 67 .........................highlig
31ba0 68 74 5f 65 6e 64 20 3d 20 6b 5f 4c 61 72 67 65 4e 65 67 61 74 69 76 65 56 65 63 74 6f 72 32 3b ht_end.=.k_LargeNegativeVector2;
31bc0 0d 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 20 20 68 69 ..............................hi
31be0 67 68 6c 69 67 68 74 43 6f 6c 6f 72 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 ghlightColor.=.m_textInfo.charac
31c00 74 65 72 49 6e 66 6f 5b 69 5d 2e 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 terInfo[i].highlightColor;......
31c20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 ....................}...........
31c40 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........}....................
31c60 20 20 20 20 69 66 20 28 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 29 0d 0a 20 20 20 20 20 20 20 ....if.(beginHighlight).........
31c80 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
31ca0 20 20 20 20 20 20 20 20 43 6f 6c 6f 72 33 32 20 63 75 72 72 65 6e 74 48 69 67 68 6c 69 67 68 74 ........Color32.currentHighlight
31cc0 43 6f 6c 6f 72 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f Color.=.m_textInfo.characterInfo
31ce0 5b 69 5d 2e 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 [i].highlightColor;.............
31d00 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 69 73 43 6f 6c 6f 72 54 72 61 6e 73 69 74 .............bool.isColorTransit
31d20 69 6f 6e 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ion.=.false;....................
31d40 20 20 20 20 20 20 20 20 2f 2f 20 48 61 6e 64 6c 65 20 48 69 67 68 6c 69 67 68 74 20 63 6f 6c 6f ........//.Handle.Highlight.colo
31d60 72 20 63 68 61 6e 67 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 r.changes.......................
31d80 20 20 20 69 66 20 28 21 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 2e 43 6f 6d 70 61 72 65 28 63 ...if.(!highlightColor.Compare(c
31da0 75 72 72 65 6e 74 48 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 29 29 0d 0a 20 20 20 20 20 20 20 20 urrentHighlightColor))..........
31dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ................{...............
31de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e 64 20 64 72 61 77 69 6e 67 20 61 74 ...............//.End.drawing.at
31e00 20 74 68 65 20 73 74 61 72 74 20 6f 66 20 6e 65 77 20 68 69 67 68 6c 69 67 68 74 20 63 6f 6c 6f .the.start.of.new.highlight.colo
31e20 72 20 74 6f 20 70 72 65 76 65 6e 74 20 61 20 67 61 70 20 62 65 74 77 65 65 6e 20 68 69 67 68 6c r.to.prevent.a.gap.between.highl
31e40 69 67 68 74 20 73 65 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ight.sections...................
31e60 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2e 78 20 3d 20 28 68 ............highlight_end.x.=.(h
31e80 69 67 68 6c 69 67 68 74 5f 65 6e 64 2e 78 20 2b 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 ighlight_end.x.+.m_textInfo.char
31ea0 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 29 20 2f 20 32 3b 0d acterInfo[i].bottomLeft.x)./.2;.
31ec0 0a 0d 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 20 20 68 ...............................h
31ee0 69 67 68 6c 69 67 68 74 5f 73 74 61 72 74 2e 79 20 3d 20 4d 61 74 68 66 2e 4d 69 6e 28 68 69 67 ighlight_start.y.=.Mathf.Min(hig
31f00 68 6c 69 67 68 74 5f 73 74 61 72 74 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 hlight_start.y,.m_textInfo.chara
31f20 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 64 65 73 63 65 6e 64 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 cterInfo[i].descender);.........
31f40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 65 .....................highlight_e
31f60 6e 64 2e 79 20 3d 20 4d 61 74 68 66 2e 4d 61 78 28 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2e 79 nd.y.=.Mathf.Max(highlight_end.y
31f80 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 61 73 ,.m_textInfo.characterInfo[i].as
31fa0 63 65 6e 64 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 cender);........................
31fc0 20 20 20 20 20 20 20 20 44 72 61 77 54 65 78 74 48 69 67 68 6c 69 67 68 74 28 68 69 67 68 6c 69 ........DrawTextHighlight(highli
31fe0 67 68 74 5f 73 74 61 72 74 2c 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2c 20 72 65 66 20 6c 61 ght_start,.highlight_end,.ref.la
32000 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 29 3b 0d st_vert_index,.highlightColor);.
32020 0a 0d 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 20 20 62 ...............................b
32040 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 eginHighlight.=.true;...........
32060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 73 74 61 ...................highlight_sta
32080 72 74 20 3d 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 rt.=.highlight_end;.............
320a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 ...................highlight_end
320c0 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 .=.new.Vector3(m_textInfo.charac
320e0 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 terInfo[i].topRight.x,.m_textInf
32100 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 64 65 73 63 65 6e 64 65 72 2c 20 30 29 o.characterInfo[i].descender,.0)
32120 3b 0d 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 20 20 68 ;..............................h
32140 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 ighlightColor.=.m_textInfo.chara
32160 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 3b 0d 0a 0d 0a 20 cterInfo[i].highlightColor;.....
32180 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 69 73 43 6f 6c ...........................isCol
321a0 6f 72 54 72 61 6e 73 69 74 69 6f 6e 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 orTransition.=.true;............
321c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............}.................
321e0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 43 6f 6c 6f 72 54 72 61 6e 73 69 74 69 6f ...........if.(!isColorTransitio
32200 6e 29 0d 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 7b 0d 0a 20 n)..........................{...
32220 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 2f 2f 20 55 73 ...........................//.Us
32240 65 20 74 68 65 20 4d 69 6e 20 2f 20 4d 61 78 20 45 78 74 65 6e 74 73 20 6f 66 20 74 68 65 20 48 e.the.Min./.Max.Extents.of.the.H
32260 69 67 68 6c 69 67 68 74 20 61 72 65 61 20 74 6f 20 68 61 6e 64 6c 65 20 64 69 66 66 65 72 65 6e ighlight.area.to.handle.differen
32280 74 20 63 68 61 72 61 63 74 65 72 20 73 69 7a 65 73 20 61 6e 64 20 66 6f 6e 74 73 2e 0d 0a 20 20 t.character.sizes.and.fonts.....
322a0 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 68 69 67 68 6c 69 ..........................highli
322c0 67 68 74 5f 73 74 61 72 74 2e 78 20 3d 20 4d 61 74 68 66 2e 4d 69 6e 28 68 69 67 68 6c 69 67 68 ght_start.x.=.Mathf.Min(highligh
322e0 74 5f 73 74 61 72 74 2e 78 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 t_start.x,.m_textInfo.characterI
32300 6e 66 6f 5b 69 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 2e 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 nfo[i].bottomLeft.x);...........
32320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 73 74 61 ...................highlight_sta
32340 72 74 2e 79 20 3d 20 4d 61 74 68 66 2e 4d 69 6e 28 68 69 67 68 6c 69 67 68 74 5f 73 74 61 72 74 rt.y.=.Mathf.Min(highlight_start
32360 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e .y,.m_textInfo.characterInfo[i].
32380 64 65 73 63 65 6e 64 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 descender);.....................
323a0 20 20 20 20 20 20 20 20 20 20 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2e 78 20 3d 20 4d 61 74 ...........highlight_end.x.=.Mat
323c0 68 66 2e 4d 61 78 28 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2e 78 2c 20 6d 5f 74 65 78 74 49 6e hf.Max(highlight_end.x,.m_textIn
323e0 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 2e 78 29 3b fo.characterInfo[i].topRight.x);
32400 0d 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 20 20 68 69 ..............................hi
32420 67 68 6c 69 67 68 74 5f 65 6e 64 2e 79 20 3d 20 4d 61 74 68 66 2e 4d 61 78 28 68 69 67 68 6c 69 ghlight_end.y.=.Mathf.Max(highli
32440 67 68 74 5f 65 6e 64 2e 79 2c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 ght_end.y,.m_textInfo.characterI
32460 6e 66 6f 5b 69 5d 2e 61 73 63 65 6e 64 65 72 29 3b 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 nfo[i].ascender);...............
32480 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............}...................
324a0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 ...}........................//.E
324c0 6e 64 20 48 69 67 68 6c 69 67 68 74 20 69 66 20 74 65 78 74 20 6f 6e 6c 79 20 63 6f 6e 74 61 69 nd.Highlight.if.text.only.contai
324e0 6e 73 20 6f 6e 65 20 63 68 61 72 61 63 74 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ns.one.character................
32500 20 20 20 20 20 20 20 69 66 20 28 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 26 26 20 6d 5f 63 .......if.(beginHighlight.&&.m_c
32520 68 61 72 61 63 74 65 72 43 6f 75 6e 74 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 haracterCount.==.1).............
32540 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .........{......................
32560 20 20 20 20 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 ....beginHighlight.=.false;.....
32580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 72 61 77 54 65 78 74 48 .......................DrawTextH
325a0 69 67 68 6c 69 67 68 74 28 68 69 67 68 6c 69 67 68 74 5f 73 74 61 72 74 2c 20 68 69 67 68 6c 69 ighlight(highlight_start,.highli
325c0 67 68 74 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 68 69 ght_end,.ref.last_vert_index,.hi
325e0 67 68 6c 69 67 68 74 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ghlightColor);..................
32600 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 ....}......................else.
32620 69 66 20 28 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 26 26 20 28 69 20 3d 3d 20 6c 69 6e 65 if.(beginHighlight.&&.(i.==.line
32640 49 6e 66 6f 2e 6c 61 73 74 43 68 61 72 61 63 74 65 72 49 6e 64 65 78 20 7c 7c 20 69 20 3e 3d 20 Info.lastCharacterIndex.||.i.>=.
32660 6c 69 6e 65 49 6e 66 6f 2e 6c 61 73 74 56 69 73 69 62 6c 65 43 68 61 72 61 63 74 65 72 49 6e 64 lineInfo.lastVisibleCharacterInd
32680 65 78 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ex))......................{.....
326a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 48 69 67 68 6c 69 .....................beginHighli
326c0 67 68 74 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ght.=.false;....................
326e0 20 20 20 20 20 20 44 72 61 77 54 65 78 74 48 69 67 68 6c 69 67 68 74 28 68 69 67 68 6c 69 67 68 ......DrawTextHighlight(highligh
32700 74 5f 73 74 61 72 74 2c 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 t_start,.highlight_end,.ref.last
32720 5f 76 65 72 74 5f 69 6e 64 65 78 2c 20 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 29 3b 0d 0a 20 _vert_index,.highlightColor);...
32740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 ...................}............
32760 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 62 65 67 69 6e 48 69 67 68 6c 69 67 68 ..........else.if.(beginHighligh
32780 74 20 26 26 20 21 69 73 48 69 67 68 6c 69 67 68 74 56 69 73 69 62 6c 65 29 0d 0a 20 20 20 20 20 t.&&.!isHighlightVisible).......
327a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
327c0 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 3d 20 66 61 6c 73 65 ..........beginHighlight.=.false
327e0 3b 0d 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 44 72 61 77 54 ;..........................DrawT
32800 65 78 74 48 69 67 68 6c 69 67 68 74 28 68 69 67 68 6c 69 67 68 74 5f 73 74 61 72 74 2c 20 68 69 extHighlight(highlight_start,.hi
32820 67 68 6c 69 67 68 74 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e 64 65 78 ghlight_end,.ref.last_vert_index
32840 2c 20 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ,.highlightColor);..............
32860 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ........}..................}....
32880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ..............else..............
328a0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 6e ....{......................//.En
328c0 64 20 48 69 67 68 6c 69 67 68 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 d.Highlight.....................
328e0 20 69 66 20 28 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 3d 3d 20 74 72 75 65 29 0d 0a 20 20 .if.(beginHighlight.==.true)....
32900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
32920 20 20 20 20 20 20 20 20 20 20 20 20 20 62 65 67 69 6e 48 69 67 68 6c 69 67 68 74 20 3d 20 66 61 .............beginHighlight.=.fa
32940 6c 73 65 3b 0d 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 44 72 lse;..........................Dr
32960 61 77 54 65 78 74 48 69 67 68 6c 69 67 68 74 28 68 69 67 68 6c 69 67 68 74 5f 73 74 61 72 74 2c awTextHighlight(highlight_start,
32980 20 68 69 67 68 6c 69 67 68 74 5f 65 6e 64 2c 20 72 65 66 20 6c 61 73 74 5f 76 65 72 74 5f 69 6e .highlight_end,.ref.last_vert_in
329a0 64 65 78 2c 20 68 69 67 68 6c 69 67 68 74 43 6f 6c 6f 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 dex,.highlightColor);...........
329c0 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ...........}..................}.
329e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d .................#endregion.....
32a00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 61 73 74 4c 69 6e 65 20 3d 20 63 75 72 72 .................lastLine.=.curr
32a20 65 6e 74 4c 69 6e 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 entLine;..............}.........
32a40 20 20 20 20 20 23 65 6e 64 72 65 67 69 6f 6e 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .....#endregion.................
32a60 20 2f 2f 20 4d 45 54 52 49 43 53 20 41 42 4f 55 54 20 54 48 45 20 54 45 58 54 20 4f 42 4a 45 43 .//.METRICS.ABOUT.THE.TEXT.OBJEC
32a80 54 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 T..............m_textInfo.charac
32aa0 74 65 72 43 6f 75 6e 74 20 3d 20 6d 5f 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 0d 0a 20 20 terCount.=.m_characterCount;....
32ac0 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 73 70 72 69 74 65 43 6f 75 6e 74 ..........m_textInfo.spriteCount
32ae0 20 3d 20 6d 5f 73 70 72 69 74 65 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d .=.m_spriteCount;..............m
32b00 5f 74 65 78 74 49 6e 66 6f 2e 6c 69 6e 65 43 6f 75 6e 74 20 3d 20 6c 69 6e 65 43 6f 75 6e 74 3b _textInfo.lineCount.=.lineCount;
32b20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 77 6f 72 64 43 6f 75 ..............m_textInfo.wordCou
32b40 6e 74 20 3d 20 77 6f 72 64 43 6f 75 6e 74 20 21 3d 20 30 20 26 26 20 6d 5f 63 68 61 72 61 63 74 nt.=.wordCount.!=.0.&&.m_charact
32b60 65 72 43 6f 75 6e 74 20 3e 20 30 20 3f 20 77 6f 72 64 43 6f 75 6e 74 20 3a 20 31 3b 0d 0a 20 20 erCount.>.0.?.wordCount.:.1;....
32b80 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 70 61 67 65 43 6f 75 6e 74 20 3d ..........m_textInfo.pageCount.=
32ba0 20 6d 5f 70 61 67 65 4e 75 6d 62 65 72 20 2b 20 31 3b 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .m_pageNumber.+.1;..............
32bc0 20 20 20 20 2f 2f 2f 2f 50 72 6f 66 69 6c 65 72 2e 42 65 67 69 6e 53 61 6d 70 6c 65 28 22 54 4d ....////Profiler.BeginSample("TM
32be0 50 20 47 65 6e 65 72 61 74 65 20 54 65 78 74 20 2d 20 50 68 61 73 65 20 49 49 49 22 29 3b 0d 0a P.Generate.Text.-.Phase.III");..
32c00 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 70 64 61 74 65 20 4d 65 73 68 20 56 65 72 74 65 ............//.Update.Mesh.Verte
32c20 78 20 44 61 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 72 65 6e 64 65 72 x.Data..............if.(m_render
32c40 4d 6f 64 65 20 3d 3d 20 54 65 78 74 52 65 6e 64 65 72 46 6c 61 67 73 2e 52 65 6e 64 65 72 20 26 Mode.==.TextRenderFlags.Render.&
32c60 26 20 49 73 41 63 74 69 76 65 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 &.IsActive())..............{....
32c80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6c 65 61 72 20 75 6e 75 73 65 64 20 76 65 ..............//.Clear.unused.ve
32ca0 72 74 69 63 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 74 65 78 74 rtices..................//m_text
32cc0 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 30 5d 2e 43 6c 65 61 72 55 6e 75 73 65 64 56 65 72 74 Info.meshInfo[0].ClearUnusedVert
32ce0 69 63 65 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6f ices();....................//.So
32d00 72 74 20 74 68 65 20 67 65 6f 6d 65 74 72 79 20 6f 66 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 rt.the.geometry.of.the.text.obje
32d20 63 74 20 69 66 20 6e 65 65 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 ct.if.needed...................i
32d40 66 20 28 6d 5f 67 65 6f 6d 65 74 72 79 53 6f 72 74 69 6e 67 4f 72 64 65 72 20 21 3d 20 56 65 72 f.(m_geometrySortingOrder.!=.Ver
32d60 74 65 78 53 6f 72 74 69 6e 67 4f 72 64 65 72 2e 4e 6f 72 6d 61 6c 29 0d 0a 20 20 20 20 20 20 20 texSortingOrder.Normal).........
32d80 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f .............m_textInfo.meshInfo
32da0 5b 30 5d 2e 53 6f 72 74 47 65 6f 6d 65 74 72 79 28 56 65 72 74 65 78 53 6f 72 74 69 6e 67 4f 72 [0].SortGeometry(VertexSortingOr
32dc0 64 65 72 2e 52 65 76 65 72 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 der.Reverse);...................
32de0 20 2f 2f 20 55 70 6c 6f 61 64 20 4d 65 73 68 20 44 61 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 .//.Upload.Mesh.Data............
32e00 20 20 20 20 20 20 6d 5f 6d 65 73 68 2e 4d 61 72 6b 44 79 6e 61 6d 69 63 28 29 3b 0d 0a 20 20 20 ......m_mesh.MarkDynamic();.....
32e20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 2e 76 65 72 74 69 63 65 73 20 3d 20 6d .............m_mesh.vertices.=.m
32e40 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 30 5d 2e 76 65 72 74 69 63 65 73 3b 0d _textInfo.meshInfo[0].vertices;.
32e60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 2e 75 76 20 3d 20 6d 5f 74 .................m_mesh.uv.=.m_t
32e80 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 30 5d 2e 75 76 73 30 3b 0d 0a 20 20 20 20 20 extInfo.meshInfo[0].uvs0;.......
32ea0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 2e 75 76 32 20 3d 20 6d 5f 74 65 78 74 49 6e ...........m_mesh.uv2.=.m_textIn
32ec0 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 30 5d 2e 75 76 73 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 fo.meshInfo[0].uvs2;............
32ee0 20 20 20 20 20 20 2f 2f 6d 5f 6d 65 73 68 2e 75 76 34 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e ......//m_mesh.uv4.=.m_textInfo.
32f00 6d 65 73 68 49 6e 66 6f 5b 30 5d 2e 75 76 73 34 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 meshInfo[0].uvs4;...............
32f20 20 20 20 6d 5f 6d 65 73 68 2e 63 6f 6c 6f 72 73 33 32 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e ...m_mesh.colors32.=.m_textInfo.
32f40 6d 65 73 68 49 6e 66 6f 5b 30 5d 2e 63 6f 6c 6f 72 73 33 32 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 meshInfo[0].colors32;...........
32f60 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 6d 70 75 74 65 20 42 6f 75 6e 64 73 20 66 6f 72 20 74 .........//.Compute.Bounds.for.t
32f80 68 65 20 6d 65 73 68 2e 20 4d 61 6e 75 61 6c 20 63 6f 6d 70 75 74 61 74 69 6f 6e 20 69 73 20 6d he.mesh..Manual.computation.is.m
32fa0 6f 72 65 20 65 66 66 69 63 69 65 6e 74 20 74 68 65 6e 20 75 73 69 6e 67 20 4d 65 73 68 2e 72 65 ore.efficient.then.using.Mesh.re
32fc0 63 61 6c 63 75 61 6c 74 65 42 6f 75 6e 64 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 calcualteBounds.................
32fe0 20 20 6d 5f 6d 65 73 68 2e 52 65 63 61 6c 63 75 6c 61 74 65 42 6f 75 6e 64 73 28 29 3b 0d 0a 20 ..m_mesh.RecalculateBounds();...
33000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 6d 65 73 68 2e 62 6f 75 6e 64 73 20 3d ...............//m_mesh.bounds.=
33020 20 6e 65 77 20 42 6f 75 6e 64 73 28 6e 65 77 20 56 65 63 74 6f 72 33 28 28 6d 5f 6d 65 73 68 45 .new.Bounds(new.Vector3((m_meshE
33040 78 74 65 6e 74 73 2e 6d 61 78 2e 78 20 2b 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e xtents.max.x.+.m_meshExtents.min
33060 2e 78 29 20 2f 20 32 2c 20 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 20 2b 20 .x)./.2,.(m_meshExtents.max.y.+.
33080 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 79 29 20 2f 20 32 2c 20 30 29 20 2b 20 6f m_meshExtents.min.y)./.2,.0).+.o
330a0 66 66 73 65 74 2c 20 6e 65 77 20 56 65 63 74 6f 72 33 28 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 ffset,.new.Vector3(m_meshExtents
330c0 2e 6d 61 78 2e 78 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 69 6e 2e 78 2c 20 6d 5f .max.x.-.m_meshExtents.min.x,.m_
330e0 6d 65 73 68 45 78 74 65 6e 74 73 2e 6d 61 78 2e 79 20 2d 20 6d 5f 6d 65 73 68 45 78 74 65 6e 74 meshExtents.max.y.-.m_meshExtent
33100 73 2e 6d 69 6e 2e 79 2c 20 30 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.min.y,.0));...................
33120 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 31 3b 20 69 20 3c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e .for.(int.i.=.1;.i.<.m_textInfo.
33140 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 materialCount;.i++).............
33160 20 20 20 20 20 7b 0d 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 .....{......................//.C
33180 6c 65 61 72 20 75 6e 75 73 65 64 20 76 65 72 74 69 63 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 lear.unused.vertices............
331a0 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d ..........m_textInfo.meshInfo[i]
331c0 2e 43 6c 65 61 72 55 6e 75 73 65 64 56 65 72 74 69 63 65 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 .ClearUnusedVertices();.........
331e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 ...............if.(m_subTextObje
33200 63 74 73 5b 69 5d 20 3d 3d 20 6e 75 6c 6c 29 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 cts[i].==.null).continue;.......
33220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6f 72 74 20 74 68 65 20 67 65 6f .................//.Sort.the.geo
33240 6d 65 74 72 79 20 6f 66 20 74 68 65 20 73 75 62 2d 74 65 78 74 20 6f 62 6a 65 63 74 73 20 69 66 metry.of.the.sub-text.objects.if
33260 20 6e 65 65 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 .needed.......................if
33280 20 28 6d 5f 67 65 6f 6d 65 74 72 79 53 6f 72 74 69 6e 67 4f 72 64 65 72 20 21 3d 20 56 65 72 74 .(m_geometrySortingOrder.!=.Vert
332a0 65 78 53 6f 72 74 69 6e 67 4f 72 64 65 72 2e 4e 6f 72 6d 61 6c 29 0d 0a 20 20 20 20 20 20 20 20 exSortingOrder.Normal)..........
332c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 ................m_textInfo.meshI
332e0 6e 66 6f 5b 69 5d 2e 53 6f 72 74 47 65 6f 6d 65 74 72 79 28 56 65 72 74 65 78 53 6f 72 74 69 6e nfo[i].SortGeometry(VertexSortin
33300 67 4f 72 64 65 72 2e 52 65 76 65 72 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 gOrder.Reverse);................
33320 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 ........m_subTextObjects[i].mesh
33340 2e 76 65 72 74 69 63 65 73 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b .vertices.=.m_textInfo.meshInfo[
33360 69 5d 2e 76 65 72 74 69 63 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 i].vertices;....................
33380 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 2e 75 76 20 3d 20 ..m_subTextObjects[i].mesh.uv.=.
333a0 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 75 76 73 30 3b 0d 0a 20 20 m_textInfo.meshInfo[i].uvs0;....
333c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 ..................m_subTextObjec
333e0 74 73 5b 69 5d 2e 6d 65 73 68 2e 75 76 32 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 ts[i].mesh.uv2.=.m_textInfo.mesh
33400 49 6e 66 6f 5b 69 5d 2e 75 76 73 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Info[i].uvs2;...................
33420 20 20 20 2f 2f 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 2e 75 76 ...//m_subTextObjects[i].mesh.uv
33440 34 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 75 76 73 34 3b 4.=.m_textInfo.meshInfo[i].uvs4;
33460 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f ......................m_subTextO
33480 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 2e 63 6f 6c 6f 72 73 33 32 20 3d 20 6d 5f 74 65 78 74 bjects[i].mesh.colors32.=.m_text
334a0 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 63 6f 6c 6f 72 73 33 32 3b 0d 0a 0d 0a 20 20 Info.meshInfo[i].colors32;......
334c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 ..................m_subTextObjec
334e0 74 73 5b 69 5d 2e 6d 65 73 68 2e 52 65 63 61 6c 63 75 6c 61 74 65 42 6f 75 6e 64 73 28 29 3b 0d ts[i].mesh.RecalculateBounds();.
33500 0a 0d 0a 20 20 20 20 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 .......................//.Update
33520 20 74 68 65 20 63 6f 6c 6c 69 64 65 72 20 6f 6e 20 74 68 65 20 73 75 62 20 74 65 78 74 20 6f 62 .the.collider.on.the.sub.text.ob
33540 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 6d 5f 73 75 ject......................//m_su
33560 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 55 70 64 61 74 65 43 6f 6c 6c 69 64 65 72 73 28 bTextObjects[i].UpdateColliders(
33580 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 65 78 43 6f 75 m_textInfo.meshInfo[i].vertexCou
335a0 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 nt);..................}.........
335c0 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 45 76 65 6e 74 20 69 .....}................//.Event.i
335e0 6e 64 69 63 61 74 69 6e 67 20 74 68 65 20 74 65 78 74 20 68 61 73 20 62 65 65 6e 20 72 65 67 65 ndicating.the.text.has.been.rege
33600 6e 65 72 61 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 4d 50 72 6f 5f 45 76 65 6e nerated...............TMPro_Even
33620 74 4d 61 6e 61 67 65 72 2e 4f 4e 5f 54 45 58 54 5f 43 48 41 4e 47 45 44 28 74 68 69 73 29 3b 0d tManager.ON_TEXT_CHANGED(this);.
33640 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 ...............////Profiler.EndS
33660 61 6d 70 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 44 65 62 75 67 2e 4c 6f ample();..............//Debug.Lo
33680 67 28 22 44 6f 6e 65 20 52 65 6e 64 65 72 69 6e 67 20 54 65 78 74 2e 22 29 3b 0d 0a 20 20 20 20 g("Done.Rendering.Text.");......
336a0 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ....}..............///.<summary>
336c0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 74 6f 20 72 65 74 75 72 6e 20 74 ..........///.Method.to.return.t
336e0 68 65 20 6c 6f 63 61 6c 20 63 6f 72 6e 65 72 73 20 6f 66 20 74 68 65 20 54 65 78 74 20 43 6f 6e he.local.corners.of.the.Text.Con
33700 74 61 69 6e 65 72 20 6f 72 20 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 0d 0a 20 20 20 20 20 20 tainer.or.RectTransform.........
33720 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 ..///.</summary>..........///.<r
33740 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 eturns></returns>..........prote
33760 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 56 65 63 74 6f 72 33 5b 5d 20 47 65 74 54 65 78 74 43 cted.override.Vector3[].GetTextC
33780 6f 6e 74 61 69 6e 65 72 4c 6f 63 61 6c 43 6f 72 6e 65 72 73 28 29 0d 0a 20 20 20 20 20 20 20 20 ontainerLocalCorners()..........
337a0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f {..............if.(m_rectTransfo
337c0 72 6d 20 3d 3d 20 6e 75 6c 6c 29 20 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 20 3d 20 74 68 rm.==.null).m_rectTransform.=.th
337e0 69 73 2e 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 is.rectTransform;...............
33800 20 6d 5f 72 65 63 74 54 72 61 6e 73 66 6f 72 6d 2e 47 65 74 4c 6f 63 61 6c 43 6f 72 6e 65 72 73 .m_rectTransform.GetLocalCorners
33820 28 6d 5f 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 43 6f 72 6e 65 72 73 29 3b 0d 0a 0d 0a 20 20 20 (m_RectTransformCorners);.......
33840 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 52 65 63 74 54 72 61 6e 73 66 6f 72 6d 43 .........return.m_RectTransformC
33860 6f 72 6e 65 72 73 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 orners;..........}..............
33880 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f ///.<summary>..........///.Metho
338a0 64 20 74 6f 20 64 69 73 61 62 6c 65 20 74 68 65 20 72 65 6e 64 65 72 65 72 73 2e 0d 0a 20 20 20 d.to.disable.the.renderers......
338c0 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 .....///.</summary>..........voi
338e0 64 20 53 65 74 4d 65 73 68 46 69 6c 74 65 72 73 28 62 6f 6f 6c 20 73 74 61 74 65 29 0d 0a 20 20 d.SetMeshFilters(bool.state)....
33900 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 72 65 6e 74 20 74 ......{..............//.Parent.t
33920 65 78 74 20 6f 62 6a 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 6d 65 ext.object..............if.(m_me
33940 73 68 46 69 6c 74 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b shFilter.!=.null)..............{
33960 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 61 74 65 29 0d 0a 20 20 ..................if.(state)....
33980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 6d 65 73 68 46 69 6c 74 65 72 2e 73 ..................m_meshFilter.s
339a0 68 61 72 65 64 4d 65 73 68 20 3d 20 6d 5f 6d 65 73 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 haredMesh.=.m_mesh;.............
339c0 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d .....else......................m
339e0 5f 6d 65 73 68 46 69 6c 74 65 72 2e 73 68 61 72 65 64 4d 65 73 68 20 3d 20 6e 75 6c 6c 3b 0d 0a _meshFilter.sharedMesh.=.null;..
33a00 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 ............}................for
33a20 20 28 69 6e 74 20 69 20 3d 20 31 3b 20 69 20 3c 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 .(int.i.=.1;.i.<.m_subTextObject
33a40 73 2e 4c 65 6e 67 74 68 20 26 26 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 20 s.Length.&&.m_subTextObjects[i].
33a60 21 3d 20 6e 75 6c 6c 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 !=.null;.i++)..............{....
33a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 ..............if.(m_subTextObjec
33aa0 74 73 5b 69 5d 2e 6d 65 73 68 46 69 6c 74 65 72 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 ts[i].meshFilter.!=.null).......
33ac0 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........{....................
33ae0 20 20 69 66 20 28 73 74 61 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..if.(state)....................
33b00 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 46 69 ......m_subTextObjects[i].meshFi
33b20 6c 74 65 72 2e 73 68 61 72 65 64 4d 65 73 68 20 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 lter.sharedMesh.=.m_subTextObjec
33b40 74 73 5b 69 5d 2e 6d 65 73 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ts[i].mesh;.....................
33b60 20 65 6c 73 65 0d 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 6d .else..........................m
33b80 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 46 69 6c 74 65 72 2e 73 68 _subTextObjects[i].meshFilter.sh
33ba0 61 72 65 64 4d 65 73 68 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 aredMesh.=.null;................
33bc0 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d ..}..............}..........}...
33be0 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ...........///.<summary>........
33c00 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 74 6f 20 45 6e 61 62 6c 65 20 6f 72 20 44 69 73 61 62 6c ..///.Method.to.Enable.or.Disabl
33c20 65 20 63 68 69 6c 64 20 53 75 62 4d 65 73 68 20 6f 62 6a 65 63 74 73 2e 0d 0a 20 20 20 20 20 20 e.child.SubMesh.objects.........
33c40 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 ..///.</summary>..........///.<p
33c60 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 61 74 65 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 aram.name="state"></param>......
33c80 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 41 ....protected.override.void.SetA
33ca0 63 74 69 76 65 53 75 62 4d 65 73 68 65 73 28 62 6f 6f 6c 20 73 74 61 74 65 29 0d 0a 20 20 20 20 ctiveSubMeshes(bool.state)......
33cc0 20 20 20 20 7b 0d 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 ....{..............for.(int.i.=.
33ce0 31 3b 20 69 20 3c 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 68 20 26 1;.i.<.m_subTextObjects.Length.&
33d00 26 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b 20 69 &.m_subTextObjects[i].!=.null;.i
33d20 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ++)..............{..............
33d40 20 20 20 20 69 66 20 28 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 65 6e 61 62 ....if.(m_subTextObjects[i].enab
33d60 6c 65 64 20 21 3d 20 73 74 61 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 led.!=.state)...................
33d80 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 65 6e 61 62 6c 65 64 20 3d ...m_subTextObjects[i].enabled.=
33da0 20 73 74 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 .state;..............}..........
33dc0 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 }..............///.<summary>....
33de0 20 20 20 20 20 20 2f 2f 2f 20 44 65 73 74 72 6f 79 20 53 75 62 20 4d 65 73 68 20 4f 62 6a 65 63 ......///.Destroy.Sub.Mesh.Objec
33e00 74 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 ts..........///.</summary>......
33e20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 43 6c 65 61 ....protected.override.void.Clea
33e40 72 53 75 62 4d 65 73 68 4f 62 6a 65 63 74 73 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 rSubMeshObjects()..........{....
33e60 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 31 3b 20 69 20 3c 20 6d 5f ..........for.(int.i.=.1;.i.<.m_
33e80 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 68 20 26 26 20 6d 5f 73 75 62 54 65 subTextObjects.Length.&&.m_subTe
33ea0 78 74 4f 62 6a 65 63 74 73 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 xtObjects[i].!=.null;.i++)......
33ec0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 ........{..................Debug
33ee0 2e 4c 6f 67 28 22 44 65 73 74 72 6f 79 69 6e 67 20 53 75 62 20 54 65 78 74 20 6f 62 6a 65 63 74 .Log("Destroying.Sub.Text.object
33f00 5b 22 20 2b 20 69 20 2b 20 22 5d 2e 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 [".+.i.+."].");.................
33f20 20 44 65 73 74 72 6f 79 49 6d 6d 65 64 69 61 74 65 28 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 .DestroyImmediate(m_subTextObjec
33f40 74 73 5b 69 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 ts[i]);..............}..........
33f60 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 }..............///.<summary>....
33f80 20 20 20 20 20 20 2f 2f 2f 20 20 4d 65 74 68 6f 64 20 72 65 74 75 72 6e 69 6e 67 20 74 68 65 20 ......///..Method.returning.the.
33fa0 63 6f 6d 70 6f 75 6e 64 20 62 6f 75 6e 64 73 20 6f 66 20 74 68 65 20 74 65 78 74 20 6f 62 6a 65 compound.bounds.of.the.text.obje
33fc0 63 74 20 61 6e 64 20 63 68 69 6c 64 20 73 75 62 20 6f 62 6a 65 63 74 73 2e 0d 0a 20 20 20 20 20 ct.and.child.sub.objects........
33fe0 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ...///.</summary>..........///.<
34000 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 returns></returns>..........prot
34020 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 42 6f 75 6e 64 73 20 47 65 74 43 6f 6d 70 6f 75 6e ected.override.Bounds.GetCompoun
34040 64 42 6f 75 6e 64 73 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 dBounds()..........{............
34060 20 20 42 6f 75 6e 64 73 20 6d 61 69 6e 42 6f 75 6e 64 73 20 3d 20 6d 5f 6d 65 73 68 2e 62 6f 75 ..Bounds.mainBounds.=.m_mesh.bou
34080 6e 64 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 33 20 6d 69 6e 20 3d 20 nds;..............Vector3.min.=.
340a0 6d 61 69 6e 42 6f 75 6e 64 73 2e 6d 69 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 mainBounds.min;..............Vec
340c0 74 6f 72 33 20 6d 61 78 20 3d 20 6d 61 69 6e 42 6f 75 6e 64 73 2e 6d 61 78 3b 0d 0a 0d 0a 20 20 tor3.max.=.mainBounds.max;......
340e0 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 69 20 3d 20 31 3b 20 69 20 3c 20 6d 5f ..........for.(int.i.=.1;.i.<.m_
34100 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 2e 4c 65 6e 67 74 68 20 26 26 20 6d 5f 73 75 62 54 65 subTextObjects.Length.&&.m_subTe
34120 78 74 4f 62 6a 65 63 74 73 5b 69 5d 20 21 3d 20 6e 75 6c 6c 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 xtObjects[i].!=.null;.i++)......
34140 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 6f 75 6e 64 ........{..................Bound
34160 73 20 73 75 62 42 6f 75 6e 64 73 20 3d 20 6d 5f 73 75 62 54 65 78 74 4f 62 6a 65 63 74 73 5b 69 s.subBounds.=.m_subTextObjects[i
34180 5d 2e 6d 65 73 68 2e 62 6f 75 6e 64 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ].mesh.bounds;..................
341a0 6d 69 6e 2e 78 20 3d 20 6d 69 6e 2e 78 20 3c 20 73 75 62 42 6f 75 6e 64 73 2e 6d 69 6e 2e 78 20 min.x.=.min.x.<.subBounds.min.x.
341c0 3f 20 6d 69 6e 2e 78 20 3a 20 73 75 62 42 6f 75 6e 64 73 2e 6d 69 6e 2e 78 3b 0d 0a 20 20 20 20 ?.min.x.:.subBounds.min.x;......
341e0 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e 2e 79 20 3d 20 6d 69 6e 2e 79 20 3c 20 73 75 62 42 ............min.y.=.min.y.<.subB
34200 6f 75 6e 64 73 2e 6d 69 6e 2e 79 20 3f 20 6d 69 6e 2e 79 20 3a 20 73 75 62 42 6f 75 6e 64 73 2e ounds.min.y.?.min.y.:.subBounds.
34220 6d 69 6e 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 78 2e 78 20 min.y;....................max.x.
34240 3d 20 6d 61 78 2e 78 20 3e 20 73 75 62 42 6f 75 6e 64 73 2e 6d 61 78 2e 78 20 3f 20 6d 61 78 2e =.max.x.>.subBounds.max.x.?.max.
34260 78 20 3a 20 73 75 62 42 6f 75 6e 64 73 2e 6d 61 78 2e 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 x.:.subBounds.max.x;............
34280 20 20 20 20 20 20 6d 61 78 2e 79 20 3d 20 6d 61 78 2e 79 20 3e 20 73 75 62 42 6f 75 6e 64 73 2e ......max.y.=.max.y.>.subBounds.
342a0 6d 61 78 2e 79 20 3f 20 6d 61 78 2e 79 20 3a 20 73 75 62 42 6f 75 6e 64 73 2e 6d 61 78 2e 79 3b max.y.?.max.y.:.subBounds.max.y;
342c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 ..............}................V
342e0 65 63 74 6f 72 33 20 63 65 6e 74 65 72 20 3d 20 28 6d 69 6e 20 2b 20 6d 61 78 29 20 2f 20 32 3b ector3.center.=.(min.+.max)./.2;
34300 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f 72 32 20 73 69 7a 65 20 3d 20 6d 61 78 ..............Vector2.size.=.max
34320 20 2d 20 6d 69 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 .-.min;..............return.new.
34340 42 6f 75 6e 64 73 28 63 65 6e 74 65 72 2c 20 73 69 7a 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d Bounds(center,.size);..........}
34360 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 ..............///.<summary>.....
34380 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 20 74 6f 20 55 70 64 61 74 65 20 53 63 61 6c 65 20 .....///.Method.to.Update.Scale.
343a0 69 6e 20 55 56 32 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a in.UV2..........///.</summary>..
343c0 20 20 20 20 20 20 20 20 2f 2f 76 6f 69 64 20 55 70 64 61 74 65 53 44 46 53 63 61 6c 65 28 66 6c ........//void.UpdateSDFScale(fl
343e0 6f 61 74 20 6c 6f 73 73 79 53 63 61 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 7b 0d 0a 20 20 oat.lossyScale)..........//{....
34400 20 20 20 20 20 20 2f 2f 20 20 20 20 2f 2f 20 54 4f 44 4f 3a 20 52 65 73 6f 6c 76 65 20 2d 20 55 ......//....//.TODO:.Resolve.-.U
34420 6e 64 65 72 6c 69 6e 65 20 2f 20 53 74 72 69 6b 65 74 68 72 6f 75 67 68 20 73 65 67 6d 65 6e 74 nderline./.Strikethrough.segment
34440 73 20 6e 6f 74 20 67 65 74 74 69 6e 67 20 74 68 65 69 72 20 53 44 46 20 53 63 61 6c 65 20 61 64 s.not.getting.their.SDF.Scale.ad
34460 6a 75 73 74 65 64 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 2f 2f 44 65 62 75 67 justed.............//....//Debug
34480 2e 4c 6f 67 28 22 2a 2a 2a 20 55 70 64 61 74 65 53 44 46 53 63 61 6c 65 28 29 20 2a 2a 2a 22 29 .Log("***.UpdateSDFScale().***")
344a0 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 2f 2f 20 49 74 65 72 61 74 65 20 74 68 ;............//....//.Iterate.th
344c0 72 6f 75 67 68 20 65 61 63 68 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 2e 0d 0a 20 rough.each.of.the.characters....
344e0 20 20 20 20 20 20 20 2f 2f 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.<
34500 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 43 6f 75 6e 74 3b 20 69 2b 2b 29 .m_textInfo.characterCount;.i++)
34520 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 ..........//....{..........//...
34540 20 20 20 20 20 2f 2f 20 4f 6e 6c 79 20 75 70 64 61 74 65 20 73 63 61 6c 65 20 66 6f 72 20 76 69 .....//.Only.update.scale.for.vi
34560 73 69 62 6c 65 20 63 68 61 72 61 63 74 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 sible.characters...........//...
34580 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 .....if.(m_textInfo.characterInf
345a0 6f 5b 69 5d 2e 69 73 56 69 73 69 62 6c 65 20 26 26 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 o[i].isVisible.&&.m_textInfo.cha
345c0 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 65 6c 65 6d 65 6e 74 54 79 70 65 20 3d 3d 20 54 4d 50 racterInfo[i].elementType.==.TMP
345e0 5f 54 65 78 74 45 6c 65 6d 65 6e 74 54 79 70 65 2e 43 68 61 72 61 63 74 65 72 29 0d 0a 20 20 20 _TextElementType.Character).....
34600 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 .....//........{..........//....
34620 20 20 20 20 20 20 20 20 66 6c 6f 61 74 20 73 63 61 6c 65 20 3d 20 6c 6f 73 73 79 53 63 61 6c 65 ........float.scale.=.lossyScale
34640 20 2a 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 .*.m_textInfo.characterInfo[i].s
34660 63 61 6c 65 20 2a 20 28 31 20 2d 20 6d 5f 63 68 61 72 57 69 64 74 68 41 64 6a 44 65 6c 74 61 29 cale.*.(1.-.m_charWidthAdjDelta)
34680 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f ;..........//............if.(!m_
346a0 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 69 73 55 73 69 6e textInfo.characterInfo[i].isUsin
346c0 67 41 6c 74 65 72 6e 61 74 65 54 79 70 65 66 61 63 65 20 26 26 20 28 6d 5f 74 65 78 74 49 6e 66 gAlternateTypeface.&&.(m_textInf
346e0 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 73 74 79 6c 65 20 26 20 46 6f 6e 74 53 o.characterInfo[i].style.&.FontS
34700 74 79 6c 65 73 2e 42 6f 6c 64 29 20 3d 3d 20 46 6f 6e 74 53 74 79 6c 65 73 2e 42 6f 6c 64 29 20 tyles.Bold).==.FontStyles.Bold).
34720 73 63 61 6c 65 20 2a 3d 20 2d 31 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 scale.*=.-1;............//......
34740 20 20 20 20 20 20 69 6e 74 20 69 6e 64 65 78 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 ......int.index.=.m_textInfo.cha
34760 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 6d 61 74 65 72 69 61 6c 52 65 66 65 72 65 6e 63 65 49 racterInfo[i].materialReferenceI
34780 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 74 ndex;..........//............int
347a0 20 76 65 72 74 65 78 49 6e 64 65 78 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 .vertexIndex.=.m_textInfo.charac
347c0 74 65 72 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 65 78 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 terInfo[i].vertexIndex;.........
347e0 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 ...//............m_textInfo.mesh
34800 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 75 76 73 32 5b 76 65 72 74 65 78 49 6e 64 65 78 20 2b 20 30 Info[index].uvs2[vertexIndex.+.0
34820 5d 2e 79 20 3d 20 73 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 ].y.=.scale;..........//........
34840 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 75 ....m_textInfo.meshInfo[index].u
34860 76 73 32 5b 76 65 72 74 65 78 49 6e 64 65 78 20 2b 20 31 5d 2e 79 20 3d 20 73 63 61 6c 65 3b 0d vs2[vertexIndex.+.1].y.=.scale;.
34880 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 .........//............m_textInf
348a0 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 6e 64 65 78 5d 2e 75 76 73 32 5b 76 65 72 74 65 78 49 6e 64 o.meshInfo[index].uvs2[vertexInd
348c0 65 78 20 2b 20 32 5d 2e 79 20 3d 20 73 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 ex.+.2].y.=.scale;..........//..
348e0 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 6e ..........m_textInfo.meshInfo[in
34900 64 65 78 5d 2e 75 76 73 32 5b 76 65 72 74 65 78 49 6e 64 65 78 20 2b 20 33 5d 2e 79 20 3d 20 73 dex].uvs2[vertexIndex.+.3].y.=.s
34920 63 61 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 cale;..........//........}......
34940 20 20 20 20 2f 2f 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 2f 2f 20 ....//....}............//....//.
34960 50 75 73 68 20 74 68 65 20 75 70 64 61 74 65 64 20 75 76 32 20 73 63 61 6c 65 20 69 6e 66 6f 72 Push.the.updated.uv2.scale.infor
34980 6d 61 74 69 6f 6e 20 74 6f 20 74 68 65 20 6d 65 73 68 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f mation.to.the.meshes.........../
349a0 2f 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 74 65 78 74 49 /....for.(int.i.=.0;.i.<.m_textI
349c0 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 2e 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 nfo.meshInfo.Length;.i++).......
349e0 20 20 20 2f 2f 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 69 66 ...//....{..........//........if
34a00 20 28 69 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 .(i.==.0)..........//...........
34a20 20 6d 5f 6d 65 73 68 2e 75 76 32 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 .m_mesh.uv2.=.m_textInfo.meshInf
34a40 6f 5b 30 5d 2e 75 76 73 32 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 65 6c o[0].uvs2;..........//........el
34a60 73 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 se..........//............m_subT
34a80 65 78 74 4f 62 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 2e 75 76 32 20 3d 20 6d 5f 74 65 78 74 49 extObjects[i].mesh.uv2.=.m_textI
34aa0 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 69 5d 2e 75 76 73 32 3b 0d 0a 20 20 20 20 20 20 20 20 2f nfo.meshInfo[i].uvs2;........../
34ac0 2f 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f /....}..........//}............/
34ae0 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 74 68 6f 64 //.<summary>..........///.Method
34b00 20 74 6f 20 75 70 64 61 74 65 20 74 68 65 20 53 44 46 20 53 63 61 6c 65 20 69 6e 20 55 56 32 2e .to.update.the.SDF.Scale.in.UV2.
34b20 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 ..........///.</summary>........
34b40 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 63 61 6c 65 44 65 6c 74 61 22 3e 3c ..///.<param.name="scaleDelta"><
34b60 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 55 70 64 61 74 65 53 44 46 53 /param>..........void.UpdateSDFS
34b80 63 61 6c 65 28 66 6c 6f 61 74 20 73 63 61 6c 65 44 65 6c 74 61 29 0d 0a 20 20 20 20 20 20 20 20 cale(float.scaleDelta)..........
34ba0 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 63 61 6c 65 44 65 6c 74 61 20 3d 3d {..............if.(scaleDelta.==
34bc0 20 30 20 7c 7c 20 73 63 61 6c 65 44 65 6c 74 61 20 3d 3d 20 66 6c 6f 61 74 2e 50 6f 73 69 74 69 .0.||.scaleDelta.==.float.Positi
34be0 76 65 49 6e 66 69 6e 69 74 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 veInfinity)..............{......
34c00 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 68 61 76 65 50 72 6f 70 65 72 74 69 65 73 43 68 61 6e ............m_havePropertiesChan
34c20 67 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 50 ged.=.true;..................OnP
34c40 72 65 52 65 6e 64 65 72 4f 62 6a 65 63 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 reRenderObject();...............
34c60 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 ...return;..............}.......
34c80 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 69 6e 74 20 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 .........for.(int.materialIndex.
34ca0 3d 20 30 3b 20 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 20 3c 20 6d 5f 74 65 78 74 49 6e 66 6f 2e =.0;.materialIndex.<.m_textInfo.
34cc0 6d 61 74 65 72 69 61 6c 43 6f 75 6e 74 3b 20 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 2b 2b 29 0d materialCount;.materialIndex++).
34ce0 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
34d00 54 4d 50 5f 4d 65 73 68 49 6e 66 6f 20 6d 65 73 68 49 6e 66 6f 20 3d 20 6d 5f 74 65 78 74 49 6e TMP_MeshInfo.meshInfo.=.m_textIn
34d20 66 6f 2e 6d 65 73 68 49 6e 66 6f 5b 6d 61 74 65 72 69 61 6c 49 6e 64 65 78 5d 3b 0d 0a 0d 0a 20 fo.meshInfo[materialIndex];.....
34d40 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 20 69 ...............for.(int.i.=.0;.i
34d60 20 3c 20 6d 65 73 68 49 6e 66 6f 2e 75 76 73 32 2e 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0d 0a 20 .<.meshInfo.uvs2.Length;.i++)...
34d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...............{................
34da0 20 20 20 20 20 20 6d 65 73 68 49 6e 66 6f 2e 75 76 73 32 5b 69 5d 2e 79 20 2a 3d 20 4d 61 74 68 ......meshInfo.uvs2[i].y.*=.Math
34dc0 66 2e 41 62 73 28 73 63 61 6c 65 44 65 6c 74 61 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 f.Abs(scaleDelta);..............
34de0 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ....}..............}............
34e00 20 20 20 20 2f 2f 20 50 75 73 68 20 74 68 65 20 75 70 64 61 74 65 64 20 75 76 32 20 73 63 61 6c ....//.Push.the.updated.uv2.scal
34e20 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 74 6f 20 74 68 65 20 6d 65 73 68 65 73 2e 0d 0a 20 20 e.information.to.the.meshes.....
34e40 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 6d 5f ..........for.(int.i.=.0;.i.<.m_
34e60 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f 2e 4c 65 6e 67 74 68 3b 20 69 2b 2b 29 0d 0a textInfo.meshInfo.Length;.i++)..
34e80 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 ............{..................i
34ea0 66 20 28 69 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 f.(i.==.0)......................
34ec0 6d 5f 6d 65 73 68 2e 75 76 32 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d 65 73 68 49 6e 66 6f m_mesh.uv2.=.m_textInfo.meshInfo
34ee0 5b 30 5d 2e 75 76 73 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d [0].uvs2;..................else.
34f00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 73 75 62 54 65 78 74 4f 62 .....................m_subTextOb
34f20 6a 65 63 74 73 5b 69 5d 2e 6d 65 73 68 2e 75 76 32 20 3d 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 6d jects[i].mesh.uv2.=.m_textInfo.m
34f40 65 73 68 49 6e 66 6f 5b 69 5d 2e 75 76 73 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d eshInfo[i].uvs2;..............}.
34f60 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 46 75 6e 63 74 .........}..............//.Funct
34f80 69 6f 6e 20 74 6f 20 6f 66 66 73 65 74 20 76 65 72 74 69 63 65 73 20 70 6f 73 69 74 69 6f 6e 20 ion.to.offset.vertices.position.
34fa0 74 6f 20 61 63 63 6f 75 6e 74 20 66 6f 72 20 6c 69 6e 65 20 73 70 61 63 69 6e 67 20 63 68 61 6e to.account.for.line.spacing.chan
34fc0 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 ges...........protected.override
34fe0 20 76 6f 69 64 20 41 64 6a 75 73 74 4c 69 6e 65 4f 66 66 73 65 74 28 69 6e 74 20 73 74 61 72 74 .void.AdjustLineOffset(int.start
35000 49 6e 64 65 78 2c 20 69 6e 74 20 65 6e 64 49 6e 64 65 78 2c 20 66 6c 6f 61 74 20 6f 66 66 73 65 Index,.int.endIndex,.float.offse
35020 74 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 56 65 63 74 6f t)..........{..............Vecto
35040 72 33 20 76 65 72 74 65 78 4f 66 66 73 65 74 20 3d 20 6e 65 77 20 56 65 63 74 6f 72 33 28 30 2c r3.vertexOffset.=.new.Vector3(0,
35060 20 6f 66 66 73 65 74 2c 20 30 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 .offset,.0);................for.
35080 28 69 6e 74 20 69 20 3d 20 73 74 61 72 74 49 6e 64 65 78 3b 20 69 20 3c 3d 20 65 6e 64 49 6e 64 (int.i.=.startIndex;.i.<=.endInd
350a0 65 78 3b 20 69 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 ex;.i++)..............{.........
350c0 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 .........m_textInfo.characterInf
350e0 6f 5b 69 5d 2e 62 6f 74 74 6f 6d 4c 65 66 74 20 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 3b o[i].bottomLeft.-=.vertexOffset;
35100 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 ..................m_textInfo.cha
35120 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 4c 65 66 74 20 2d 3d 20 76 65 72 74 65 78 4f racterInfo[i].topLeft.-=.vertexO
35140 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e ffset;..................m_textIn
35160 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 74 6f 70 52 69 67 68 74 20 2d 3d 20 fo.characterInfo[i].topRight.-=.
35180 76 65 72 74 65 78 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d vertexOffset;..................m
351a0 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 6f 74 74 6f _textInfo.characterInfo[i].botto
351c0 6d 52 69 67 68 74 20 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 3b 0d 0a 0d 0a 20 20 20 20 20 mRight.-=.vertexOffset;.........
351e0 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 ...........m_textInfo.characterI
35200 6e 66 6f 5b 69 5d 2e 61 73 63 65 6e 64 65 72 20 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 2e nfo[i].ascender.-=.vertexOffset.
35220 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 y;..................m_textInfo.c
35240 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 62 61 73 65 4c 69 6e 65 20 2d 3d 20 76 65 72 74 haracterInfo[i].baseLine.-=.vert
35260 65 78 4f 66 66 73 65 74 2e 79 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 exOffset.y;..................m_t
35280 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 64 65 73 63 65 6e 64 extInfo.characterInfo[i].descend
352a0 65 72 20 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 2e 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 er.-=.vertexOffset.y;...........
352c0 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 .........if.(m_textInfo.characte
352e0 72 49 6e 66 6f 5b 69 5d 2e 69 73 56 69 73 69 62 6c 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 rInfo[i].isVisible).............
35300 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 .....{......................m_te
35320 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 65 78 5f 42 xtInfo.characterInfo[i].vertex_B
35340 4c 2e 70 6f 73 69 74 69 6f 6e 20 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 3b 0d 0a 20 20 20 L.position.-=.vertexOffset;.....
35360 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 .................m_textInfo.char
35380 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 65 78 5f 54 4c 2e 70 6f 73 69 74 69 6f 6e 20 acterInfo[i].vertex_TL.position.
353a0 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 -=.vertexOffset;................
353c0 20 20 20 20 20 20 6d 5f 74 65 78 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 ......m_textInfo.characterInfo[i
353e0 5d 2e 76 65 72 74 65 78 5f 54 52 2e 70 6f 73 69 74 69 6f 6e 20 2d 3d 20 76 65 72 74 65 78 4f 66 ].vertex_TR.position.-=.vertexOf
35400 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 74 65 78 fset;......................m_tex
35420 74 49 6e 66 6f 2e 63 68 61 72 61 63 74 65 72 49 6e 66 6f 5b 69 5d 2e 76 65 72 74 65 78 5f 42 52 tInfo.characterInfo[i].vertex_BR
35440 2e 70 6f 73 69 74 69 6f 6e 20 2d 3d 20 76 65 72 74 65 78 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 .position.-=.vertexOffset;......
35460 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 ............}..............}....
35480 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 7d 0d 0a 7d 00 00 00 00 00 01 00 00 00 80 b9 2a 00 ......}........}..}...........*.
354a0 00 00 00 00 00 00 00 00 0d 00 00 00 54 4d 50 72 6f 5f 50 72 69 76 61 74 65 00 00 00 00 00 00 00 ............TMPro_Private.......