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

Barcode height #49

Open
nicknomo opened this issue Jan 13, 2022 · 2 comments
Open

Barcode height #49

nicknomo opened this issue Jan 13, 2022 · 2 comments

Comments

@nicknomo
Copy link

Would it possible to adjust the relative height of the barcode lines? Any pointers on how? I'd really like to generate barcodes that look more proportional to a UPC code. I can to fork this to make changes, just not sure where to start.

@graphicore
Copy link
Owner

Forking would certainly be the quickest way. You should start looking at https://github.com/graphicore/librebarcode/blob/master/app/bin/buildAll and modify values around here:

if isTarget "$TARGET"; then
local UNITS_PER_EM=1000
local ASCENDER=600
local DESCENDER=-400
local X_HEIGHT=400
local CAP_HEIGHT=590

Also, ideally, especially if you are going to release change these to something else:

    local FAMILY_BASE_NAME="Libre Barcode"
    local FILE_BASENAME="LibreBarcode"
    local VENDOR_ID="GRCR"
# and add to
    local COPYRIGHT="Copyright 2017-2020 The $FAMILY_BASE_NAME Project Authors (https://github.com/graphicore/librebarcode)"

To avoid confusion, both of users and of the Operating System font menus.

At some point in the future I'll add variable font tables to these fonts, height could be a slider in the fonts and static instances could be made from those automatically. But it won't happen too soon.

@graphicore
Copy link
Owner

Labeled as enhancement, as a reminder of the variable font idea.

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

No branches or pull requests

2 participants