Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-31Cleanup: blf internal struct namingCampbell Barton
- use x/y/width/height/max as a suffix. - replace 'num' prefix /w 'len' suffix.
2018-03-26BLF: Don't use user preferencesSergey Sharybin
BLF is a low level module, which might (and is) used without Blender. Thanks Campbell for review!
2018-03-26BLF: Cleanup, indentation inside of preprocessorSergey Sharybin
2017-07-08Fix T51889: new file or load factory settings results in broken UI.Brecht Van Lommel
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.
2017-04-14BLF: avoid glyph cache use-after freeCampbell Barton
Causes crash if the font size isn't set after clearing (see T51200)
2017-01-26Fix (unreported) crash when file browser attempts to show preview of some ↵IRIE Shinsuke
defective font Confirmed with the Wine's bundled fonts.
2016-07-22fix confusing operator precedenceMike Erwin
Assigning within a conditional is confusing and error prone so I rewrote in a more straightforward way. Found with PVS-Studio T48917
2016-06-08GPU: fix/workaround basic shader font-colorCampbell Barton
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.
2016-04-27Fix alpha blending w/ font drawing & byte bufferCampbell Barton
2016-04-22BLF: use float vector passing color argsCampbell Barton
2016-03-28BLF: alpha support for drawing to bufferCampbell Barton
2016-03-05Cleanup: quiet -Wcomma, cast to void where neededCampbell Barton
2016-02-19Fix crash drawing fonts at size 1Campbell Barton
2016-01-03Fix text wrapping off-by-one error w/ string widthCampbell Barton
Caused odd white space error in tooltip enum values.
2015-12-28Fix for building ghost-testsCampbell Barton
2015-12-15use float (not double) for font matrixMike Erwin
Following up on recent double --> float commits in the game engine.
2015-12-08OpenGL: remove non-power-of-two texture check, where even ES 2.0 does not ↵Brecht Van Lommel
need it.
2015-12-08OpenGL: use sized texture internal formatsMike Erwin
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.
2015-12-06OpenGL: rename simple shader to basic shader.Brecht Van Lommel
2015-12-06OpenGL: use simple shader for texture drawing in a few places.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D1645
2015-11-28OpenGL: assume GL_TEXTURE_ENV_MODE GL_MODULATE is the default state.Brecht Van Lommel
2015-10-17Cleanup: warningsCampbell Barton
- remove NULL checks for args already set as ATTR_NONNULL. - double promotion.
2015-10-03Fix Broken Font Preview (reported over IRC by kopias, thanks).Bastien Montagne
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.
2015-09-20Cleanup: Use new vector transform functionsJulian Eisel
2015-09-19BLF: correct ResultBLF.width value when wrappingCampbell Barton
2015-09-18BLF: initial word-wrap supportCampbell Barton
- 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).
2015-08-28Fix assigning flag to boolCampbell Barton
2015-08-19Hopefully fix broken windows after recent i18n split.Bastien Montagne
We need to include BLI_utildefines.h when using __func__...
2015-08-19Cleanup: style + doxyCampbell Barton
2015-08-18Refactor translation code out of blenfontCampbell Barton
- 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`.
2015-06-02Fix drawing text on >2gig buffers (stamp for eg)Campbell Barton
2015-06-01Font Preview: fallback to default english strings in case translated ones ↵Bastien Montagne
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!
2015-05-19Building without Python works againCampbell Barton
2015-04-20Cleanup: use bool /w flag checksCampbell Barton
2015-04-13Cleanup: styleCampbell Barton
2015-04-10Thumbnails: Add translations to font preview.Bastien Montagne
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... :/
2015-04-10BLF translation: fix BLF_lang_get(), add UI-agnostic BLF_translate/_do helpers.Bastien Montagne
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.
2015-04-08Font preview for file browserCampbell Barton
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).
2015-04-08BLF: use regular unsigned int'sCampbell Barton
So GL isnt needed to include BLF types.
2015-04-08BLF: Fix clamping drawing into byte bufferCampbell Barton
2015-02-06Cleanup: styleCampbell Barton
2015-02-04Fix for recent LANG locale workaroundSergey Sharybin
Need to get a copy of the string since stored pointer is affected by subsequent calls of setlocale().
2015-02-03Fix T43544: Runtime Error when Locale is not validSergey Sharybin
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.
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-20BLF: remove paranoid checks for unset default fontCampbell Barton
2015-01-12Fix T42069: Fonts /w non-ascii paths fail in win32Campbell Barton
Workaround freetype's use of fopen by swapping FT_New_Face for our own version which uses BLI_fopen.
2014-12-04Fix T42797: -Werror=sign-conversion Triggered in blf_glyph.cBastien Montagne
Very minor, but since it was reported...
2014-11-29Cleanup: unused headersCampbell Barton
2014-11-23Refactor: BLI_path_util (part 2)Campbell Barton
Use BKE_appdir/tempdir naming prefix for functions extracted from BLI_path_util
2014-11-23Refactor: BLI_path_util (split out app directory access)Campbell Barton
This module is intended for path manipulation functions but had utility functions added to access various directories.