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 |
Pietro Gagliardi
|
c82197f408
|
And fixed other compile errors. Of course I forgot to add uiFontButton back in (I wanted to properly comment that first :/ ). Now for linker errors, which may result in some warning fixes along the way.
|
2018-03-09 18:01:23 -05:00 |
Pietro Gagliardi
|
82d3de7c31
|
More compiler error fixes. Oops, I forgot to finish attrstr.m!
|
2018-03-08 23:27:04 -05:00 |
Pietro Gagliardi
|
e9a62461c2
|
Started fixing compile errors. I forgot I renamed uiDrawFontDescriptor to uiFontDescriptor!
|
2018-03-08 23:04:45 -05:00 |
Pietro Gagliardi
|
9661d14262
|
And fixed up loose ends preventing a build. Let's build!
|
2018-03-08 22:44:35 -05:00 |
Pietro Gagliardi
|
5535c43bd8
|
And finished up drawtext.m for now.
|
2018-03-08 22:38:53 -05:00 |
Pietro Gagliardi
|
7451d455e5
|
Started a new drawtext.m with a different way to handle the empty-string crash problem.
|
2018-03-07 23:53:36 -05:00 |
Pietro Gagliardi
|
bf58601ff8
|
More TODOs.
|
2018-03-05 23:16:43 -05:00 |
Pietro Gagliardi
|
00749b07ac
|
And cleaned up all the font handling stuff in attrstr.m. A lot cleaner now! Not fully clean, but clean*er*, and probably more efficient, too...
|
2018-03-05 23:15:31 -05:00 |
Pietro Gagliardi
|
93c375fd94
|
Implemented -[uiprivCombinedFontAttr hash].
|
2018-03-05 08:59:45 -05:00 |
Pietro Gagliardi
|
9e57c78fb3
|
Started really refactoring attrstr.m by turning uiprivCombinedFontAttr into an actual attribute that CFAttributedString will manage itself; it will store uiAttributes (so we can use uiprivAttributeEqual() instead of duplicating its logic). Later, we will make it convert to CTFontRefs in place.
|
2018-03-04 23:57:18 -05:00 |
Pietro Gagliardi
|
49c3f77d46
|
Started cleaning up attrstr.m. This is gonna be fun...
|
2018-03-04 20:45:05 -05:00 |
Pietro Gagliardi
|
232b14ccde
|
Migrated attrstr.m. This file needs to be cleaned up...
|
2018-03-04 20:01:52 -05:00 |