Pietro Gagliardi
|
d788d86239
|
Removed the margins from the drawtext example. It looks better this way.
|
2018-03-18 15:39:44 -04:00 |
Pietro Gagliardi
|
a0d2d6a1f8
|
Added alignment to the drawtext example.
|
2018-03-18 15:30:50 -04:00 |
Pietro Gagliardi
|
8944a3fc55
|
Finally documented the remaining functions in ui_attrstr.h.
|
2018-03-18 15:11:03 -04:00 |
Pietro Gagliardi
|
9aea7fa62e
|
Polished up the drawtext demo a bit (such as finally fixing that titlebar). Also more crash-related TODOs.
|
2018-03-18 11:24:09 -04:00 |
Pietro Gagliardi
|
bc895d6707
|
And added the necessary functions on OS X. Now to do some final cleanup before merging back in (at long last).
|
2018-03-17 23:55:33 -04:00 |
Pietro Gagliardi
|
0125e33720
|
Made the likewise changes on Unix.
|
2018-03-17 23:42:54 -04:00 |
Pietro Gagliardi
|
93f0eea140
|
Likewise codified uiprivStricmp(). Honestly this will probably do for the Windows code for now...
|
2018-03-17 23:22:17 -04:00 |
Pietro Gagliardi
|
8709838a8f
|
Added a uiFreeFontButtonFont() function to free resources allocated by uiFontButtonFont(), implemented it on Windows, and integrated it into the drawtext example. I'm going to continue chipping away at the Windows code for a bit longer, so I'll add this to the other platforms later.
|
2018-03-17 23:07:40 -04:00 |
Pietro Gagliardi
|
78e0684435
|
Cleaned up memory management in windows attrstr.cpp; also got rid of the logHRESULT(HELP) I was using in case DirectWrite doesn't return NULL+S_OK on a nonexistent drawing effect (thankfully it does).
|
2018-03-17 21:26:34 -04:00 |
Pietro Gagliardi
|
70321353a1
|
Moved a few more future files out of the way.
|
2018-03-17 21:06:45 -04:00 |
Pietro Gagliardi
|
fa293717af
|
Removed the NumLines and LineByteRange functions for now; I'll count them under extents.
|
2018-03-17 21:05:05 -04:00 |
Pietro Gagliardi
|
d358e87583
|
Moved the old metrics attrstr code out of the way.
|
2018-03-17 21:00:11 -04:00 |
Pietro Gagliardi
|
5d116d87fe
|
Fixed a typo in the drawtext example and made it redraw immediately on a font change.
|
2018-03-17 16:14:50 -04:00 |
Pietro Gagliardi
|
45d11962b1
|
Turns out there was only one real runtime bug (a bad castee). It works! Now to clean up.
|
2018-03-17 16:10:11 -04:00 |
Pietro Gagliardi
|
a5bbc83359
|
Fixed build errors. Now to test.
|
2018-03-17 15:49:00 -04:00 |
Pietro Gagliardi
|
2f02836181
|
Fixed attrstr.cpp. Wow, that unordered_map custom hash and equal_to actually compiles!
|
2018-03-17 15:29:06 -04:00 |
Pietro Gagliardi
|
51952b4599
|
And fixed the CMakeLists.txt. Now to build.
|
2018-03-17 14:50:10 -04:00 |
Pietro Gagliardi
|
cdaf49ec30
|
And quick and dirty migration of fontdialog.cpp back. Okay, after fixing the CMakeLists.txt, let's see how bad this is.
|
2018-03-17 14:47:20 -04:00 |
Pietro Gagliardi
|
e08460adc3
|
Cleanup from the previous commit.
|
2018-03-17 14:45:45 -04:00 |
Pietro Gagliardi
|
8352cd72b8
|
"Migrated" dwrite.cpp back. Not much to say here; it'll do for now.
|
2018-03-17 14:44:38 -04:00 |
Pietro Gagliardi
|
1d1b6c3162
|
Migrated fontbutton.cpp back.
|
2018-03-16 20:06:23 -04:00 |
Pietro Gagliardi
|
1b1d609c88
|
More migrations of attrstr.cpp and drawtext.cpp. My this is a mess :D
|
2018-03-14 21:08:19 -04:00 |
Pietro Gagliardi
|
5314295e4c
|
Started migrating drawtext.cpp. This is a bigger mess than I was hoping for...
|
2018-03-13 22:56:30 -04:00 |
Pietro Gagliardi
|
5282951681
|
Oops, self -> this.
|
2018-03-13 22:06:33 -04:00 |
Pietro Gagliardi
|
f25b8dce37
|
Finished migrating attrstr.cpp.
|
2018-03-13 22:01:15 -04:00 |
Pietro Gagliardi
|
12e97a1b29
|
Started migrating attrstr.cpp, using the same techniques as attrstr.m.
|
2018-03-13 18:43:32 -04:00 |
Pietro Gagliardi
|
abc6fd2825
|
uiDrawFontDescriptor -> uiFontDescriptor.
|
2018-03-11 22:36:31 -04:00 |
Pietro Gagliardi
|
86264d32a0
|
And migrated the IDWriteFont -> uiFontDescriptor code.
|
2018-03-11 22:17:16 -04:00 |
Pietro Gagliardi
|
1f61fb30de
|
Wrote a fontmatch.cpp.
|
2018-03-11 22:11:19 -04:00 |
Pietro Gagliardi
|
6c95ce849a
|
Migrated graphemes.cpp and opentype.cpp back.
|
2018-03-11 21:17:39 -04:00 |
Pietro Gagliardi
|
e020ba465a
|
Moved the old Windows text code out of the way.
|
2018-03-11 21:04:38 -04:00 |
Pietro Gagliardi
|
bffe311afe
|
Switched to using Pango background color attributes. Unix code done for now.
|
2018-03-11 20:23:18 -04:00 |
Pietro Gagliardi
|
602060a673
|
Fixed build errors, some of which were overisghts and others were habits from the OS X code.
|
2018-03-11 19:59:11 -04:00 |
Pietro Gagliardi
|
697c926c92
|
And migrated fontmatch.c back. Let's test.
|
2018-03-11 19:37:30 -04:00 |
Pietro Gagliardi
|
5939c3203d
|
Created a new file for the font matching code.
|
2018-03-11 19:32:08 -04:00 |
Pietro Gagliardi
|
24d2220fe5
|
Migrated drawtext.c.
|
2018-03-11 18:12:15 -04:00 |
Pietro Gagliardi
|
7dc5c6d940
|
Migrated attrstr.c back.
|
2018-03-11 17:36:22 -04:00 |
Pietro Gagliardi
|
1cce6dc704
|
Migrated opentype.c and graphemes.c back.
|
2018-03-11 16:15:28 -04:00 |
Pietro Gagliardi
|
008be9b6d8
|
Began migrating the Unix draw text code by moving the existing files out of the way.
|
2018-03-11 15:55:28 -04:00 |
Pietro Gagliardi
|
acbe7c3149
|
Implemented uiAttributeTypeBackground for OS X 10.12 and newer using the attribute included with Core Text. Also laid out a non-block-based API for drawing backgrounds on older versions of OS X (not implemented here yet, however; that will require bringing back the old metrics code).
|
2018-03-11 03:30:02 -04:00 |
Pietro Gagliardi
|
6ba2d3606d
|
Removed uiprivStrdup() (we'll just uiprivAlloc()+strcpy() instead) and fleshed out the drawtext example's text a bit more.
|
2018-03-10 22:51:39 -05:00 |
Pietro Gagliardi
|
6643a148e0
|
More TODOs.
|
2018-03-10 22:18:48 -05:00 |
Pietro Gagliardi
|
5ef04f2675
|
And fixed the other issue: didn't fully set uiDrawTextLayoutParams. Oops =P It works! Also did proper memory management before uiUninit()... but it's crashing for other reasons now (using strdup() instead of uiAlloc()). And Skia doesn't map correctly...
|
2018-03-10 22:16:43 -05:00 |
Pietro Gagliardi
|
b15f88412b
|
Fixed the infinite loop: end is exclusive, and my code was correct in handling that, so <= (which i though was needed there because I thought the code wouldn't handle it) is wrong. Now for a segfault.
|
2018-03-10 22:04:07 -05:00 |
Pietro Gagliardi
|
1fae3eea02
|
And wrote a new, simpler drawtext example. Now to debug run-time issues in the new attributed string code! First up: some infinite loop.
|
2018-03-10 21:57:45 -05:00 |
Pietro Gagliardi
|
427e013d78
|
And moved the OpenType example out of the way too.
|
2018-03-10 19:42:50 -05:00 |
Pietro Gagliardi
|
8fda407183
|
Moved the old drawtext example out of the way.
|
2018-03-10 19:24:20 -05:00 |
Pietro Gagliardi
|
4bb6a56c99
|
More warning fixes. Made private uiAttributeString functions const-correct to expose more potential issues later. Const-correctness and uiAttributeRetain() are going to be an issue...
|
2018-03-10 19:21:39 -05:00 |
Pietro Gagliardi
|
115a60c950
|
uiAttribute copies family names, so its internal copy doesn't need to be const. Fix this.
|
2018-03-10 19:13:20 -05:00 |
Pietro Gagliardi
|
9194ba29fe
|
And fixed build errors. Now I'm sure there are warnings that are real bugs, so let's handle those next.
|
2018-03-10 19:02:10 -05:00 |