Skip to content

Add barcode bar spacing / gap control #9

Description

@productdevbook

Context

Description

Users need finer control over barcode rendering:

  1. Gap/spacing between bars for visual or scanning reasons
  2. Fractional bar widths for precise physical sizing

Current Status in etiket

The barWidth option accepts a number and is used as a multiplier (barPixelWidth = w * barWidth), but there is no option to add spacing between bars and it's unclear if fractional values work correctly with the SVG coordinate system.

Proposed Solution

  1. Add a barGap option (default: 0) that inserts space between bars
  2. Ensure barWidth supports fractional values (e.g., 1.5, 0.75)
  3. Update the SVG renderer to handle fractional coordinates cleanly
  4. Document the relationship between barWidth and scanning reliability (too thin = scan failures)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions