Commit graph

213 commits

Author SHA1 Message Date
raysan5
d28e73849b Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
raysan5
b5842434c2 Corrected missing semicolon 2020-03-27 18:31:16 +01:00
raysan5
bc2c6251f8 [text] Review TRACELOG() messages, categorized 2020-03-27 17:16:07 +01:00
raysan5
7ae7a87f8a Remove trail spaces 2020-03-25 19:41:51 +01:00
Random
e07281f8bd
Fixed DrawTextRecEx() selection when wordwrap is ON (again) (#1149) 2020-03-25 10:27:43 +01:00
raysan5
4af4483f5f Added security check in case init fails #1135 2020-03-17 20:57:01 +01:00
Ray
7fa12844ed [text] TextToUpper(): Added note on diacritics 2020-03-12 13:02:09 +01:00
Ray
c3386300d3 Remove comment 2020-03-04 18:23:31 +01:00
Ray
1be68d8cfe Tweak on variable init 2020-02-27 16:14:50 +01:00
Ray
5ff0776235 Remove trail spaces and some tweaks 2020-02-27 13:33:09 +01:00
Ray
b029fb6d31 REDESIGNED: LoadFontEx()
Using new file I/O ABI
2020-02-27 13:19:58 +01:00
Ray
c5d5d19443 Remove trail spaces 2020-02-26 20:23:55 +01:00
Ray
a77273d8d8 Make sure current text buffer is empty #1109 2020-02-24 11:15:02 +01:00
Ray
d62a2f793f Improved GetFPS() calculation for average 2020-02-19 12:20:15 +01:00
Ray
39e73ccc4d [text] TextLength() security check 2020-02-17 00:47:05 +01:00
Ray
484c6b360f Reviewed Cppcheck issues #1098 2020-02-12 13:16:18 +01:00
raysan5
34fafb733f Corrected issue with toupper() usage 2020-02-09 16:11:32 +01:00
Ray
f4ca5b378a Review missing include 2020-02-06 18:10:52 +01:00
Ray
86bdf60887 Corrected issue with TextToUpper() and TextToLower()
This issue was breaking multiple things...
2020-02-06 17:52:33 +01:00
Ray
b5fe41f41a Review libc dependencies and remove when possible
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions:

 - stdlib.h: primary dependency is for malloc() and free()
 - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI?
 - string.h: just around 8 functions required
 - math.h: just around 8 functions required
 - others: 1-2 functions required for some other headers
2020-02-04 16:55:24 +01:00
Ray
c3f06b7470 Remove all trail spaces 2020-02-03 19:26:28 +01:00
Ray
cde26c743c Replace TraceLog() function by TRACELOG macro
Added SUPPORT_TRACELOG_DEBUG config
2020-02-03 19:13:24 +01:00
Ray
5ec87c4c6f ADDED: TextCopy() #1083 2020-01-26 18:38:46 +01:00
Ray
7ae426c377 Redesigned TextToInteger() 2020-01-24 17:58:19 +01:00
Ray
49b723e76d Correct issue with define 2020-01-22 15:11:22 +01:00
raysan5
9c52a4932d Corrected issue with types 2020-01-19 12:49:33 +01:00
raysan5
bec467705e Review custom allocators 2020-01-19 11:23:38 +01:00
Ray
1f82b0d847 Comment tweak 2020-01-15 13:13:30 +01:00
Ray
b0ce16b460 LoadFontData(): generate empty image for space
This could be required on texture packing ;)
2020-01-15 11:53:46 +01:00
raysan5
b5b3bbb30b Review variable name 2020-01-06 19:49:52 +01:00
raysan5
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
raysan5
08adb4b8c3 Check and testing timming #865 2019-12-04 17:59:17 +01:00
Ray
3ffe34f9bb ADDED: DrawTextCodepoint()
- Renamed GetGlyphIndex() parameter
 - Review DrawTextEx() implementation
 - Review DrawTextRecEx() implementation
2019-12-01 13:28:14 +01:00
raysan5
d5aab98ac9 Review PR #1015
Just simplified code a bit
2019-11-24 14:08:27 +01:00
brankoku
1f66f0d9a2 [text] TextFormat() caching (#1015) 2019-11-24 14:01:35 +01:00
João Coelho
75b0264f35 fix various problems, thanks CppCheck :) (#1005)
* explained a bit more the core_window_letterbox example

* fixed a few 'ups' moments that could lead to mild head pain and time loss
2019-10-29 15:57:19 +01:00
Ray
d73abe73e5 REDESIGN: TextToUtf8()
ADDED: CodepointToUtf8()
2019-10-28 20:53:32 +01:00
Ray
f6df47dfe5 ADDED: TextToUtf8() -WIP-
RENAMED: TextCountCodepoints() -> GetCodepointsCount()
2019-10-27 23:56:48 +01:00
Ray
06910eedfd Minor comment tweak 2019-10-22 23:15:26 +02:00
Ray
ca92f43c27 Review some defines 2019-10-22 00:37:10 +02:00
Ray
ab52f98480 Update text.c 2019-10-21 17:37:47 +02:00
Ray
b75511248d Remove trailing spaces 2019-10-17 17:18:03 +02:00
Ray
e40c26dea5 REVIEWED: GetCodepoints() issue
- Improved LoadBMFont()
2019-10-17 17:07:09 +02:00
Ray
7baa2975ec REDESIGNED: IsFileExtension()
Now it accepts a ';' separated list of extensions, useful to check multiple extensions
2019-10-11 20:13:11 +02:00
Ray
e0cb892d2d ADDED: GetCodepoints()
Get the unicode equivalent characters (as int array) from a UTF-8 text array... maybe this function is renamed to be clearer to users...
2019-10-11 20:12:15 +02:00
Ray
e67c842faa Tweak on atlas size computing
Some generated fonts were not fitting the image...
2019-08-24 20:03:47 +02:00
Ray
2f42b0ce85 REVIEW: TextSplit()
Just adding a security check
2019-08-19 15:09:54 +02:00
Ray
b4d67499a7 BREAKING CHANGE: Read description
Changes:

 - Font structure has been redesigned, CharInfo structure contained character rectangle within font texture, it has not much sense, considering that it was an information relative to the font atlas generated and not the character itself, so character rectangles have been moved out from CharInfo to Font.
 - CharInfo included a data parameters to contain character pixel data (usually grayscale), generated on TTF font generation. It was inconsistent with other fonts types, so, now CharInfo includes directly an Image of the glyph.
 - REDESIGNED: GenImageFontAtlas(), additional recs parameter added, loaded and filled inside the function to export atlas characters rectangles, instead of silently modify the input CharInfo data.
 - REVIEWED: ImageTextEx(), funtion retrieved the font atlas image from the GPU, that was slow and problematic in several platforms. Now it uses directly the CharInfo image. Support for unicode codepoints has also been added.
 - REDESIGNED: ImageDraw(), now it includes an additional parameter, the color tint, not only it could be useful for several situations but also function signature is more consistent with similar functions.
 - ADDED: ImageFromImage() to generate a new image from a piece of another image.
 - REVIEWED: GetNextCodepoint(), renamed parameters to be more clear.

Also all examples and games that were affected by those changes have been reviewed.
2019-07-24 15:05:14 +02:00
Ray
632d064b21 Review text functions return value
It needs to be freed
2019-07-22 21:29:50 +02:00
Ray
1b249ac1e1 Define some globals 2019-06-19 15:43:35 +02:00