Commit graph

83 commits

Author SHA1 Message Date
Bill Kendrick
0517b4392c Update URL to https://tuxpaint.org/ everywhere
Also, add other social media accounts to list of places to
announce Tux Paint in RELEASE docs.

Also, list a ton more options missing from default example config file
"src/tuxpaint.conf"
2022-12-11 01:29:25 -08:00
dolphin6k
c9193bae2e Removed wrong comment. 2022-12-11 17:36:36 +09:00
dolphin6k
33ef6456bd Returning zero instead of cmp from do_surfcmp() stopped listing all available localized labels on font selector.
In addition, removed Hiragana from translated strings for font scoring.
I have to learn more about this method before doing so.
2022-12-11 10:34:48 +09:00
Bill Kendrick
1f22332415 Use Japanese characters, not "Aa", in font selector when available
Also closes https://sourceforge.net/p/tuxpaint/bugs/266/ by
using code based on Pere's patch.  Thanks to Shin-ichi & Pere!
2022-12-09 22:11:32 -08:00
Mark Kim
3849480fd4 Pango loads Tux Paint-supplied fonts on macOS.
Previously Pango loaded system-supplied fonts instead, which could lead
to fonts not rendering in a human-readable text.  This change fixes
https://sourceforge.net/p/tuxpaint/bugs/265/
2022-12-02 22:57:38 -05:00
Bill Kendrick
9d70b5837c WIP: Cleaned up some compile-time warnings...
...that cropped up in SDL2 branch.
2022-11-14 23:21:45 -08:00
Bill Kendrick
cc05925d9e Re-ran indent on all .c & .h source code files
Like so --
  find . -name "*.c" -or -name "*.h" -exec  indent -nbfda -npcs -npsl -bli0 --no-tabs {} \;

The `indent` invocation differs from the last one noted in
CHANGES.txt (from 2006!?), in that I've added "--no-tabs",
to ensure indents are all space-based.
2022-09-15 00:14:20 -07:00
Mark Kim
ef70ddada6 minor fixes for macOS
Minor fixes from merging the master (SDL1) branch:

- KMOD_META in SDL1 is KMOD_GUI in SDL2. Changed.
- loadfonts() requires additional arguments in the SDL2 branch. Added.
2022-02-19 11:47:12 -05:00
Pere Pujal i Carabantes
b7414433cb Merge branch 'master' into sdl2.0
Catching up with latest devel
Still things to solve/do:
Apply label seems to not work, neither in master
Onscreen keyboard size doesn't perform as in master
Test on other OSs, Windows, Android, ...
2022-02-18 00:29:40 +01:00
Mark Kim
2cc4217a0c macOS check for locale fonts in Tux Paint system preferences location 2022-02-12 22:13:26 -05:00
dolphin6k
be5cbc22ba Fixed abnormal exit of threaded font scan which prevented enabling text/label tools on some environment such as Rocky Linux 8. 2022-01-01 19:51:31 +01:00
dolphin6k
c67dfbc562 Fixed abnormal exit of threaded font scan which prevented enabling text/label tools on some environment such as Rocky Linux 8. 2021-12-22 22:24:53 +09:00
Pere Pujal i Carabantes
35dd1fb4ce Correcting syntax. 2021-12-21 00:31:05 +01:00
Pere Pujal i Carabantes
88d8252952 Merge branch 'master' into sdl2.0 2021-11-08 23:33:49 +01:00
Bill Kendrick
f65fe54a2c Going back to squelching notices re: unusable fonts
Only doing so if DEBUG set.
2021-11-08 13:21:01 -08:00
Pere Pujal i Carabantes
1afe9e155c Merge branch 'master' into sdl2.0
Tons of bugfixes and improvements for Windows by Toyama Shin-Ichi
Angle rotation and some magic tools by Bill.
2021-11-06 08:59:22 +01:00
dolphin6k
7c8f6bca80 Addressed warnings when compiling on MinGW/MSYS
Following warnings still remain so far.

src/tuxpaint.c:199:2: warning: #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR" [-Wcpp]
  199 | #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR"
      |  ^~~~~~~

src/parse.gperf: In function 'parse_one_option':
src/parse.gperf:306:45: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'char *' as the destination; expected 'char' or an explicit length [-Wsizeof-pointer-memaccess]
  306 |   memcpy(offset+(char*)tmpcfg, &opt, sizeof(char*)); /* FIXME: This causes a warning; should it be 'sizeof(char)', or do we need to have the warning suppressed? -bjk 2021.10.14 */
      |                                             ^~~~

