Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Add the text node #17

Merged
merged 2 commits into from
Oct 28, 2020
Merged

Conversation

iwoithe
Copy link
Member

@iwoithe iwoithe commented Oct 28, 2020

Notes

  • Two new properties were required (StringProp and FontProp)
  • The text node is not supported on MacOS because the font location is not known
  • Support for multiline text and the rest of the parameters of ImageDraw.Draw.text() needs to be added (see the TODOs)

Why is FontProp not based off of wx.FontPickerCtrl?

Pillow kept throwing OSError exceptions because the font could not be found. This was solved by using glob.

@Correct-Syntax
Copy link
Member

The text node is not supported on MacOS because the font location is not known

O.k. This is good to know. MacOS is not currently a target of development for Gimel Studio.

(I don't own a Mac system and don't plan to either). I assume this means you have a Mac system? Do you want to work on Mac support? Then Gimel Studio could really be cross-platform. I have noticed though, (like you) that support for MacOS in libraries like wxPython (for example) is not always the best.

Support for multiline text and the rest of the parameters of ImageDraw.Draw.text() needs to be added (see the TODOs)

This is good for now. We can take it step-by-step.

@Correct-Syntax Correct-Syntax merged commit f9578a9 into GimelStudio:master Oct 28, 2020
@iwoithe
Copy link
Member Author

iwoithe commented Oct 29, 2020

@Correct-Syntax, just letting you know that I use Linux 😉.

@Correct-Syntax
Copy link
Member

Right. I should have remembered from your Blenderartist question that you were on Linux.

I have a double-boot with Windows and Linux -but MacOS I can't do anything with since I don't have it. :)

@Metallicow
Copy link
Contributor

Metallicow commented Oct 29, 2020

(I don't own a Mac system and don't plan to either). I assume this means you have a Mac system? Do you want to work on Mac support? Then Gimel Studio could really be cross-platform. I have noticed though, (like you) that support for MacOS in libraries like wxPython (for example) is not always the best.

Actually that is incorrect about wxPython on apple/mac. Robin has a mac and he does a good job of keeping things working on it. Sometimes discussion occurs about specifics of widget behaviors, but it is faily well supported. It may not support all features on all widgets hence the pure python versions. More likely linux GTK is the worst of the 3 major platforms. Mainly cause GTK wasn't exactly always the best choice and linux has a ton of flavors and tweaks to stuff, but it is what it is. Actually linux folks helped more with the build scripts than anything else, which is nice since there are a ton of flavors. But as far as builds go, gtk3 is a lot better than 2 as far as those random annoying CRITICAL prints that happen alot when most of the time, nothing is even wrong.

The problem with mac is that most folks don't have 1k -1.5k to just drop on a machine just to build software on. Also apple/mac doesn't have a refurbishing policy, so if you walk out of the store with your new fancy applemajig and something goes wrong with it, then don't expect any help from apple unless it is under warranty. Also the OS is only like 20 dollars but their license states that mac software has to run on mac hardware, so you really see what you are paying for. That is why most folks that just want to build have a hackintosh, which btw costs just as much as a mac, but will run ANY operating system in the world.

Edit: And the answer is NO if you want me to build one for you. That is something you have to do yourself, if you want to build for mac or go out and buy a mac.

@Metallicow
Copy link
Contributor

If and when you get everything running smoothly on linux and windows all you will probably need to do is ask a mac person where the fonts would be located on which "codename" version they are running and add that to the code.
But really at that point the mac tester could probably do that themselves and send a pull reqz and might also tell ya if some specifics while running on mac might need tweaked. Ex: dark mode or somesuch. All I really remember about testing on mac is don't make any menuitems with a 0 id. I tried to implement a dynamic id for popups and such which worked fine on windows and linux, tho mac will freak out about it.
Also mac is really nothing more than a fancy customized linux for the most part, so if it runs fine on the other two, then issues on mac will be minimal fixes.

@Correct-Syntax
Copy link
Member

@Metallicow,

It may not support all features on all widgets hence the pure python versions.

This is actually what I was referring to.

More likely linux GTK is the worst of the 3 major platforms.

I may have to agree with you -from my own testing.

The problem with mac is that most folks don't have 1k -1.5k to just drop on a machine just to build software on.

Yeah. And if I did, I probably wouldn't spend it on Apple products.

Also apple/mac doesn't have a refurbishing policy, so if you walk out of the store with your new fancy applemajig and something goes wrong with it, then don't expect any help from apple unless it is under warranty.

Had no idea. How do they get away with it? I guess since they can, they do. Sad...

Also the OS is only like 20 dollars but their license states that mac software has to run on mac hardware, so you really see what you are paying for. That is why most folks that just want to build have a hackintosh, which btw costs just as much as a mac, but will run ANY operating system in the world.

Good to know.

Edit: And the answer is NO if you want me to build one for you. That is something you have to do yourself, if you want to build for mac or go out and buy a mac.

I don't blame you -for two reasons. One, it's a lot of work to make builds and do the testing and QC that goes with it. I have my hands full with just Windows and Linux and I am sure adding MacOS wouldn't help much. Two, after hearing about the way MacOS is (your comments) and how expensive it is, I'd be careful with it too.

I don't think I would have asked you to do it. It was just a passing thought I had since @iwoithe had mentioned MacOS.

Also, I am willing to be corrected on things and learn from your experience (which you do seem to have a lot more than me), but you do come across as scathing at times. There is no need to be. Just simply say what you need to say. :)

This is an open-source project, and I am thankful for those who do contribute and give feedback -but I am not forcing anyone to contribute. You can do as little or as much as you like.

If and when you get everything running smoothly on linux and windows all you will probably need to do is ask a mac person where the fonts would be located on which "codename" version they are running and add that to the code. But really at that point the mac tester could probably do that themselves and send a pull reqz and might also tell ya if some specifics while running on mac might need tweaked. Ex: dark mode or somesuch.

Yes. That is a good idea.

Also mac is really nothing more than a fancy customized linux for the most part, so if it runs fine on the other two, then issues on mac will be minimal fixes.

Then I think I will stick to Linux (and Windows). You're probably right. MacOS can't be that different. So, when (or if) someone comes along wanting a MacOS version, then I guess we will be pretty-much set.

Thanks again for you feedback, contributions and corrections @Metallicow. I really do appreciate it. (and @iwoithe, you too).

@Metallicow
Copy link
Contributor

Sorry if sometimes my comments seem to be a bit rash. Not intended. Tho a lot of times it refers to something someone has been thru before and might save others a bit of time repeating certain paths. Not to say that you cannot do it however you think will be a better way, as often times the stubborn ones come up with a solution that works that others might have overlooked. A lot of the little things I was stubborn about when I started with python. Most of them I have learned from and a few have actually worked and created things others haven't created because of my early stubborness. I still have a good bit of my early experiments/code, and when I look back at them, now I would probably tell myself... well I was half right anyhow.

If you have ever volunteered or worked as a refurbisher, you'd have a different outlook on a lot of software/hardware related stuff. There really is a lot to absorb knowledge wise. If I spent all day building/testing things for folks that ask, then I pretty much might as well have a refurb warehouse myself and 100 machines all lined up to do my bidding. Then I wouldn't have any time left to do anything else. Triag/Testing really is a slow process so you have to be patient even if things don't always work out right the first time.

@Correct-Syntax
Copy link
Member

@Metallicow

Sorry if sometimes my comments seem to be a bit rash. Not intended. Tho a lot of times it refers to something someone has been thru before and might save others a bit of time repeating certain paths....

Yes, I can understand. Believe me when I say I can understand about wanting to share something with someone so they don't make the same mistake I've made... It shows that you care, @Metallicow -which is good. 👍

If you have ever volunteered or worked as a refurbisher, you'd have a different outlook on a lot of software/hardware related stuff. There really is a lot to absorb knowledge wise.

I can't say that I've done much with refurbishing, but I'll take your word for it.

Then I wouldn't have any time left to do anything else. Triag/Testing really is a slow process so you have to be patient even if things don't always work out right the first time.

Certainly. Though, my patience is starting to wear thin with some of the bugs I've been dealing with in my programming work lately....LOL :)

@iwoithe iwoithe deleted the corenode/text-node branch October 6, 2021 03:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants