Ray
6dbec47488
Redesigned TextSplit() function
2019-02-11 18:02:32 +01:00
Jak Barnes
1e15616b69
Fixed as issue where strrchr in LoadBMFont would only look for forward slashes, instead of backslashes causing strlen to fail on a null string
2019-02-10 16:01:44 +00:00
Ray
7615512af1
ADDED: TextToInteger()
...
Custom implementation that returns -1 if it fails (no negative values supported)
2019-02-06 14:20:14 +01:00
Ray
5755c5e310
Review DrawTextRecEx() formatting
2019-02-04 09:57:02 +01:00
Ray
01ace743d0
Merge pull request #734 from Demizdor/master
...
Added DrawTextRecEx()
2019-02-03 20:47:13 +01:00
Rob Loach
90d5bb79e5
Fix font cannot be narrowed to type 'int'
...
Getting the following strict error....
```
src/text.c:117:105: error: constant expression evaluates to 2398692640 which
cannot be narrowed to type 'int' [-Wc++11-narrowing]
...0x00000000, 0x00000000, 0x00200020, 0x0001b000, 0x00000000, 0x00000000, 0x8ef92520, 0x00020a00...
^~~~~~~~~~
```
Switching it to an unsigned int fixes it.
2019-01-23 22:28:10 -05:00
Demizdor
6f66425946
Added DrawTextRecEx()
2019-01-23 21:36:54 +02:00
Ray
e91c84e33a
Remove comment
2019-01-21 10:25:59 +01:00
raysan5
1038e79b36
Corrected issue with text measure on Latin-1 chars
...
Considering chars inputs come in UTF8 form!
2019-01-05 15:04:18 +01:00
raysan5
0619571149
ADDED: DrawTextRec() and example
2018-12-29 14:44:28 +01:00
raysan5
01338b0a14
WARNING: BREAKING CHANGE
...
Added a bunch of useful text management functions.
Consequently, some already available functions like `FormatText()` and `SubText()` has been renamed for consistency. Created temporal fallbacks for old names.
raylib version bumped to 2.3.
2018-12-26 13:26:34 +01:00
raysan5
96207a8a02
REVIEWED: LoadFontEx()
...
Changed parameters order for consistency with LoadFontData() and other functions when an array is passed by parameter and array size is the following parameter.
2018-12-25 15:17:42 +01:00
Ray
87ad244ee0
Exposed LoadFontFromImage()
2018-12-20 12:58:27 +01:00
Ray
f822650a3b
Support externally provided compilation flags
...
Useful in case raylib compilation want to be automated and compilation config flags provided by command line.
2018-12-18 00:20:08 +01:00
Ray
7361ed24e2
Added support for .otf fonts
...
stb_truetype supports some .otf fonts, just exposed that functionality.
2018-12-10 00:29:52 +01:00
Ray
a8ac6e2ef9
Increase text management buffers size
2018-12-04 13:15:42 +01:00
Ray
fc1c9505ba
Remove end-line spaces
2018-11-06 15:10:50 +01:00
Ray
298203a41a
ADDED: Some functions...
...
text: IsEqualText() -WIP-
audio: SaveWAV()
audio: ExportWaveAsCode()
textures: ExportImageAsCode()
2018-10-29 16:18:06 +01:00
Ray
72431c6c36
Code tweaks
2018-10-24 13:45:17 +02:00
Ray
550dd40cb3
ADDED: SplitText() function
2018-10-23 15:43:19 +02:00
Ray
3b674cd281
Some security checks on font loading
2018-10-18 17:48:33 +02:00
Ray
764766bfb2
Some formatting tweaks
2018-10-18 16:00:11 +02:00
noshbar
ec6b21bd91
Fixes memory leak in text.c
...
GenImageFontAtlas() allocates an array of stbrp_rect for the packing functions, but it never frees them.
2018-10-10 22:41:20 +02:00
Ray
ec5c9686b3
Improved data export capabilities!
...
REVIEWED: ExportImage()
REVIEWED: ExportMesh()
ADDED: ExportWave()
REMOVED: Internal funcs: SavePNG(), SaveBMP()
NOTE: These changes break the API (parameters order)
2018-09-17 16:56:02 +02:00
Ray
5b09630d45
Update mini_al to v0.8.8
...
Some minor tweaks around
2018-09-14 12:47:31 +02:00
Ray
dfb8837c46
Support aliased font texture generation
...
Useful for bitmaps pixelated fonts where anti-aliasing is not desired!
Change also enables additional font generation mechanisms in a future (cleartype, hinting...).
2018-09-06 16:56:21 +02:00
Ray
d0608b031a
Corrected issue with types
2018-09-05 10:47:40 +02:00
Ray
b042fe12e6
Reviewed spacings on latest PR
2018-08-06 20:49:47 +02:00
Kim Kulling
ecf8bff4aa
Fix compiler warnings, first part
2018-08-04 10:32:16 +02:00
Ray
292499bdeb
Reviewed LoadFontData() and GenImageFontAtlas()
2018-07-15 20:03:05 +02:00
raysan5
103bc7dfc6
Corrected issue with GetFontDefault()
...
Note for me: Replace All is NOT your friend...
2018-07-05 19:17:06 +02:00
raysan5
d881c73257
Renamed GetDefaultFont() to GetFontDefault()
...
Library consistency rename... yes, I know, it breaks the API...
2018-07-05 19:08:24 +02:00
Ray
afe81d94ce
Re-added: LoadFontEx()
2018-06-30 19:58:44 +02:00
Ray
0e135118fd
Improved GenImageFontAtlas()
2018-06-21 00:18:13 +02:00
Ray
75ba5aca55
Improved font generation and SDF
...
Added: data to CharInfo struct
Added: LoadFontData()
Added: GenImageFontAtlas()
Removed: LoadFontEx()
Removed: LoadTTF() [internal]
Some code tweaks
2018-06-20 00:52:14 +02:00
raysan5
559b9b8cc3
Corrected possible memory leak
2018-05-21 18:57:54 +02:00
raysan5
25d5e907ec
Some code review (mainly comments)
2018-05-20 00:37:16 +02:00
Ray
2aae62cea2
Header tweak and comments
2018-05-17 00:04:36 +02:00
Ray San
ec33e7d705
BREAKING CHANGE: Renamed SpriteFont type to Font
...
- Preparing MP3 files support
- Jumped version to raylib 2.0-dev (too many breaking changes...)
2018-05-04 16:59:48 +02:00
Ray San
6324697ffd
Rectangle parameters changed to float
...
- Some examples tweaks
- Reviewed ImageFormat()
- Use float for text fontSize
2018-05-04 16:25:31 +02:00
Ahmad Fatoum
1841afad11
Refactor all #define SUPPORT_* into a config.h
...
That way, a user needs only to touch a single file to configure what
features raylib is built with.
Include guards are left out intentionally, because config.h should only
be included in source files, not headers.
Later on, config.h can also define the raylib version (#461 ).
2018-04-07 23:37:48 +02:00
Ahmad Fatoum
80bf636f81
Don't exceed signed int range when shifting left
...
Fixes UB in #489 , found by UBSan.
2018-02-25 03:17:57 +01:00
Ahmad Fatoum
76aca9b0d1
Fix possible buffer overflow in LoadBMFont
...
Width specifier doesn't include NUL terminator.
Fixes #487 found by AddressSanitizer.
2018-02-25 03:03:37 +01:00
raysan5
4492a70a4b
Support UTF8 basic characters on ImageTextEx()
...
Supported UTF8 range equivalent to [128..255] (80h..FFh)
Exposed and renamed text function GetGlyphIndex()
Renamed spriteFont parameter name to simply font
Small security check on transmission mission ending screen
2018-02-18 18:07:57 +01:00
Ray
8af5f9dfe0
Avoid rendering SPACE character!
2018-02-12 11:25:00 +01:00
Ray
1ce8c80de9
Corrected several issues...
2018-01-28 16:52:18 +01:00
Ray San
00c34a035c
Updated copyright year
2017-12-20 12:37:08 +01:00
user
54587d7fdb
proper if-clauses for disabling functionality in text.c
2017-12-14 11:41:31 +01:00
Ray
a6f9cc5629
Remove rres support
...
Let the user choose if using rres external library
2017-12-11 11:55:02 +01:00
Ray San
3d755d617a
Some code tweaks...
2017-11-02 20:08:52 +01:00