Browse Source

multiple fonts

A
Josh 2 years ago
parent
commit
c4e6d1f62c
  1. 8
      namedropper/Assets/Fonts/narrow.meta
  2. 2691
      namedropper/Assets/Fonts/narrow/BellCentennialStd-Address SDF.asset
  3. 8
      namedropper/Assets/Fonts/narrow/BellCentennialStd-Address SDF.asset.meta
  4. BIN
      namedropper/Assets/Fonts/narrow/BellCentennialStd-Address.otf
  5. 21
      namedropper/Assets/Fonts/narrow/BellCentennialStd-Address.otf.meta
  6. 2691
      namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed SDF.asset
  7. 8
      namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed SDF.asset.meta
  8. BIN
      namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed.otf
  9. 21
      namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed.otf.meta
  10. 0
      namedropper/Assets/Fonts/narrow/IMPACT SDF.asset
  11. 0
      namedropper/Assets/Fonts/narrow/IMPACT SDF.asset.meta
  12. 0
      namedropper/Assets/Fonts/narrow/IMPACT.TTF
  13. 0
      namedropper/Assets/Fonts/narrow/IMPACT.TTF.meta
  14. 2691
      namedropper/Assets/Fonts/narrow/saira-extracondensed.asset
  15. 8
      namedropper/Assets/Fonts/narrow/saira-extracondensed.asset.meta
  16. BIN
      namedropper/Assets/Fonts/narrow/saira-extracondensed.regular.ttf
  17. 21
      namedropper/Assets/Fonts/narrow/saira-extracondensed.regular.ttf.meta
  18. 8
      namedropper/Assets/Fonts/wide.meta
  19. 2295
      namedropper/Assets/Fonts/wide/Chubby SDF.asset
  20. 8
      namedropper/Assets/Fonts/wide/Chubby SDF.asset.meta
  21. BIN
      namedropper/Assets/Fonts/wide/Chubby.ttf
  22. 21
      namedropper/Assets/Fonts/wide/Chubby.ttf.meta
  23. 0
      namedropper/Assets/Fonts/wide/Cooper Black Regular SDF.asset
  24. 0
      namedropper/Assets/Fonts/wide/Cooper Black Regular SDF.asset.meta
  25. 0
      namedropper/Assets/Fonts/wide/Cooper Black Regular.ttf
  26. 0
      namedropper/Assets/Fonts/wide/Cooper Black Regular.ttf.meta
  27. 2259
      namedropper/Assets/Fonts/wide/Marleigh SDF.asset
  28. 8
      namedropper/Assets/Fonts/wide/Marleigh SDF.asset.meta
  29. BIN
      namedropper/Assets/Fonts/wide/Marleigh.ttf
  30. 21
      namedropper/Assets/Fonts/wide/Marleigh.ttf.meta
  31. 8
      namedropper/Assets/Prefabs/Player Prefab.prefab
  32. 27
      namedropper/Assets/Scripts/Player.cs

8
namedropper/Assets/Fonts/narrow.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9add986516a43a74787597c86ecb9625
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

2691
namedropper/Assets/Fonts/narrow/BellCentennialStd-Address SDF.asset

File diff suppressed because one or more lines are too long

8
namedropper/Assets/Fonts/narrow/BellCentennialStd-Address SDF.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9eaf9be2f5a38d548a079cf16cf1c031
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/Fonts/narrow/BellCentennialStd-Address.otf

Binary file not shown.

21
namedropper/Assets/Fonts/narrow/BellCentennialStd-Address.otf.meta

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 89da403613948e749ba1e89128068b94
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Bell Centennial Std
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

2691
namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed SDF.asset

File diff suppressed because one or more lines are too long

8
namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed SDF.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 941170feac88e0d4e9491f977d4519c6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed.otf

Binary file not shown.

21
namedropper/Assets/Fonts/narrow/Franklin Gothic Std Extra Condensed.otf.meta

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: b875d5502e0a0c3408892a7e09fc9084
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Franklin Gothic Std
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

0
namedropper/Assets/Fonts/IMPACT SDF.asset → namedropper/Assets/Fonts/narrow/IMPACT SDF.asset

0
namedropper/Assets/Fonts/IMPACT SDF.asset.meta → namedropper/Assets/Fonts/narrow/IMPACT SDF.asset.meta

0
namedropper/Assets/Fonts/IMPACT.TTF → namedropper/Assets/Fonts/narrow/IMPACT.TTF

0
namedropper/Assets/Fonts/IMPACT.TTF.meta → namedropper/Assets/Fonts/narrow/IMPACT.TTF.meta

2691
namedropper/Assets/Fonts/narrow/saira-extracondensed.asset

File diff suppressed because one or more lines are too long

8
namedropper/Assets/Fonts/narrow/saira-extracondensed.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 46ea247bba470174bbd3e7e7926aa1df
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/Fonts/narrow/saira-extracondensed.regular.ttf

Binary file not shown.

21
namedropper/Assets/Fonts/narrow/saira-extracondensed.regular.ttf.meta

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 7b59862f0df7d3947aa035d52f6c197a
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Saira ExtraCondensed
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

8
namedropper/Assets/Fonts/wide.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2479b01dc05dace4586dc36779f91906
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

2295
namedropper/Assets/Fonts/wide/Chubby SDF.asset

File diff suppressed because one or more lines are too long

8
namedropper/Assets/Fonts/wide/Chubby SDF.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 194098de32b2a0c4693cf91a795dc45a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/Fonts/wide/Chubby.ttf

Binary file not shown.

21
namedropper/Assets/Fonts/wide/Chubby.ttf.meta

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: bdde6466db18b6745aa53b3ee29b4269
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Chubby
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

0
namedropper/Assets/Fonts/Cooper Black Regular SDF.asset → namedropper/Assets/Fonts/wide/Cooper Black Regular SDF.asset

0
namedropper/Assets/Fonts/Cooper Black Regular SDF.asset.meta → namedropper/Assets/Fonts/wide/Cooper Black Regular SDF.asset.meta

0
namedropper/Assets/Fonts/Cooper Black Regular.ttf → namedropper/Assets/Fonts/wide/Cooper Black Regular.ttf

0
namedropper/Assets/Fonts/Cooper Black Regular.ttf.meta → namedropper/Assets/Fonts/wide/Cooper Black Regular.ttf.meta

2259
namedropper/Assets/Fonts/wide/Marleigh SDF.asset

File diff suppressed because one or more lines are too long

8
namedropper/Assets/Fonts/wide/Marleigh SDF.asset.meta

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: af6376c68f84da346bde223df089a82f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/Fonts/wide/Marleigh.ttf

Binary file not shown.

21
namedropper/Assets/Fonts/wide/Marleigh.ttf.meta

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: 01b78cc88d6697a42ac2d3cf66bf28c9
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Marleigh
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

8
namedropper/Assets/Prefabs/Player Prefab.prefab

@ -494,6 +494,14 @@ MonoBehaviour:
_keyDrop: 0 _keyDrop: 0
_team: 0 _team: 0
_text: {fileID: 0} _text: {fileID: 0}
_longFonts:
- {fileID: 11400000, guid: 9eaf9be2f5a38d548a079cf16cf1c031, type: 2}
- {fileID: 11400000, guid: 941170feac88e0d4e9491f977d4519c6, type: 2}
- {fileID: 11400000, guid: 46ea247bba470174bbd3e7e7926aa1df, type: 2}
_shortFonts:
- {fileID: 11400000, guid: 194098de32b2a0c4693cf91a795dc45a, type: 2}
- {fileID: 11400000, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
- {fileID: 11400000, guid: af6376c68f84da346bde223df089a82f, type: 2}
_forTopicSelect: 0 _forTopicSelect: 0
_playerNumber: 0 _playerNumber: 0
_spriteOptions: [] _spriteOptions: []

27
namedropper/Assets/Scripts/Player.cs

@ -14,6 +14,8 @@ public class Player : MonoBehaviour
[SerializeField] KeyCode _keyDrop; [SerializeField] KeyCode _keyDrop;
[SerializeField] Team _team; [SerializeField] Team _team;
[SerializeField] TMPro.TextMeshProUGUI _text; [SerializeField] TMPro.TextMeshProUGUI _text;
[SerializeField] List<TMPro.TMP_FontAsset> _longFonts = new List<TMPro.TMP_FontAsset>();
[SerializeField] List<TMPro.TMP_FontAsset> _shortFonts = new List<TMPro.TMP_FontAsset>();
[SerializeField] bool _forTopicSelect = false; [SerializeField] bool _forTopicSelect = false;
Game _game; Game _game;
[SerializeField] int _playerNumber; [SerializeField] int _playerNumber;
@ -118,6 +120,7 @@ public class Player : MonoBehaviour
{ {
_text.text = _game.PickRandomWord(); _text.text = _game.PickRandomWord();
SetRandomTextRotation(); SetRandomTextRotation();
SetFont();
} }
} }
@ -126,6 +129,30 @@ public class Player : MonoBehaviour
_text.gameObject.transform.eulerAngles = new Vector3(0f, 0f, Random.Range(-10f, 10f)); _text.gameObject.transform.eulerAngles = new Vector3(0f, 0f, Random.Range(-10f, 10f));
} }
void SetFont()
{
string[] words = _text.text.Split(' ');
int maxLength = 0;
foreach (string word in words)
{
int length = word.Length;
if (length > maxLength)
{
maxLength = length;
}
}
if (maxLength > 6)
{
_text.font = _longFonts[Random.Range(0, _longFonts.Count)];
}
else
{
_text.font = _shortFonts[Random.Range(0, _shortFonts.Count)];
}
}
private void OnCollisionEnter2D(Collision2D collision) private void OnCollisionEnter2D(Collision2D collision)
{ {
GameObject other = collision.gameObject; GameObject other = collision.gameObject;

Loading…
Cancel
Save