Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.2.2] - 2018-03-28
### Changes
- Calling SetAllDirty() on a TMP text component will now force a regeneration of the text object including re-parsing of the text.
- Fixed potential Null Reference Exception that could occur when assigning a new fallback font asset.
- Removed public from test classes.
- Fixed an issue where using nested links (which doesn't make sense conceptually) would result in an error. Should accidental use of nested links occurs, the last / most nested ends up being used.
- Fixed a potential text alignment issue where an hyphen at the end of a line followed by a new line containing a single word too long to fit the text container would result in miss alignment of the hyphen.
- Updated package license.
- Non-Breaking Space character (0xA0) will now be excluded from word spacing adjustments when using Justified or Flush text alignment.
- Improved handling of Underline, Strikethrough and Mark tag with regards to vertex color and Color tag alpha.
- Improved TMP_FontAsset.HasCharacter(char character, bool searchFallbacks) to include a recursive search of fallbacks as well as TMP Settings fallback list and default font asset.
- The &ltgradient&gt tag will now also apply to sprites provided the sprite tint attribute is set to a value of 1. Ex. &ltsprite="Sprite Asset" index=0 tint=1&gt.
- Updated Font Asset Creator Plugin to allow for cancellation of the font asset generation process.
- Added callback to support the Scriptable Render Pipeline (SRP) with the normal TextMeshPro component.
- Improved handling of some non-breaking space characters which should not be ignored at the end of a line.
- Sprite Asset fallbacks will now be searched when using the &ltsprite&gt tag and referencing a sprite by Unicode or by Name.
- Updated EmojiOne samples from https://www.emojione.com/ and added attribution.
- Removed the 32bit versions of the TMP Plugins used by the Font Asset Creator since the Unity Editor is now only available as 64bit.
- The isTextTruncated property is now serialized.
- Added new event handler to the TMP_TextEventHandler.cs script included in Example 12a to allow tracking of interactions with Sprites.
  • Loading branch information
Unity Technologies committed Mar 27, 2018
1 parent aa17dbc commit 863c885
Show file tree
Hide file tree
Showing 31 changed files with 534 additions and 393 deletions.
12 changes: 12 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
image: node:6.10.0

stages:
- push_to_packman_staging

push_to_packman_staging:
stage: push_to_packman_staging
only:
- tags
script:
- curl -u $USER_NAME:$API_KEY https://staging-packages.unity.com/auth > .npmrc
- npm publish
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
# Changelog
This is the release of the TextMesh Pro UPM package. This release is the equivalent of release 1.0.56.xx.0b3 of TextMesh Pro.
These are the release notes for the TextMesh Pro UPM package which was first introduced with Unity 2018.1. Please see the following link for the Release Notes for prior versions of TextMesh Pro. http://digitalnativestudios.com/forum/index.php?topic=1363.0

See the following link for the Release Notes for version 1.0.56.xx.0b3 of TextMesh Pro. http://digitalnativestudios.com/forum/index.php?topic=1363.0
## [1.2.2] - 2018-03-28
### Changes
- Calling SetAllDirty() on a TMP text component will now force a regeneration of the text object including re-parsing of the text.
- Fixed potential Null Reference Exception that could occur when assigning a new fallback font asset.
- Removed public from test classes.
- Fixed an issue where using nested links (which doesn't make sense conceptually) would result in an error. Should accidental use of nested links occurs, the last / most nested ends up being used.
- Fixed a potential text alignment issue where an hyphen at the end of a line followed by a new line containing a single word too long to fit the text container would result in miss alignment of the hyphen.
- Updated package license.
- Non-Breaking Space character (0xA0) will now be excluded from word spacing adjustments when using Justified or Flush text alignment.
- Improved handling of Underline, Strikethrough and Mark tag with regards to vertex color and Color tag alpha.
- Improved TMP_FontAsset.HasCharacter(char character, bool searchFallbacks) to include a recursive search of fallbacks as well as TMP Settings fallback list and default font asset.
- The &ltgradient&gt tag will now also apply to sprites provided the sprite tint attribute is set to a value of 1. Ex. &ltsprite="Sprite Asset" index=0 tint=1&gt.
- Updated Font Asset Creator Plugin to allow for cancellation of the font asset generation process.
- Added callback to support the Scriptable Render Pipeline (SRP) with the normal TextMeshPro component.
- Improved handling of some non-breaking space characters which should not be ignored at the end of a line.
- Sprite Asset fallbacks will now be searched when using the &ltsprite&gt tag and referencing a sprite by Unicode or by Name.
- Updated EmojiOne samples from https://www.emojione.com/ and added attribution.
- Removed the 32bit versions of the TMP Plugins used by the Font Asset Creator since the Unity Editor is now only available as 64bit.
- The isTextTruncated property is now serialized.
- Added new event handler to the TMP_TextEventHandler.cs script included in Example 12a to allow tracking of interactions with Sprites.

## [1.2.1] - 2018-02-14
### Changes
Expand Down
32 changes: 3 additions & 29 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
**Unity Companion Package License v1.0 ("_License_")**
TextMesh Pro copyright © 2014-2018 Unity Technologies ApS

Copyright © 2017 Unity Technologies ApS ("**_Unity_**")
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).

Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions:

1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted.

1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way.

1. *Ownership & Grant Back to You*.

3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content.

3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity.

3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License.

1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand).

1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms.

1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License.

1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License.

1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect.

1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute.
Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.
Binary file modified Package Resources/TMP Essential Resources.unitypackage
Binary file not shown.
Binary file modified Package Resources/TMP Examples & Extras.unitypackage
Binary file not shown.
9 changes: 0 additions & 9 deletions Plugins/32 Bit Plugins.meta

This file was deleted.

Binary file removed Plugins/32 Bit Plugins/TMPro_Plugin.bundle
Binary file not shown.
59 changes: 0 additions & 59 deletions Plugins/32 Bit Plugins/TMPro_Plugin.bundle.meta

This file was deleted.

Binary file removed Plugins/32 Bit Plugins/TMPro_Plugin.dll
Binary file not shown.
58 changes: 0 additions & 58 deletions Plugins/32 Bit Plugins/TMPro_Plugin.dll.meta

This file was deleted.

Binary file modified Plugins/64 Bit Plugins/TMPro_Plugin.bundle
Binary file not shown.
Binary file modified Plugins/64 Bit Plugins/TMPro_Plugin.dll
Binary file not shown.
43 changes: 30 additions & 13 deletions Scripts/Editor/TMPro_FontAssetCreatorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ private enum PreviewSelectionTypes { PreviewFont, PreviewTexture, PreviewDistanc
private float m_renderingProgress;
private bool isRenderingDone = false;
private bool isProcessing = false;
private bool isGenerationCancelled = false;

private Object font_TTF;
private TMP_FontAsset m_fontAssetSelection;
Expand Down Expand Up @@ -123,7 +124,6 @@ public void OnEnable()
m_editorWindow = this;
UpdateEditorWindowSize(768, 768);


// Get the UI Skin and Styles for the various Editors
TMP_UIStyleManager.GetUIStyles();

Expand All @@ -147,11 +147,11 @@ public void OnDisable()

TMPro_EventManager.COMPUTE_DT_EVENT.Remove(ON_COMPUTE_DT_EVENT);

// Cancel font asset generation just in case one is in progress.
TMPro_FontPlugin.SendCancellationRequest(CancellationRequestType.WindowClosed);

// Destroy Engine only if it has been initialized already
if (TMPro_FontPlugin.Initialize_FontEngine() == 99)
{
TMPro_FontPlugin.Destroy_FontEngine();
}
TMPro_FontPlugin.Destroy_FontEngine();

// Cleaning up allocated Texture2D
if (m_destination_Atlas != null && EditorUtility.IsPersistent(m_destination_Atlas) == false)
Expand Down Expand Up @@ -249,8 +249,12 @@ public void Update()
{
isProcessing = false;
isRenderingDone = false;
UpdateRenderFeedbackWindow();
CreateFontTexture();

if (isGenerationCancelled == false)
{
UpdateRenderFeedbackWindow();
CreateFontTexture();
}
}
}

Expand Down Expand Up @@ -548,14 +552,15 @@ void DrawControls()
bool isEnabled = GUI.enabled = font_TTF == null || isProcessing ? false : true; // Enable Preview if we are not already rendering a font.
if (GUILayout.Button("Generate Font Atlas", GUILayout.Width(290)) && characterSequence.Length != 0 && GUI.enabled)
{
if (font_TTF != null)
if (isProcessing == false && font_TTF != null)
{
int error_Code;
m_font_Atlas = null;

error_Code = TMPro_FontPlugin.Initialize_FontEngine(); // Initialize Font Engine
if (error_Code != 0)
{
if (error_Code == 99)
if (error_Code == 0xF0)
{
//Debug.Log("Font Library was already initialized!");
error_Code = 0;
Expand All @@ -572,7 +577,7 @@ void DrawControls()

if (error_Code != 0)
{
if (error_Code == 99)
if (error_Code == 0xF1)
{
//Debug.Log("Font was already loaded!");
error_Code = 0;
Expand Down Expand Up @@ -638,6 +643,7 @@ void DrawControls()
if (font_renderMode == RenderModes.DistanceField32) strokeSize = font_style_mod * 32;

isProcessing = true;
isGenerationCancelled = false;

ThreadPool.QueueUserWorkItem(SomeTask =>
{
Expand All @@ -649,26 +655,37 @@ void DrawControls()
});

previewSelection = PreviewSelectionTypes.PreviewFont;

}
}
}


// FONT RENDERING PROGRESS BAR
GUILayout.Space(1);
progressRect = GUILayoutUtility.GetRect(0, 20, GUILayout.Width(289));
progressRect = GUILayoutUtility.GetRect(0, 20, GUILayout.Width(288));

GUI.enabled = true;
EditorGUI.ProgressBar(progressRect, Mathf.Max(0.01f, m_renderingProgress), "Generation Progress");
progressRect.x += 266;
progressRect.y += 1;
progressRect.width = 20;
progressRect.height = 16;
GUI.enabled = isProcessing ? true : false;
if (GUI.Button(progressRect, "X"))
{
TMPro_FontPlugin.SendCancellationRequest(CancellationRequestType.CancelInProgess);
m_renderingProgress = 0;
isProcessing = false;
isGenerationCancelled = true;
}
GUI.enabled = isEnabled;

// FONT STATUS & INFORMATION
GUISkin skin = GUI.skin;
GUI.skin = TMP_UIStyleManager.TMP_GUISkin;

GUILayout.Space(5);
GUILayout.BeginVertical(TMP_UIStyleManager.TextAreaBoxWindow);
GUILayout.BeginVertical(TMP_UIStyleManager.TextAreaBoxWindow, GUILayout.Width(290));
output_ScrollPosition = EditorGUILayout.BeginScrollView(output_ScrollPosition, GUILayout.Height(145));
EditorGUILayout.LabelField(output_feedback, TMP_UIStyleManager.Label);
EditorGUILayout.EndScrollView();
Expand Down
Loading

0 comments on commit 863c885

Please sign in to comment.