src/dirwalk.c: In function 'tp_ftw':
src/dirwalk.c:348:2: warning: #warning Failed to see DT_UNKNOWN [-Wcpp]
  348 | #warning Failed to see DT_UNKNOWN
      |  ^~~~~~~

src/get_fname.c: In function 'get_fname':
src/get_fname.c💯3: warning: 'dir' may be used uninitialized in this function [-Wmaybe-uninitialized]
  100 |   snprintf(f, sizeof(f),
      |   ^~~~~~~~~~~~~~~~~~~~~~
  101 |            "%s%c%s",
      |            ~~~~~~~~~
  102 |     dir, (*name) ? '/' : '\0', /* Some mkdir()'s don't like trailing slashes */
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103 |     name);
      |     ~~~~~

magic/src/cartoon.c:178:99: warning: unused parameter 'last' [-Wunused-parameter]
  178 | static void do_cartoon(void *ptr, int which ATTRIBUTE_UNUSED, SDL_Surface * canvas, SDL_Surface * last, int x, int y)
      |                                                                                     ~~~~~~~~~~~~~~^~~~
2021-11-05 12:23:09 +09:00
Bill Kendrick
adc181e3ec More debugging in dirwalk & fonts 2021-10-28 22:52:06 -07:00
Bill Kendrick
d9596af63f Pausing SDL_ttf -> SDL_pango project for now 2021-10-26 23:25:21 -07:00
Bill Kendrick
59920d3ce9 More debug output when TuxPaint_Font_OpenFont ends
Also, avoid unused var. declaration when FORKED_FONTS is disabled.
2021-10-26 23:08:47 -07:00
Bill Kendrick
173b813a04 Hacking on TuxPaint_Font_OpenFont
More DEBUG output.  Looking into having SDL_ttf open a font,
get its name, and then see whether SDL_Pango can load it.
(If not, fall back to SDL_ttf.)

That code is not working, and "#if 0"'d out, for the moment.
2021-10-26 22:49:46 -07:00
Bill Kendrick
8d9ddebcd1 Always echo to stderr if cannot TTF_OpenFont a TTF 2021-10-26 22:17:28 -07:00
Mark Kim
39cc096ece iOS port initial commit
Known Issues
------------
- No printing support.
- No typing support using the OS virtual keyboard.  iOS needs to be signalled
  to bring up the virtual keyboard when the text tool is active.  We also may
  need to do some finagling to make IM work with the virtual keyboard.
- OS language detection doesn't work yet.
- Quitting doesn't close the app.  It just displays a black screen until it is
  force-closed.
- Need to include cross-compilation instructions.

Possible Issues
---------------
- No text display.  This is likely an issue with how pango and related
  libraries were cross-compiled rather than an issue with Tux Paint code.  From
  the error output it appears to be a font rendering issue.
- SVG integration couldn't be tested because RSVG library has not yet be
  cross-compiled successfully.
- Only tested under the iOS Simulator (and not on an actual iOS device yet.)
2021-03-21 23:01:49 -04:00
Mark Kim
92196bd69a iOS port initial commit
Known Issues
------------
- No printing support.
- No typing support using the OS virtual keyboard.  iOS needs to be signalled
  to bring up the virtual keyboard when the text tool is active.  We also may
  need to do some finagling to make IM work with the virtual keyboard.
- OS language detection doesn't work yet.
- Quitting doesn't close the app.  It just displays a black screen until it is
  force-closed.
- Need to include cross-compilation instructions.

Possible Issues
---------------
- No text display.  This is likely an issue with how pango and related
  libraries were cross-compiled rather than an issue with Tux Paint code.  From
  the error output it appears to be a font rendering issue.
- SVG integration couldn't be tested because RSVG library has not yet be
  cross-compiled successfully.
- Only tested under the iOS Simulator (and not on an actual iOS device yet.)
2021-03-21 20:46:03 -04:00
Pere Pujal i Carabantes
7769410b2e Merge 0.9.24 master branch into sdl2.0 2020-05-31 00:47:19 +02:00
Pere Pujal i Carabantes
bcc3bdda96 Closing Tux Paint before the end of font scanning resulted in crashes in the Android port. 2020-05-14 00:48:50 +02:00
Bill Kendrick
91505fae8e Debug output clean-up
Wrapped some debug output in "#ifdef DEBUG" tests,
and made sure some warnings and errors were going to
STDERR, rather than STDOUT.

