Jump to content
How to Install Plugins ×

Spaced text (variable letter and line spacing)


simmetric

Recommended Posts

@simmetric Thanks for the update.

 

The Spaced text works great inside a rectangular selection but sometimes I would like to be able to type and fit text in the middle of a round  selection or circle. Would it be possible to add that feature to the effect?

Spoiler

spaced-middletext-52d9cd8.png

 

Link to comment
Share on other sites

On 8/13/2017 at 1:54 AM, Eli said:

@simmetric Thanks for the update.

 

The Spaced text works great inside a rectangular selection but sometimes I would like to be able to type and fit text in the middle of a round  selection or circle. Would it be possible to add that feature to the effect?

  Reveal hidden contents

spaced-middletext-52d9cd8.png

 

 

That's an interesting idea. Paint.NET only gives the bounding rectangle of the selection area but it's possible to find the actual selection by approximation. I've examined a few plugins, none of them seem to try and find the actual selection but there's a way to do it.

 

I'm going to look into this and will let you know if it produces something workable.

  • Like 1
Link to comment
Share on other sites

So, it's been a while since @Eli's request. Soon after I started looking into it, I had a working solution. Unfortunately this introduced a couple of bugs that were hard to solve, and I had almost no time to work on the plugin.

Eventually I decided to rewrite the entire plugin, cleaning up the code and probably producing faster results.

 

As of now the opening post has  been updated with the latest version 3.0 which adds support for any non-rectangular selection. Note that the plugin assumes that the selection is one whole and is convex (meaning there can be no holes inside the selection).

 

@Eli please let me know how this version works for you.

 

For the next version I will probably add an option to define the margins.

 

SpacedTextCircle.png.a6aa70d3cd97ccb8781c638b9c5d9482.png

Edited by simmetric
  • Like 2
  • Upvote 3
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 1 month later...

the anti aliasing isn't doing what it's meant to for me. I'm trying to make the text simple pixels all one color no shading or "aliasing" I guess. but the lowest setting of it wont do that even though it used to do it perfectly. I don't think I've changed anything to make it act this way but since the program hasn't updated or anything something had to have changed. so does anyone know if certain windows settings or updates makes it this way? or maybe if the plugin conflicts with other plugins to cause this?

 

Edit: Nevermind. Apparently, turning on "ClearType" in the Windows appearance settings caused that whole anti aliasing issue.

 

antialias.png

Edited by Skofa
Link to comment
Share on other sites

  • 5 months later...
  • 2 years later...

This plugin is going to need an update with the upcoming release of 4.3.3.

 

It's using internal methods from the SystemLayer DLL, which is strictly forbidden in the rules that are posted prominently in the Plugin Developers section of the forum.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

6 minutes ago, Rick Brewster said:

This plugin is going to need an update with the upcoming release of 4.3.3.

 

It's using internal methods from the SystemLayer DLL, which is strictly forbidden in the rules that are posted prominently in the Plugin Developers section of the forum.

 

Yes, It references SystemLayer DLL in project file but it doesn't seem to utilize it.

https://github.com/simmetric/Paint.NET-Plugins/search?q=SystemLayer

 

When I look with ILSpy, it doesn't show me.

 

image.png.9eab8adb77f359da9b86f3d934a9b7b5.png

Link to comment
Share on other sites

@otuncelli Download source, converted to NET 5.0 and this is what appears;

 

image.png.ed12c641d9e176ea2f76233dd87760bf.png

and one of the offending lines of code (I think)

DstArgs.Surface.Clear(renderRects[i].ToRectInt32(), ColorBgra.Transparent);

 

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

15 minutes ago, AndrewDavid said:

@otuncelli Download source, converted to NET 5.0 and this is what appears;

 

image.png.ed12c641d9e176ea2f76233dd87760bf.png

 

 

This references panel just shows what you manually reference in csproj file. Actual references for the resulting assembly may be different than those you manually set. Compiler search and strips unused assembly references automatically.

 

