draw2d icon indicating copy to clipboard operation
draw2d copied to clipboard

Text Stroke LineCap and LineJoin

Open vinhphuctadang opened this issue 4 years ago • 6 comments

Hello author and everyone,

When I draw a text string with stroke (using StrokeStringAt), font Roboto-Medium (loaded with truetype package), found the stroke looks strange which does not cover the text, see image below:

image

In the image, there is an "i" and a "t" which has strange stroke, it does not fully "connected". I am expecting the stroke to cover the text, should looks connected.

I tried SetLineCap but looks like it doesn't work, and found there is an issue on that: https://github.com/llgcode/draw2d/issues/155. How do I correctly make it stroke the text?

Regards, Phuc Ta

vinhphuctadang avatar Dec 14 '21 08:12 vinhphuctadang

Hello @vinhphuctadang, I'm afraid I can't help you right now, I have not planned to fix this issue #155. The project draw2d is stand by, I haven't worked on it for a while. You can either use another library to do this and look at these projects:

  • https://github.com/golang/image
  • https://github.com/fogleman/gg

If you really need this issue to be fixed I can make an effort (and work on it) or you can submit a PR, I guess the issue is in this file: draw2dbase/stroker.go regards, Laurent

llgcode avatar Dec 14 '21 09:12 llgcode

Thank Laurent, really happy to hear from you. Your package is interesting. Let me have sometimes to look at this issue inside this repo if you are busy.

Bests,

vinhphuctadang avatar Dec 14 '21 14:12 vinhphuctadang

I will be happy to review your pull request and merge it.

llgcode avatar Dec 14 '21 14:12 llgcode

Hi @vinhphuctadang, did you find a fix for your issue ? regards

llgcode avatar Jan 10 '22 14:01 llgcode

Sorry, I am packed catching up with new job atm Will look into this,

Bests,

vinhphuctadang avatar Jan 15 '22 09:01 vinhphuctadang

Ok no problems. Thanks for your answer.

Le sam. 15 janv. 2022, 10:31, vinhphuctadang @.***> a écrit :

Sorry, I am packed catching up with new job atm Will look into this,

Bests,

— Reply to this email directly, view it on GitHub https://github.com/llgcode/draw2d/issues/171#issuecomment-1013650880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD76M3DKIGK35SVJGUCELLUWE5G5ANCNFSM5KAH6BVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

llgcode avatar Jan 15 '22 09:01 llgcode