Motivation: Less noise while launching/using Tux Paint,
unless it matters.
2020-04-02 22:15:13 -07:00
Pere Pujal i Carabantes
a1c778135d Merge branch 'master' into sdl2.0
Merging master 2019-september-24 into sdl2.0 branch
2019-09-24 14:52:40 +02:00
begasus
e5c3cdfcf5 Haiku fixes 2019-09-06 13:45:56 +02:00
Pere Pujal i Carabantes
1a5308226c Merge branch 'master' into sdl2.0 2018-08-30 01:37:00 +02:00
Mark K. Kim
93c1ad5dc3 Fix crash when there are 0 font families.
Running Tux Paint under macOS in Korean mode (and some other languages) causes
it to crash, unless "load system fonts" option is also enabled. Some
investigation showed the issue occurs when num_font_families is 0 in fonts.c.
This change removes the assumption from the code that assumes num_font_families
has at least one record.
2018-06-26 01:28:43 -04:00
Bill Kendrick
9144ebd705 More function documentation 2018-05-17 00:30:48 -07:00
Pere Pujal i Carabantes
f08982ad1f Data like brushes, starters,... now is loaded from assets in the android port, failed to merge some stuff... 2018-01-23 22:00:40 +01:00
Pere Pujal i Carabantes
b2c176730a Merging from the master branch. 2017-12-19 02:47:08 +01:00
Pere Pujal i Carabantes
c6b6958cf3 More compiler warnings 2017-12-19 02:41:56 +01:00
Pere Pujal i Carabantes
de308f70a8 Compiler warnings 2017-12-19 02:41:42 +01:00
Pere Pujal i Carabantes
1e0ea6d4b3 Indentation. 2017-12-19 02:17:27 +01:00
Pere Pujal i Carabantes
ede838caf9 Syncing with the android version... 2017-12-06 06:39:41 +01:00
Pere Pujal i Carabantes
58d202d275 Progressbar seems to work again 2017-12-06 06:39:39 +01:00
Pere Pujal i Carabantes
4e8c5287ed Adding support for sdl2pango, Thanks Jianwei Zhang 2017-12-06 06:39:39 +01:00
Mark K. Kim
472bf79bb9 Trying again... 2017-11-27 01:02:41 -05:00
Bill Kendrick
da81a5f32a Compiler warning cleanup in fonts.c
* Use and show error on nice() return value, when appropriate.
 * Remove (comment out, for now) a function that could never be called.
2017-10-15 14:43:20 -07:00
Bill Kendrick
b693003b14 Remove some unused funcs & declarations
Removing more unused functions, and moving a declaration in fonts.h
to fonts.c, since it's not used externally (reliable_read()).
2017-10-15 14:38:52 -07:00
Bill Kendrick
81ff48ccbc indent fonts.c fonts.h 2017-10-15 10:53:55 -07:00
William Kendrick
40a1221114 Ignoring ".pfb" (PostScript 'Printer Font Binary') fonts, to avoid crashes. 2014-04-19 18:36:26 +00:00
William Kendrick
913275e144 * Removed some outdated bug-workaround-code from 2007.
* Made problemFonts[] not-Apple-specific
 * Added a description to TuxPaint_Font struct
 * Added debugging to show when a font is being closed
   (currently causing crashes with some fonts, on Win7 with
   Tux Paint 0.9.22beta01 and Kubuntu 14.04 with CVS)
2014-04-19 18:04:55 +00:00
William Kendrick
0b27bec2e8 * Squelching a lot of debugging output, unless DEBUG is #define'd
* Added "--joystick-dev" option, for specifying which joystick device
   Tux Paint should listen to
   * "--joystick-dev list" is now used to list the available devices
 * Cleaned up some 'usage' output
2014-03-30 07:23:20 +00:00
William Kendrick
e990b48de7 Large bundle of OS X tweaks by Eric P. (basis of the 10.9-compatible
pre-release made in Dec. 2013):
 * Fix OS X 10.9 issue of current directory set by Finder
   to something else than folder where app bundle resides.
 * Some Mac OS X build / project changes & updates.
 * Adjustments to Mac OS X fontconfig config file, to avoid warnings
   and make things more robust.
 * Updates to some #include's to catch up with newer library revisions.
 * Tweaks to pixel read/write on Apple.
 * Introduction of 'intprt_t' casting to avoid warnings on x64.
 * Some additional debugging output.
 * Logging stderr & stdout to /tmp/tuxpaint.log
Untested (I don't have a Mac!)
2014-03-19 23:39:17 +00:00
Scott McCreary
134b478155 Removed B_COMMON_FONTS_DIRECTORY since it's been dropped in Haiku 2013-11-05 06:09:34 +00:00
Scott McCreary
f36c28fab7 Find the font directories on Haiku. This was left off a previous patch somehow. 2010-09-09 15:42:31 +00:00