HTML Label, Dynamic Font, Asset Management(more powerful) for cocos2dx

HTML Label, Dynamic Font, Asset Management(more powerful) for cocos2dx
0.0 0


Hey guys:
Thank Walzer and Cocos2dx community provides us with such a good game engine.
Recently our project uses some features that I think everybody may also be used.

it contains:
1.dfont: dynamic font management program, can using system fonts, supports glyph stroke, outline, shadows, based on freetype2 system.
2.RichControls: a rich text controls package, currently supports HTML label, based on dfont.
3.cells: a powerful assets management system, supports single file or package download, md5 checksum, break-point resume, ghost download, download priority adjust, automatically decompress, organize your assets using CDF (xml based file description file) on demand … all features running asynchronous.

you should put the code into cocos2dx::extensions, and add freetype2 into cocos2dx::platform::thirdparty(your target platform)

source code:

testing project & tools for cells:

Using different colors in one line of text?

hi Kevin;
Can you share some example code of mapping texcoords and positions by using GlyphSlot?


just FYI


what is the version of freetype2 required?
I used freetype2 copy from cocos2d-x develop branch,but it linked faield,
armeabi] SharedLibrary :
D:/cocos2dx/cocos2d-x-2.2.1/projects/endless/…/…/…/cocos2dx/platform/third_party/android/prebuilt/libfreetype2/libs/armeabi/libfreetype.a(sfnt.o):sfnt.c:function error_callback: error: undefined reference to ‘png_set_longjmp_fn’
D:/cocos2dx/cocos2d-x-2.2.1/projects/endless/…/…/…/cocos2dx/platform/third_party/android/prebuilt/libfreetype2/libs/armeabi/libfreetype.a(sfnt.o):sfnt.c:function Load_SBit_Png: error: undefined reference to ‘png_set_longjmp_fn’
collect2.exe: error: ld returned 1 exit status
/cygdrive/d/android/android-ndk-r9b/build/core/ recipe for target ‘obj/local/armeabi/’ failed
make: * [obj/local/armeabi/] Error 1
make: Leaving directory ‘/cygdrive/d/cocos2dx/cocos2d-x-2.2.1/projects/endless/’

my cocos2d-x is 2.2.1


i found that the libpng in cocos2d-x develop branch is 1.6.2,but 1.2.46 in cocos2d-x 2.2.1
so how can i deal with it?


:stuck_out_tongue: The work you’ve done is very useful for me.And I modify it to make it works on cocos2dx 3.0 alpha 1.Thank you very lot,and I hope HtmlLabel can be added on new cocos2dx version.