Hello! I was wondering if anyone had come up with a method for internalizing the glyphs of a custom font, but with proper spacing as well. I know that the Shapediver platform only allows for very limited fonts, but I need several that are not offered. It is easy enough to store the text shapes in grasshopper and then recall them in a sequence, but the spacing is off, and does not look right. I need a way to “kern” and set the spacing between each possible letter combination.
I was wondering if anyone had tackled this problem before - either with a typical GH definition, or using python, c#, etc.
Thanks, but this doesn’t answer the question, because your script doesn’t allow for proper spacing, which was my whole point. All that your meshgrammarmaker script does to space letters is move them by the character’s bounding box length, which isn’t helpful if you want to preserve the kerning in the text. For a text font to look natural, the spacing values stored in the font file need to be preserved, and this script removes this key element. Ultimately, for this method to work, the spacing value for every combination of characters needs to be preserved.
Feel free to develop the script further with proper kerning methods and share your results here. Alternatively, you can add logic to the Grasshopper definition which would base the spacing of the characters on the width of the bounding box.