Age | Commit message (Collapse) | Author |
|
|
|
have not enough chars in current font.
This avoids some ugly 'missing char' in previews - not all cases of course, but most common ones.
A complete solution would be much much more involved, and probably not worth it here.
Definitively not before a release, at least!
|
|
|
|
Workaround freetype's use of fopen by swapping FT_New_Face for our own version which uses BLI_fopen.
|
|
also use UNLIKELY for error cases
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
FT headers seems to be inconsistent here, FT_KERNING_UNFITTED
is defined as an enum element, but FT_Get_Kerning expects UInt.
Just case for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
|
|
|
|
Apparently mingw/gcc is too stupid to recognise that the values
in alphatest will only be used if they're within the range of
unsigned char (i.e. 0 <= x < 255) when this is done using a ternary
operator. Then again, it's quite hard for humans to immediately
parse what is going on here either! Converting this clever code
back to a more obvious form that mere mortals (and compilers it
seems) can handle with ease ;)
|
|
place (pragmas were copied around).
also enable more strict warnings for BLF (which had some incorrect casts).
|
|
takes a key as an arg and isnt popping any element from the hash as you might expect).
add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
|
|
if statements and redundant initialization vars.
|
|
render.
Printing text on the color grid image would initialize font glyphs from a thread at
the same time as the UI, causing conflicts. The freetype glyph renderer needs to be
mutex locked because it uses a shared buffer internally even when rendering for
different fonts. Also needed to change the image generate function to use the render
monospace font to avoid conflicts in blenfont.
What's still weak in the blenfont API is that there is no distinction between a font
and a thread using that font to render with some particular size, style, etc.
|
|
|
|
and BLF.
|
|
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()
|
|
or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc
|
|
|
|
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
|
|
unneeded size_t -> int conversions.
|
|
|
|
|
|
only drawing on one side of an unfilled spline.
|
|
|
|
when rendering the sequencer can output float or char buffers which stamp wasn't accounting for.
|
|
into account.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strings (better change then the one I made recently).
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
also fixed some spelling errors.
|
|
- also ifdef'd out more smoke function when the modifiers disabled.
|
|
|
|
|
|
when toggling use antialising user preference. Also fix some other use of
uninitialized memory found by valgrind.
|
|
|
|
|
|
- remove saniy checks from blf_font.c, the callers now check instead.
- move duplicate code into defines (may move into static functions).
- move kerning checks into const values set at the start of the function, rather then checking on every character.
|
|
|