Blender Git Loki

Git Commits -> Revision 5792e77

Revision 5792e77 by Shinsuke Irie (master)
March 12, 2013, 07:25 (GMT)
Patch [#34373] Use i18n monospace font in Text editor and Python console

This patch allows Blender to display i18n monospace font in the text
editor and the Python interactive console. Wide characters that occupy
multiple columns such as CJK characters can be displayed correctly.
Furthermore, wrapping, selection, suggestion, cursor drawing, and
syntax highlighting should work.

Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic

To estimate how many columns each character occupies, this patch uses
wcwidth.c written by Markus Kuhn and distributed under MIT-style license:

http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c

wcwidth.c is stored in extern/wcwidth and used as a static library.

This patch adds new API to blenfont, blenlib and blenkernel:

BLF_get_unifont_mono()
BLF_free_unifont_mono()
BLF_draw_mono()
BLI_wcwidth()
BLI_wcswidth()
BLI_str_utf8_char_width()
BLI_str_utf8_char_width_safe()
txt_utf8_offset_to_column()
txt_utf8_column_to_offset()

Commit Details:

Full Hash: 5792e77239c43aea0afc21b2df96153ba31c5399
SVN Revision: 55203
Parent Commit: 6669ee4
Lines Changed: +888, -183

4 Added Paths:

/extern/wcwidth/CMakeLists.txt (+38, -0) (View)
/extern/wcwidth/SConscript (+9, -0) (View)
/extern/wcwidth/wcwidth.c (+309, -0) (View)
/extern/wcwidth/wcwidth.h (+36, -0) (View)

23 Modified Paths:

/extern/CMakeLists.txt (+1, -0) (Diff)
/extern/SConscript (+1, -0) (Diff)
/source/blender/blenfont/BLF_api.h (+1, -0) (Diff)
/source/blender/blenfont/BLF_translation.h (+2, -0) (Diff)
/source/blender/blenfont/intern/blf.c (+15, -0) (Diff)
/source/blender/blenfont/intern/blf_font.c (+34, -0) (Diff)
/source/blender/blenfont/intern/blf_internal.h (+1, -0) (Diff)
/source/blender/blenfont/intern/blf_translation.c (+38, -0) (Diff)
/source/blender/blenkernel/BKE_text.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/text.c (+40, -6) (Diff)
/source/blender/blenlib/BLI_string_utf8.h (+8, -1) (Diff)
/source/blender/blenlib/CMakeLists.txt (+1, -0) (Diff)
/source/blender/blenlib/intern/string_utf8.c (+37, -0) (Diff)
/source/blender/blenlib/SConscript (+1, -1) (Diff)
/source/blender/editors/interface/interface_style.c (+22, -2) (Diff)
/source/blender/editors/space_console/console_draw.c (+28, -14) (Diff)
/source/blender/editors/space_info/textview.c (+83, -36) (Diff)
/source/blender/editors/space_text/text_draw.c (+123, -92) (Diff)
/source/blender/editors/space_text/text_ops.c (+54, -31) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+1, -0) (Diff)
/source/blenderplayer/CMakeLists.txt (+1, -0) (Diff)
/source/creator/CMakeLists.txt (+1, -0) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021