51 minutes ago, AndrewDavid said:

DstArgs.Surface.Clear(renderRects[i].ToRectInt32(), ColorBgra.Transparent);

 

Yes, this method became obsolete and the author needs to change this to Surface.Fill instead of Surface.Clear. This is a different problem though. You should be able to suppress this error and compile the plugin by marking the methods, constructors and other stuff as Obsolete that are calling Obsolete API of Paint.NET. But keep in mind, this is just for testing, you shouldn't release a plugin that uses Obsolete methods. Paint.NET is keeping them just for old plugins (like this one) to not break.

 

        [Obsolete]
        protected override void OnRender(Rectangle[] renderRects, int startIndex, int length)

 

Link to comment
Share on other sites

19 hours ago, otuncelli said:

 

Yes, It references SystemLayer DLL in project file but it doesn't seem to utilize it.

https://github.com/simmetric/Paint.NET-Plugins/search?q=SystemLayer

 

When I look with ILSpy, it doesn't show me.

 

 

 

That's not what mine shows.

image.png

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

17 hours ago, otuncelli said:

You should be able to suppress this error and compile the plugin by marking the methods, constructors and other stuff as Obsolete that are calling Obsolete API of Paint.NET.

 

And if anyone actually ever does that I'll ban them 😂 I don't think it would work though, you'd have to mark the effect itself as [Obsolete] and the plugin loader will will skip it.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

2 hours ago, Rick Brewster said:

 

That's not what mine shows.

image.png

 

This is an old version. The plugin from the first page doesn't have this. It seems to be fixed with this commit back in 2017. It seems like the author forgot to update the version.

 

https://github.com/simmetric/Paint.NET-Plugins/commit/eae99971de632354c7e59a80d1da7a0c611fbbcb#diff-f86412165b4b252938e93080785c780a1fa18e4f12405844c74df3f263019f5fL26

 

2 hours ago, Rick Brewster said:

And if anyone actually ever does that I'll ban them 😂 I don't think it would work though, you'd have to mark the effect itself as [Obsolete] and the plugin loader will will skip it.

 

Yep, they'll need to publish it first though 🤪

 

You don't have to mark effect class itself. Yes, it doesn't load if I mark the class as Obsolete. But marking the constructor, methods etc... individually worked in my tests.

Edited by otuncelli
Link to comment
Share on other sites

Yeah the version # is problematic. From what I can see, the newer version has an lower version # stamped onto it. So, I can't cleanly block the "old" effect from loading while allowing the "new" version. I can just remove the block though, and if someone has the old version it'll just crash ¯\_(ツ)_/¯

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 4 weeks later...
On 10/25/2021 at 3:14 PM, otuncelli said:

DstArgs.Surface.Clear(renderRects[i].ToRectInt32(), ColorBgra.Transparent);

 

The fix in the source code is easy -- just remove the call to `ToRectInt32()`. The RectInt32 struct now has an implicit casting operator to Rectangle.

 

I'll be shimming this and releasing a 4.3.4 update at some point. Got an e-mail last night from someone who's workflow at work was broken by this. The shim is straightforward, I just need to wake up enough to code up the string manipulations for it

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Greetings

 

I'm a new person to this forum, and i recently wanted to register and create this account as an opportunity to talk about a possible troubleshoot to a plugin (and probably more plugins) that seems to be problematic with Paint.NET in the recent version 4.3.3 (stable)

 

I use the plugin known as "Spaced Text" made by simmetric for some graphic design sake. The plugin just works fine and all, until 4.3.3 came out and i heard this plugin crashes Paint.NET, i had this plugin installed for a while now, when i try to fire up this plugin, the menu and visual screen pops in, but when i want to do something, the program crashes.

 

I'll be sending a screenshot and the log files as an evidence. Do i have to downgrade to 4.3.2 or is it a problem with probably .NET Framework 6 and new code it now has?

msedge_EwzVmrRoOh.png

pdncrash.3.log

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...