Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fonts #683

Merged
merged 4 commits into from May 15, 2020
Merged

Add Fonts #683

merged 4 commits into from May 15, 2020

Conversation

kaalleen
Copy link
Collaborator

@kaalleen kaalleen commented May 3, 2020

I've prepared the two fonts which @danielkschneider has made and uploaded to our fonts repository.
I also prepared the amalina font from @tyrosinase . I am just not sure about the licensing yet, so I saved it for later. Haven't tested to embroider the fonts yet.

@tyrosinase
Copy link

@tyrosinase tyrosinase commented May 3, 2020

Licensing is whatever they usually are, I'm not picky. Anything up to and including CC0 is fine by me.

I hadn't sat down yet and put in the spacing to make it work right (it should be continuous, but that means some letters start a ways in from their leftmost stitches). I really should do that.

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 3, 2020

Oh, I already worked on the kerning. It's pretty much finished and looking good. But maybe you can set up the license file so we can include it? That would be great. The font might need some finetuning though. I made the font a little bit bigger and applied bean stitch on it. I don't know if we maybe should make different version to choose.

@Augusa
Copy link
Collaborator

@Augusa Augusa commented May 3, 2020

I don't know if it is the right place for my question. I send in #586 a zipfile with the font I have created from DejaVu. Do you remenber it? I haven't any news. What do you want to do with it?

@lexelby
Copy link
Member

@lexelby lexelby commented May 4, 2020

Thank you for the reminder, @Augusa! That's still on my to do list, and I'm sorry for not doing it yet. @kaalleen maybe we could add @Augusa's font to this PR?

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

Most definitely yes! It's a beautiful font, how come have I not noticed when you've send the zipfile. Sorry for that! I've included the font to this branch. Maybe you could update the license file:
https://github.com/inkstitch/inkstitch/edit/kaalleen/add_fonts/fonts/dejavufont/LICENSE

I've also uploaded the amalina font now. The license can be edited directly here:
https://github.com/inkstitch/inkstitch/blob/kaalleen/add_fonts/fonts/amalina/LICENSE

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

@lexelby sorry, I didn't notice before, that it is actually possible to turn the auto-routing off through the json file. I did so, for the last two uploaded fonts. (One has custom routing while the other uses simply a running/bean stitch).

@Augusa The dejavu font is designed to go from left to right. The right to left file would be nicer, if we adapt the routing into the other direction. Do you want to have a look at it?
https://github.com/inkstitch/inkstitch/blob/kaalleen/add_fonts/fonts/dejavufont/←.svg

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

dejavu-inkstitch-font

Just thought to add a little preview of the dejavu font in our upcoming simulator ;)

@lexelby
Copy link
Member

@lexelby lexelby commented May 4, 2020

@kaalleen Oh, yay! I forgot I added that. And I forgot to answer your question, why do auto-routing for lettering at all? The reason is that the order letters appear in a word can change what would be the best way of sewing the letters. It may make sense to break up satins in a letter differently depending on what's coming next, to sew more quickly and with shorter jump stitches. When adding trims, it may not matter at all!

@tyrosinase
Copy link

@tyrosinase tyrosinase commented May 4, 2020

@Augusa
Copy link
Collaborator

@Augusa Augusa commented May 4, 2020

"The dejavu font is designed to go from left to right. The right to left file would be nicer, if we adapt the routing into the other direction."
Sorry. It is like chinese for me! I cannot imagine that the letter will start to the right and finish to the left because the order of columns is of course important. So I think that I am not able to understand the difference between the 2 methods!

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

@Augusa sorry for not being clear. It can work as is, no worries. I just mentioned it, because the lettering tools comes with the option to stitch the lines back and forth. Which means, that we sometimes stitch the letters from the left to the right and every second line we go from right to left. This will shorten the jump stitch from one line into the next. But it also means more work when we digitize a font (and are not using the auto-route function). Therefore we have the font files named with an arrow to indicate the stitch direction (at the moment only left and right are working, up and down are not implemented yet).
This means we have to digitize the font twice: once with the starting point at the left side and once with the starting point at the right side.

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

@tyrosinase Hm, what would you think if we leave the font out for now, until we are sure about the font license? We can still add it later to our font library.

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

@lexelby Oh, I forgot I questioned it. I think it's a very good idea to have auto-routing for the fonts enabled. Just wanted the option for authors to decide which routing method they want - and it is there :)

@Augusa
Copy link
Collaborator

@Augusa Augusa commented May 4, 2020

@kaalleen Thanks for your explanations. Now I see the problem. But creating the font is a huge work and on my point of wiew it is more important to create for exemple the bold font as to give the possibility of stitching lines in differents orders. The offer is not so rich if I compare it for with other softwares. Do what you think is the best. I know so few about these questions

@tyrosinase
Copy link

@tyrosinase tyrosinase commented May 4, 2020

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 4, 2020

@tyrosinase ok then. I've removed it from this branch. We will see it later ;)

@Augusa

it is more important to create for exemple the bold font as to give the possibility of stitching lines in differents orders. The offer is not so rich if I compare it for with other softwares.

Good point. Then let's leave it without right to left adaptions. Maybe someone will take the advantage some day. Do you think it's ready to be in the next release as is?
You can test it right here if you like: https://github.com/inkstitch/inkstitch/releases/tag/dev-build-kaalleen-add_fonts

@Augusa
Copy link
Collaborator

@Augusa Augusa commented May 4, 2020

@kaalleen I tested your new realise. I find some problems with the dejavu police. The underpaths are not in dotted line and they are embroidered as zigzag not as running stitches. Hope you can do something because of course they are dotted lines in the file I send you.
But I enjoy to discover the new lettering and other new features.
I probably try to create the different svg file for this font but I need time.

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 5, 2020

Hm, they are dotted lines when I insert them. I didn't test all the letters though.
Do you have the problem with every letter you include?

@Augusa
Copy link
Collaborator

@Augusa Augusa commented May 5, 2020

Now I understand better the question. The letters comes with strokes of 0.1 pixel and are nearly invisible. They are correct with dotted or not dotted stroke. If I change the thickness to see better from the dialog box every stroke is full and the result is zigzag.
Not sure to be clear.

@kaalleen
Copy link
Collaborator Author

@kaalleen kaalleen commented May 5, 2020

That makes sense. I noticed too, that the stroke width would become so small and you can barely see it. Just couldn't figure out why (units issue?!). I wrote a fix, but @lexelby might know a better solution than my current approach.

@kaalleen kaalleen merged commit 2df11b5 into master May 15, 2020
4 checks passed
@kaalleen kaalleen deleted the kaalleen/add_fonts branch May 15, 2020
kaalleen added a commit that referenced this issue May 16, 2020
## New Features

- New Simulator (#531)
- Import Threadlist (#666)
- Export Threadlist in ZIP file (#664)
- Option to include SVG in ZIP file (#648)
- Break Apart and Retain Holes (#653)
- G-Code: option to alternate z-value (#659)
- New Stitch Plan Extension (#640)
- Optionally enable/disable ties (lock down stitches) (#619)
- Multiple Fill Underlays
- Additional Fonts (#683):
    * Geneva
    * DejaVu

## Improvements

- Better Algorithm for Satin Columns (#607)
- Better Algorithm for Fill Stitches (#606)
- Convert to Satin with Loops (#608)
- Adding '@ #' to all fonts (#680)

## Bug Fixes

- Fix Issue with Troubleshoot Pointer Position (#696)
- Inherit Styles (#673)
- Fix Color Palette Issues (#660)
- Preserve Aspect Ratio (#646)
- and more

## Under the Hood

- Namespaced Attributes (#657)
- Remove stub.py (#629)
else:
# set stroke width because it is almost invisible otherwise (why?)
for element in destination_group.iterdescendants(SVG_PATH_TAG):
style = ['stroke-width:1px' if s.startswith('stroke-width') else s for s in element.get('style').split(';')]
style = ';'.join(style)
element.set('style', '%s' % style)
Copy link
Member

@lexelby lexelby May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this. This is probably caused by the way transformations work on strokes. The whole object is scaled after drawing the stroke, so it can make the stroke look smaller or nearly invisible. It's the same reason why the "convert line to satin column" extension isn't always right.

Your workaround may work, but it might be better to make it a minimum of 1px. Also, this is another case where we're parsing the style, which may not work for fonts with semicolons in the names. Maybe we should use tinycss for this, too? Perhaps add an Element.set_style() function? Anyway, no rush on that, this is fine for now :)

Copy link
Collaborator Author

@kaalleen kaalleen May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know fonts could have semicolons in their names. Not sure if tinycss2 could figure it out then? I thought the double point has been the problem. Maybe I am wrong though.

An Element.set_style function would be great. I came across this more often and thought something like that would be missing. Still hadn't the idea to add something like that :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants