Code Monkey home page Code Monkey logo

easyeda-labelmaker's Introduction

EasyEDA Label Maker

Screenshot of the Label Maker dialog and some labels

Installation

  1. Download the latest extension.zip from releases and extract the files to your harddisk (temporary)
  2. Open EasyEDA in Browser or Desktop
  3. In EasyEDA go to "Advanced" > "Extensions" > "Extensions Settings ..." > "Load Extension..." > "Select Files ..."
  4. Select all files from the "extension" directory of your extracted download and hit "Load Extension"
  5. You're done, close the dialog (you can delete the files from your harddisk)

Screenshot of EasyEDAs menu with extension installed

How to use it

After install, a "Label Maker" menu should show up in the PCB editor. Click "Create Label". After setting your options, hit "Place" or press "enter" to place the label on the board. After the label is placed, the input text is focused again. Just hit "enter" again to place the same label or type anything to change the label text.

Labels are placed to the currently active pcb layer.

Options

All measurements in the options are about 0.01 inch or 0.25 mm. I fugured any conversion it is not necessary here because exact measurments are usually not required for labels and you better go by "the looks" of it. Also the actual font family used may affect measurments slightly.

Font

You can choose any font that is ailable in EasyEDA except the default ones of EasyEDA (for some reason these are not shipped by EasyEDA but used via API calls). Since you may not have additional fonts installed, this extension comes with one so you have at least one to select from. You can install additional fonts (ttf, otf or woff) via EasyEDAs Fonts Manager. You may have to hit "Rebuild Fonts Cache" after you installed a new font.

Tipp: On Windows, drag'n'drop fonts from the system fonts directory to a regular directory to get access to the ttf files. You can access the fonts directory by running (Win+R) "shell:fonts".

Font size

The font size is approximately the height of the character "X" in your font. You can use decimal numbers.

Padding

The padding is added around the bounding box of your text (with ascedants/descendants like "y" and "ร–" ignored). You can use decimal numbers or even negative numbers.

Screenshot of labels with different padding

Width and Text-Align

Usually the width of the label is determined by the width of the text in it. If you want labels of a fixed with, so they lign up nicely, use width together with the Text-Align feature.

Screenshot of labels with different alignment

Easy label placing

The extension is optimized for a fast workflow. After placing, the input is selected again. You can just go "GND" enter - click to place - "VCC" enter - click to place - "+5V" enter - click to place etc...

Alignment

Labels can be aligend, mirrored, distributed using the built in functions of EasyEDA

Limitations

The labels are generated and placed as SVG graphics. Editing the labels properties afterwards is not possible.

So far I've also not found a way to set the reference point for placing the label.

Libraries used

The generator uses opentype.js (which is also used by EasyEDA itself) and paper.js.

opentype.js can create text as SVG paths from any given ttf, otf or woff font. paper.js is used to create the surrounding shape of the label and to combine (subtract) the text and the shape. paper.js is really good at cleaning up the SVG path which would show lots of artefacts otherwise.

Inspiration

The Extension is inspired by the SparkFun Buzzard Label Generator and I blame @arturo182 and @GregDavill for getting me started on this โค

easyeda-labelmaker's People

Contributors

xsrf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyeda-labelmaker's Issues

Font not Found!

I love this ext I use it on every PCB, I have recently moved to linux (Ubuntu) and find that you extension shows error as it cannot find fonts

image

Is this ext only for windows?

Used ttf-mscorefonts-installer to install standard windows ttf but did not help

Same issue on Mac, can see three fonts in fonts manager, and tried refresh cache.

Thanks

idea for place with reference

Using createShape api and faking a cut'n'paste on the editor would allow for the user to place the shape with red-cross and specified reference point...

Use regular "text" shapes to allow editing

Regular text shapes are also drawn using an SVG that is independent of the actual text.
The text attribute could hold the label text and also the settings used to create it (e.g. as json string).
Assigning a fake font face prevents EasyEDA from trying to redraw the shape, so the actual SVG should be preserved.
This would allow future editing of labels within the extension.

Can it create the labels but without the border surrounding the text?

Apologies if this is the wrong place to ask this.

Can the labels be created where the text is filled like normal text and no border?
I ask this because the EasyEDA text tool is horrendous with its default font being the only one that can be resized.
Your extension allows me to use different fonts and resize them as I need which has been very helpful.

Thank you for creating this and for your time.

Any chance for multi-line labels?

It's easy enough to just stack multiple labels, but this messes up the end caps (e.g., no way to do ABC over XYZ with a rounded end cap encompassing both rows). Thanks! I love the extension and use it all the time.

Text with outline

Feature request: Regular text with outline instead of inverted text

Error: Font Not Found

Hey there,
I just installed your extension and as soon as I open it, I get "Error: Font Not Found". I looked on this Github page for what I was doing wrong and read about the Fonts Manager. Call me daft, but I can't find EasyEDA's Fonts Manager. I even googled for it and the only result I got was the page I first learned about it.
image

Any ideas?

Cheers!
Dax.

Font not found

Just installed it on latest web based easy eda, and it shows error : Font not found!.

EDIT: My bad, file corrupted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.