Age | Commit message (Collapse) | Author |
|
Now disabling anti-aliasing doesn't impact sequencer, render stamp etc.
|
|
Remove from blender/nodes, collada, blenfont & render.
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
- use x/y/width/height/max as a suffix.
- replace 'num' prefix /w 'len' suffix.
|
|
BLF is a low level module, which might (and is) used without Blender.
Thanks Campbell for review!
|
|
|
|
Fix some cases that still assumed there to be a global DPI, instead of a per
window DPI that needs to be set before reading U.dpi.
|
|
Causes crash if the font size isn't set after clearing (see T51200)
|
|
defective font
Confirmed with the Wine's bundled fonts.
|
|
Assigning within a conditional is confusing and error prone so I
rewrote in a more straightforward way.
Found with PVS-Studio T48917
|
|
All text was displaying black.
BLF uses alpha-only textures which aren't supported by the basic-shader,
Workaround this by using texture swizzle so the RGB components of the texture are set to 1.
|
|
|
|
|
|
|
|
|
|
|
|
Caused odd white space error in tooltip enum values.
|
|
|
|
Following up on recent double --> float commits in the game engine.
|
|
need it.
|
|
Maybe this is pedantic but I read it’s best to explicitly set the
desired component size.
Also append “_ARB” to float texture formats since those need an
extension in GL 2.1.
|
|
|
|
Differential Revision: https://developer.blender.org/D1645
|
|
|
|
- remove NULL checks for args already set as ATTR_NONNULL.
- double promotion.
|
|
Broken by font wrap commit rBf2341f829654c4dc97, there was actually two things here:
* Using non-initialized color (which lead to transparent drawing...), we need to use new
`blf_draw_buffer__start/end` helpers here too, made them shared internally.
* Using `draw_str_i18n_nbr` as `draw_str[i]` length, ugh! That's the number of utf8 glyphs of
translated string, not the length of untranslated string!
This fix must be backported to final 2.76.
|
|
|
|
|
|
- Adds support for word wrapping to Blender's BLF font library.
- Splits lines when width limit is reached or on explicit \n newlines.
Details:
- Word wrapping is used when `BLF_WORD_WRAP` flag is enabled.
- There is a single loop to handle line wrapping,
this runs callback, passing in a substring,
this way we can avoid code-duplication for all word-wrapped
versions of functions... OR... avoid having to add support
for word-wrapping directly into each function.
- The `ResultBLF` struct was added to be able to get the number
of wrapped lines, when calling otherwise unrelated functions
such as `BLF_draw/BLF_width/BLF_boundbox`,
which can be passed as the last argument to `BLF_*_ex()` functions.
- The `ResultBLF` struct is used to store the result of drawing
(currently only the number of lines wrapped, and the width).
|
|
|
|
We need to include BLI_utildefines.h when using __func__...
|
|
|
|
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
|
|
|
|
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!
|
|
|
|
|
|
|
|
Not much to say, this is pretty straightforward.
We just have to add current locale to thumbnails 'signature', so that
previews get re-generated when we change locale...
Tested with Japanese and French.
Btw, I do not really understand why using BLF in ImBuf is badlevel... :/
|
|
BLF_lang_get() shall return 'default' Blender locale (en_US) when translations
are completely disabled!
Also, add BLF_translate() and BLF_translate_do() to allow translating some strings
outside of label/tip context, but still only when i18n global flag is enabled.
|
|
D1002 by @plasmasolutions, with own refactoring.
Note, needed to do a bad-level call here (IMB -> BLF)
Also can't use the BLF API directly because its not thread-safe.
So keep the function isolated (blf_thumbs.c).
|
|
So GL isnt needed to include BLF types.
|
|
|
|
|
|
Need to get a copy of the string since stored pointer is affected
by subsequent calls of setlocale().
|
|
This is not a real fix and only prevents crash, textures IO might be not
working totally correct if they're unicode path or so. Proper solution
would be to detect which locale we can use and set LANG, LC_ALL and friends.
|
|
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
|
|
|
|
Workaround freetype's use of fopen by swapping FT_New_Face for our own version which uses BLI_fopen.
|
|
Very minor, but since it was reported...
|