![]() ![]() My utility creates a stack of rectangles, which it jams into a \ tag and then it creates a \ object with the label text in it and jams that into a \ tag and finally the two are combined into a \. Like all of EAGLE's file formats, it's practically human-readable XML. Speaking of which, the EAGLE library format only took a few minutes to figure out. This approach is a little bloated, because one silkscreen label is turned into a stack of rectangles 41 units high, but by jamming them into a library footprint I can make them easier to manage. As long as it can be drawn into an HTML5 canvas, I can turn it into a pile of rectangles. Since I was resigned to rastering the labels using a stack of rectangle objects, I was free to use whatever types of assets that I wanted to inside the canvas object. Drawing SVG using javascript is trivial, but writing a javascript function to find nested polygons and divide them into overlapping polygons was not a task I was prepared to undertake. Two polygons can overlap, but there's no way to "subtract" one from another. My dreams of creating nice, lightweight, vector labels were dashed pretty early on when I discovered that EAGLE's XML vector format doesn't allow nested polygons. I'd worry about turning that canvas object into an EAGLE footprint later. I started by just trying to make something that looked like a silkscreen label in an HTML5 canvas object. Browsers are essentially purpose built for rendering text and images, which makes them a great shoulder to stand on when building a tool of this kind. Building a ToolĪfter some fooling around with EAGLE's User Language Programming code, I realized that rastering typefaces was going to be an intricate process with lots of hacks so I retreated to the safety and comfort of HTML5. So I began building a tool that would take the pain out of creating "sexy" labels. This is perfectly acceptable, but it doesn't look "designed". Unfortunately, EAGLE (our layout editor of choice) does not make it easy to create pretty labels and so for years we've been using EAGLE's native vector font to label headers, jumpers and version numbers. ![]() Not only do fancy labels look good, but they're often easier to spot and make using the board a lot less cumbersome. It may sound silly, but details like the typeface used in a silkscreen label can really take a PCB design to the next level. The Difference: Left, a very dated Arduino NG showing default vector font silk labels and right, A modern RedBoard showing "sexy" raster font labels. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |