Supported tags:
- <small>: makes the font 20% smaller
- <big>: makes the font 25% bigger
- <img src="" />: to add an image
- <font face="path to font" size="size" color="#00ffaa">: font
attributes
- <i>: italics
- <b>: bold
- <u>: underline
- <del> strike-through
- </br>: new line
Also adds support for strikethrough, italics, bold and underlie to
`Label`
Contains tests for UIRichText and Label
Squashed commit of the following:
commit a0d6ae0513d40dbf414930210ab032a49d8984a0
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Jan 19 20:39:21 2016 -0800
cleanup LabelTestNew
commit 0cf423af85d88a42fc1317207feeb3d05da7f8ab
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Jan 19 20:34:53 2016 -0800
adds maaaany tests
...and fixes width and height in <img src="">
commit e8ba6acd5d79bbc766d7aa02ef166e166c801d01
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Fri Jan 15 19:41:37 2016 -0800
Label + URL working Ok
commit 36689e29ee3d77310e92264a09084cc06e30664c
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Fri Jan 15 18:24:44 2016 -0800
adding this code just in case...
... should use a listener component instead
commit af03708950e74483b875d0baad593aa6ed242a04
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Thu Jan 14 20:23:36 2016 -0800
URL node
plus <de><u> and <a img
commit e3a4930b012c0b3756752dac6ffb5ad43d24ae99
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Jan 13 18:42:18 2016 -0800
strikethrough and underline implemented
they support multiline and horizontal alignment as well
includes test
however vertical alignment might not work
commit 640ccf39f56e153db46785a61be7000e898174c7
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Jan 12 18:14:57 2016 -0800
bug fixes
commit 5e41fb76e91c571639585a609a255eb41797a302
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Jan 12 16:47:20 2016 -0800
adds italics and bold "disable test"
commit 202c5a45bb9c8ea160b9f6880ef858874e07814b
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Jan 12 14:40:13 2016 -0800
adds italics test
commit d1a8b421445053cc36860fc376f52692a3672dfe
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Mon Jan 11 20:53:23 2016 -0800
italics is working ok
commit fdd02087fce920c27c2409301ec88685fe68085b
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Fri Jan 8 17:18:56 2016 -0800
color, size and face working
commit c01bdef6b1d49f8805b69d4c162b74cd00c8f5b3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Thu Jan 7 19:02:16 2016 -0800
initial commit
The current purge->reset behavior occurs per label according to scene
graph priority. This has two disadvanages; firstly, any labels that are
initialized but not part of the scene graph will not be reset.
Secondly, any labels which share atlases in the FontAtlasCache may not
be reset since each label will call releaseFontAtlas individually before
resetting its fontConfig. This means that any shared atlases may not be
released all the way to a reference count of 0 and the invalid atlas
will not be deleted and reset from scratch.
By putting a fixed priority on both the purge and reset steps we can
ensure that firstly: all labels will be reset regardless of whether they
have been added to the scene-graph. Secondly, ALL labels with the same
atlas must call releaseFontAtlas before any others are allowed to
rebuild their textures. This will prevent any old atlases from sticking
around after a new GL context is created.
This is a fix for Github issue #8305https://github.com/cocos2d/cocos2d-x/issues/8305