rdb
9061fd9416
dtoolutil: fix TextEncoder methods for Python 3
...
The no-arguments get_text() and set_text() will now return Unicode strings in Python 3, but passing in an encoding will make them return/take bytes objects.
In Python 2, they all take regular strings, but Unicode is also accepted by the no-argument get_text() and set_text().
In the future we probably want to remove most of this interface for Python users, to whom all this is unnecessary since it duplicates functionality already in the standard library.
2018-10-08 22:14:51 +02:00
rdb
1e084e0b2b
text: add thread safety to TextNode
...
This does not 100% cover all the base class TextProperties, however, so you still need to be careful not to access those from two threads at once.
2018-09-25 11:35:16 +02:00
rdb
5457d76b94
text: slight perf improvement for TextNode card/frame generation
2018-09-25 11:08:22 +02:00
Sam Edwards
4695557a5d
general: Don't require BUILDING_* for static builds
2018-08-31 23:54:32 -06:00
Mitchell Stokes
f663d215d5
Remove some unused variables
2018-08-19 16:55:07 +02:00
rdb
0f4168a304
text: use 64-bit coords in TextAssembler if vertices-float64 set
2018-07-26 22:58:07 +02:00
rdb
c6ed4e1836
general: don't cast to regular pointer when returning a PointerTo
...
This is inefficient because it induces an unnecessary ref()/unref() pair when we just need to move the pointer out of the function. Thanks to 23128e4695 , we can now move between related pointer types, making the .p() hack unnecessary.
2018-07-08 21:40:58 +02:00
Sam Edwards
b2bfb31114
general: Remove `using std::*` from headers
...
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.
Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards
7e61891c09
general: Fix more DLL linkage and EXPCL_PANDA_ macros
2018-06-12 16:14:33 -06:00
rdb
b88bd99704
Various compiler warning fixes
2018-06-12 12:38:07 +02:00
Sam Edwards
7790f8429d
general: Fully qualify header references into the std namespace
...
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards
e2b4353800
general: Replace NULL (and 0 as pointer) with C++11 nullptr
...
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
Sam Edwards
159b43e563
general: Address a few more compiler warnings
2018-06-01 02:54:13 -06:00
rdb
db5dd98d33
general: further warning fixes, use -Wno-unused-variable if NDEBUG
...
Disabling unused variable checking is needed in NDEBUG builds because of the heavy use of temporary variables in asserts.
2018-05-30 22:51:04 +02:00
rdb
6b726fa697
general: fix various compiler warnings and issues exposed thereby
2018-05-30 11:09:35 +02:00
rdb
3077316782
general: use proper deleted funcs instead of stubs with asserts
...
This gives better compile-time diagnostics and saves on code, while also better communicating intent.
2018-05-23 23:35:27 +02:00
rdb
9fad3dba60
general: remove macros for compatibility with non-C++11 compilers
...
Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
2018-05-23 23:33:05 +02:00
Sam Edwards
52e7c952b3
putil: Rename config_util to config_putil
2018-05-14 02:36:42 -06:00
Sam Edwards
9dd37e9dbc
general: Add guards to ensure proper BUILDING_ macros defined
...
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
rdb
5c90f64182
text: fix is_whitespace() assertion when invalid chars are included
2018-02-17 20:50:18 +01:00
rdb
46c8852eed
text: fix for certain versions of HarfBuzz
2017-11-20 20:40:51 +01:00
rdb
dd2806c8bd
Mark constructors 'explicit' for which coercion makes no sense
2017-11-06 19:47:38 +01:00
rdb
160f652d58
text: use HarfBuzz for text shaping; support right-to-left text
2017-04-25 12:25:31 +02:00
rdb
605ac1189f
text: kerning should respect text scale
2017-03-28 21:13:03 +02:00
rdb
e1c0e7d1d4
text: add experimental kerning support, enabled by 'text-kerning'
2017-03-27 19:15:09 +02:00
rdb
edb83fe89a
Various optimizations to reduce performance overhead of rendering
2017-02-21 02:20:06 +01:00
rdb
9facf874ab
Let compiler synthesize QuadDef move assignment operator
...
This hopefully fixes a compile issue with older clang versions.
2017-01-04 23:53:55 +01:00
rdb
8381118a97
Assorted tweaks and compile warning fixes
2016-07-14 12:54:39 +02:00
rdb
106cf2cad0
Fix randomly slanted/crashing TextGraphics
2016-07-12 19:31:23 +02:00
rdb
54819dbcde
Fix crash when using TextGraphic in texts
2016-06-28 19:11:58 +02:00
rdb
18874fa151
Replace PN_int/uint types with stdint.h types, since all compilers we support have them.
...
Plus, we already had code that relied on them being available anyway.
2016-05-11 00:27:58 +02:00
rdb
ce29ae490d
Interrogate improvements, more properties, MAKE_SEQ_PROPERTY
2016-05-11 00:16:53 +02:00
Sam Edwards
6b8f78c9e0
general: Fix missing includes.
2016-03-15 18:30:24 -07:00
tobspr
0fcfb8e372
New file headers, new comment style
2016-02-17 17:47:48 +01:00
rdb
f4f7df9949
Add signed-distance-field text rendering to DynamicTextFont and egg-mkfont
2015-12-31 22:00:37 +01:00
rdb
86a898b40a
Tack on combining diacritics for static fonts if font doesn't specify modified letters
2015-12-31 12:48:02 +01:00
rdb
bccddaf4e8
TextNode properties, fix setters that return error bool
2015-12-29 18:46:37 +01:00
rdb
bad0a7321a
Change by liuzhengcai to fix compile error on 32-bit MSVC 2010
2015-12-24 17:03:40 +01:00
rdb
e4857a58bb
Add many more Python properties
2015-12-24 16:17:34 +01:00
rdb
834cc57deb
More properties for classes
2015-12-16 21:41:55 +01:00
rdb
3bacd69caf
Fix GeomTextGlyph warning when compiling without freetype
2015-11-24 13:39:42 +01:00
rdb
fb0902512e
Use DynamicTextGlyph for spaces (fixes glyph.is_whitespace())
2015-11-19 13:00:29 +01:00
Sam Edwards
90d3347fd1
text: Fix missing includes.
2015-11-14 15:08:42 -08:00
rdb
815cbc1acb
Remove accidentally checked in debug message
2015-11-13 15:05:06 +01:00
rdb
a453ec1925
Overhaul text generation; now 75x as fast as before.
2015-11-13 01:44:03 +01:00
Sam Edwards
5ebb6c511f
general: Fix missing includes.
2015-11-11 12:35:04 -08:00
rdb
eecb1fb3f2
Cache text states
2015-11-11 17:43:30 +01:00
rdb
db3ab953e4
Remove ppremake, genPyCode, and all hacks created to support them
2015-11-09 19:06:49 +01:00
rdb
16e7831566
Remove executable permissions from files that don't need them
2015-04-05 15:41:49 +02:00
rdb
cbd70ad8af
Move all Python bindings out of core DLLs into the .pyd files.
2015-02-10 14:30:51 +01:00