zhanggyb / BlendInt

[Obselete]
GNU Lesser General Public License v3.0
44 stars 8 forks source link

Compiling error on Ubuntu14.04 and fonts error #6

Open UnilVision opened 9 years ago

UnilVision commented 9 years ago

Really cool UI library!

I built and test it on my system but had two problems occur:

1) I have to change the CMakeList.txt like the following:

configure glfw

find_package(GLFW REQUIRED) if(GLFW_FOUND) include_directories(${GLFW_INCLUDE_DIR}) set(LIBS ${GLFW_LIBRARIES} -lXcursor -lXxf86vm -lpthread -lXinerama -lXi -lXrandr ${LIBS} ) endif()

or I will get some run time errors such as 'xxx function not defined.' (The .so and samples are generated) and I don't know why.

2) My system is Ubuntu 14.04. When I use the file-selector dialog and open any directory with some Chinese(中文) code, all font goes wrong, something worse than ♢♢♢, rendering failed totally.

zhanggyb commented 9 years ago

I'll find a Ubuntu PC to check the compiling issue as soon as I can.

Could you please check the GLFW version you are using? I haven't used Ubuntu for a long time, as far as I know, the default GLFW version in Ubuntu repository is too old. This project require GLFW 3.1+ because it uses new APIs in GLFW 3.1.

For the font issue, it's mostly because the font loaded does not support Chinese characters.

In current code, in /lib/stock/theme.cpp, I use:

#ifdef DEBUG
  strncpy(data_.default_font, "Source Han Sans CN", 256);
#else
  strncpy (data_.default_font, "Droid Sans", 256);
#endif

You may need to change the default font to another one. For example, "Wen Quan Yi". (use fc-list to find the font name)

Please be noted even so you may meet new problem because the code for font is not complete. Sorry, this is my weekend open-source project, but I'm busy and have no time to update this project lately.