ruby-zint 1.6.0-aarch64-mingw-ucrt

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/.yardopts +9 -0
  4. data/CHANGELOG.md +37 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +146 -0
  7. data/ext/ruby-zint/extconf.rb +113 -0
  8. data/lib/3.4/libzint.so +0 -0
  9. data/lib/ruby-zint.rb +1 -0
  10. data/lib/zint/aus_post.rb +8 -0
  11. data/lib/zint/aus_redirect.rb +8 -0
  12. data/lib/zint/aus_reply.rb +8 -0
  13. data/lib/zint/aus_route.rb +8 -0
  14. data/lib/zint/azrune.rb +8 -0
  15. data/lib/zint/aztec.rb +8 -0
  16. data/lib/zint/barcode.rb +566 -0
  17. data/lib/zint/bc_412.rb +8 -0
  18. data/lib/zint/bitmap.rb +4 -0
  19. data/lib/zint/bitmap_pixel.rb +4 -0
  20. data/lib/zint/c25iata.rb +8 -0
  21. data/lib/zint/c25ind.rb +8 -0
  22. data/lib/zint/c25inter.rb +8 -0
  23. data/lib/zint/c25logic.rb +8 -0
  24. data/lib/zint/c25matrix.rb +8 -0
  25. data/lib/zint/c25standard.rb +8 -0
  26. data/lib/zint/cep_net.rb +8 -0
  27. data/lib/zint/channel.rb +8 -0
  28. data/lib/zint/codabar.rb +8 -0
  29. data/lib/zint/codablock_f.rb +8 -0
  30. data/lib/zint/code11.rb +8 -0
  31. data/lib/zint/code128.rb +8 -0
  32. data/lib/zint/code128ab.rb +8 -0
  33. data/lib/zint/code128b.rb +5 -0
  34. data/lib/zint/code16k.rb +8 -0
  35. data/lib/zint/code32.rb +8 -0
  36. data/lib/zint/code39.rb +8 -0
  37. data/lib/zint/code49.rb +8 -0
  38. data/lib/zint/code93.rb +8 -0
  39. data/lib/zint/code_one.rb +8 -0
  40. data/lib/zint/constants/capability_flags.rb +22 -0
  41. data/lib/zint/constants/debug_flags.rb +9 -0
  42. data/lib/zint/constants/errors.rb +20 -0
  43. data/lib/zint/constants/input_data_types.rb +17 -0
  44. data/lib/zint/constants/output_options.rb +25 -0
  45. data/lib/zint/constants/specific_options.rb +13 -0
  46. data/lib/zint/constants/symbologies.rb +144 -0
  47. data/lib/zint/constants/warn_levels.rb +9 -0
  48. data/lib/zint/constants/warnings.rb +12 -0
  49. data/lib/zint/constants.rb +8 -0
  50. data/lib/zint/daft.rb +8 -0
  51. data/lib/zint/data_matrix.rb +19 -0
  52. data/lib/zint/dbarexp.rb +8 -0
  53. data/lib/zint/dbarexpstk.rb +8 -0
  54. data/lib/zint/dbarltd.rb +8 -0
  55. data/lib/zint/dbaromn.rb +8 -0
  56. data/lib/zint/dbaromnstk.rb +8 -0
  57. data/lib/zint/dbarstk.rb +8 -0
  58. data/lib/zint/dependencies.rb +15 -0
  59. data/lib/zint/dot_code.rb +8 -0
  60. data/lib/zint/dpd.rb +8 -0
  61. data/lib/zint/dpident.rb +8 -0
  62. data/lib/zint/dpleit.rb +8 -0
  63. data/lib/zint/dxfilmedge.rb +8 -0
  64. data/lib/zint/ean128.rb +8 -0
  65. data/lib/zint/ean13.rb +8 -0
  66. data/lib/zint/ean14.rb +8 -0
  67. data/lib/zint/ean8.rb +8 -0
  68. data/lib/zint/eanx.rb +15 -0
  69. data/lib/zint/eanxchk.rb +15 -0
  70. data/lib/zint/excode39.rb +8 -0
  71. data/lib/zint/fim.rb +8 -0
  72. data/lib/zint/flat.rb +8 -0
  73. data/lib/zint/grid_matrix.rb +8 -0
  74. data/lib/zint/gs1_128.rb +10 -0
  75. data/lib/zint/hanxin.rb +8 -0
  76. data/lib/zint/hibc128.rb +8 -0
  77. data/lib/zint/hibc39.rb +8 -0
  78. data/lib/zint/hibcaztec.rb +8 -0
  79. data/lib/zint/hibcblockf.rb +8 -0
  80. data/lib/zint/hibcdm.rb +8 -0
  81. data/lib/zint/hibcmicpdf.rb +8 -0
  82. data/lib/zint/hibcpdf.rb +8 -0
  83. data/lib/zint/hibcqr.rb +8 -0
  84. data/lib/zint/isbnx.rb +8 -0
  85. data/lib/zint/itf14.rb +8 -0
  86. data/lib/zint/japan_post.rb +8 -0
  87. data/lib/zint/kix.rb +8 -0
  88. data/lib/zint/korea_post.rb +8 -0
  89. data/lib/zint/logmars.rb +8 -0
  90. data/lib/zint/mailmark.rb +8 -0
  91. data/lib/zint/mailmark_2d.rb +8 -0
  92. data/lib/zint/mailmark_4s.rb +8 -0
  93. data/lib/zint/maxi_code.rb +8 -0
  94. data/lib/zint/micro_pdf417.rb +8 -0
  95. data/lib/zint/micro_qr.rb +8 -0
  96. data/lib/zint/msiplessey.rb +8 -0
  97. data/lib/zint/native.rb +106 -0
  98. data/lib/zint/nve18.rb +8 -0
  99. data/lib/zint/one_code.rb +8 -0
  100. data/lib/zint/pdf417.rb +8 -0
  101. data/lib/zint/pdf417comp.rb +8 -0
  102. data/lib/zint/pdf417trunc.rb +8 -0
  103. data/lib/zint/pharma.rb +8 -0
  104. data/lib/zint/pharmatwo.rb +8 -0
  105. data/lib/zint/planet.rb +8 -0
  106. data/lib/zint/plessey.rb +8 -0
  107. data/lib/zint/postnet.rb +8 -0
  108. data/lib/zint/pzn.rb +8 -0
  109. data/lib/zint/qr.rb +18 -0
  110. data/lib/zint/rmqr.rb +8 -0
  111. data/lib/zint/rss14.rb +8 -0
  112. data/lib/zint/rss14stack.rb +8 -0
  113. data/lib/zint/rss14stackomni.rb +8 -0
  114. data/lib/zint/rssexp.rb +8 -0
  115. data/lib/zint/rssexpstack.rb +8 -0
  116. data/lib/zint/rssltd.rb +8 -0
  117. data/lib/zint/structs/seg.rb +26 -0
  118. data/lib/zint/structs/structapp.rb +25 -0
  119. data/lib/zint/structs/symbol.rb +55 -0
  120. data/lib/zint/structs/vector.rb +54 -0
  121. data/lib/zint/structs/vector_circle.rb +32 -0
  122. data/lib/zint/structs/vector_hexagon.rb +31 -0
  123. data/lib/zint/structs/vector_rect.rb +37 -0
  124. data/lib/zint/structs/vector_string.rb +50 -0
  125. data/lib/zint/telepen.rb +8 -0
  126. data/lib/zint/telepennum.rb +8 -0
  127. data/lib/zint/ultra.rb +8 -0
  128. data/lib/zint/upc_a.rb +8 -0
  129. data/lib/zint/upc_a_chk.rb +8 -0
  130. data/lib/zint/upc_e.rb +8 -0
  131. data/lib/zint/upc_e_chk.rb +8 -0
  132. data/lib/zint/upnqr.rb +8 -0
  133. data/lib/zint/upu_s10.rb +8 -0
  134. data/lib/zint/uspsimail.rb +8 -0
  135. data/lib/zint/version.rb +3 -0
  136. data/lib/zint/vin.rb +8 -0
  137. data/lib/zint/zint_recipe.rb +31 -0
  138. data/lib/zint.rb +172 -0
  139. data/ruby-zint.gemspec +44 -0
  140. data.tar.gz.sig +0 -0
  141. metadata +340 -0
  142. metadata.gz.sig +0 -0
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 128 (Suppress Code Set C)
3
+ class Code128AB < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE128AB, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ module Zint
2
+ # Legacy
3
+ class Code128B < Code128AB
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 16k
3
+ class Code16k < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE16K, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 32
3
+ class Code32 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE32, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 39
3
+ class Code39 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE39, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 49
3
+ class Code49 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE49, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code 93
3
+ class Code93 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODE93, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Code One
3
+ class CodeOne < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_CODEONE, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,22 @@
1
+ module Zint
2
+ module Constants
3
+ # Capability flags (ZBarcode_Cap() `cap_flag`)
4
+ module CapabilityFlags
5
+ ZINT_CAP_HRT = 0x0001 # Prints Human Readable Text?
6
+ ZINT_CAP_STACKABLE = 0x0002 # Is stackable?
7
+ ZINT_CAP_EXTENDABLE = 0x0004 # Is extendable with add-on data? (Is EAN/UPC?)
8
+ ZINT_CAP_COMPOSITE = 0x0008 # Can have composite data?
9
+ ZINT_CAP_ECI = 0x0010 # Supports Extended Channel Interpretations?
10
+ ZINT_CAP_GS1 = 0x0020 # Supports GS1 data?
11
+ ZINT_CAP_DOTTY = 0x0040 # Can be output as dots?
12
+ ZINT_CAP_QUIET_ZONES = 0x0080 # Has default quiet zones?
13
+ ZINT_CAP_FIXED_RATIO = 0x0100 # Has fixed width-to-height (aspect) ratio?
14
+ ZINT_CAP_READER_INIT = 0x0200 # Supports Reader Initialisation?
15
+ ZINT_CAP_FULL_MULTIBYTE = 0x0400 # Supports full-multibyte option?
16
+ ZINT_CAP_MASK = 0x0800 # Is mask selectable?
17
+ ZINT_CAP_STRUCTAPP = 0x1000 # Supports Structured Append?
18
+ ZINT_CAP_COMPLIANT_HEIGHT = 0x2000 # Has compliant height?
19
+ ZINT_CAP_BINDABLE = 0x4000 # Can set row separators?
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,9 @@
1
+ module Zint
2
+ module Constants
3
+ # Debug flags (debug)
4
+ module DebugFlags
5
+ ZINT_DEBUG_PRINT = 1 # Print debug info (if any) to stdout
6
+ ZINT_DEBUG_TEST = 2 # For internal test use only
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ module Zint
2
+ module Constants
3
+ # Errors (API return values)
4
+ module Errors
5
+ ERRORS = {
6
+ error_too_long: 5,
7
+ error_invalid_data: 6,
8
+ error_invalid_check: 7,
9
+ error_invalid_option: 8,
10
+ error_encoding_problem: 9,
11
+ error_file_access: 10,
12
+ error_memory: 11,
13
+ error_file_write: 12,
14
+ error_uses_eci: 13,
15
+ error_noncompliant: 14,
16
+ error_hrt_truncated: 15 # Error counterpart of warning if WARN_FAIL_ALL set
17
+ }
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,17 @@
1
+ module Zint
2
+ module Constants
3
+ # Input data types (`symbol->input_mode`)
4
+ module InputDataTypes
5
+ DATA_MODE = 0 # Binary
6
+ UNICODE_MODE = 1 # UTF-8
7
+ GS1_MODE = 2 # GS1
8
+ ESCAPE_MODE = 0x0008 # Process escape sequences
9
+ GS1PARENS_MODE = 0x0010 # Process parentheses as GS1 AI delimiters (instead of square brackets)
10
+ GS1NOCHECK_MODE = 0x0020 # Do not check validity of GS1 data (except that printable ASCII only)
11
+ HEIGHTPERROW_MODE = 0x0040 # Interpret `height` as per-row rather than as overall height
12
+ FAST_MODE = 0x0080 # Use faster if less optimal encodation or other shortcuts if available (affects DATAMATRIX, MICROPDF417, PDF417, QRCODE & UPNQR only)
13
+ EXTRA_ESCAPE_MODE = 0x0100 # Process special symbology-specific escape sequences as well as others. Note: currently Code 128 only.
14
+ GS1SYNTAXENGINE_MODE = 0x0200 # Use the GS1 Syntax Engine (if available) to strictly validate GS1 input
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,25 @@
1
+ module Zint
2
+ module Constants
3
+ # Output options (`symbol->output_options`)
4
+ module OutputOptions
5
+ BARCODE_BIND_TOP = 0x0001 # Boundary bar above the symbol only (not below), does not affect stacking
6
+ BARCODE_BIND = 0x0002 # Boundary bars above & below the symbol and between stacked symbols
7
+ BARCODE_BOX = 0x0004 # Box around symbol
8
+ BARCODE_STDOUT = 0x0008 # Output to stdout
9
+ READER_INIT = 0x0010 # Reader Initialisation (Programming)
10
+ SMALL_TEXT = 0x0020 # Use smaller font
11
+ BOLD_TEXT = 0x0040 # Use bold font
12
+ CMYK_COLOUR = 0x0080 # CMYK colour space (Encapsulated PostScript and TIF)
13
+ BARCODE_DOTTY_MODE = 0x0100 # Plot a matrix symbol using dots rather than squares
14
+ GS1_GS_SEPARATOR = 0x0200 # Use GS instead of FNC1 as GS1 separator (Data Matrix)
15
+ OUT_BUFFER_INTERMEDIATE = 0x0400 # Return ASCII values in bitmap buffer (OUT_BUFFER only)
16
+ BARCODE_QUIET_ZONES = 0x0800 # Add compliant quiet zones (additional to any specified whitespace); Note: CODE16K, CODE49, CODABLOCKF, ITF14, EAN/UPC have default quiet zones
17
+ BARCODE_NO_QUIET_ZONES = 0x1000 # Disable quiet zones, notably those with defaults as listed above
18
+ COMPLIANT_HEIGHT = 0x2000 # Warn if height not compliant and use standard height (if any) as default
19
+ EANUPC_GUARD_WHITESPACE = 0x04000 # Add quiet zone indicators ("<"/">") to HRT whitespace (EAN/UPC)
20
+ EMBED_VECTOR_FONT = 0x08000 # Embed font in vector output - currently only for SVG output
21
+ BARCODE_MEMORY_FILE = 0x10000 # Write output to in-memory buffer `memfile` instead of to `outfile`
22
+ BARCODE_CONTENT_SEGS = 0x20000 # Write data encoded to content segment buffers `content_segs`
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ module Zint
2
+ module Constants
3
+ # Specific options (`symbol->option_3`)
4
+ module SpecificOptions
5
+ DM_SQUARE = 100 # Only consider square versions on automatic symbol size selection
6
+ DM_DMRE = 101 # Consider DMRE versions on automatic symbol size selection
7
+ DM_ISO_144 = 128 # Use ISO instead of "de facto" format for 144x144 (i.e. don't skew ECC)
8
+
9
+ ZINT_FULL_MULTIBYTE = 200 # Enable Kanji/Hanzi compression for Latin-1 & binary data
10
+ ULTRA_COMPRESSION = 128 # Enable Ultracode compression (experimental)
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,144 @@
1
+ module Zint
2
+ module Constants
3
+ # Symbologies (`symbol->symbology`)
4
+ module Symbologies
5
+ # Tbarcode 7 codes
6
+ BARCODE_CODE11 = 1 # Code 11
7
+ BARCODE_C25STANDARD = 2 # 2 of 5 Standard (Matrix)
8
+ BARCODE_C25MATRIX = 2 # Legacy
9
+ BARCODE_C25INTER = 3 # 2 of 5 Interleaved
10
+ BARCODE_C25IATA = 4 # 2 of 5 IATA
11
+ BARCODE_C25LOGIC = 6 # 2 of 5 Data Logic
12
+ BARCODE_C25IND = 7 # 2 of 5 Industrial
13
+ BARCODE_CODE39 = 8 # Code 39
14
+ BARCODE_EXCODE39 = 9 # Extended Code 39
15
+ BARCODE_EAN8 = 10 # EAN-8 (European Article Number) GTIN-8
16
+ BARCODE_EAN_2ADDON = 11 # EAN/UPC 2-digit add-on (standalone)
17
+ BARCODE_EAN_5ADDON = 12 # EAN/UPC 5-digit add-on (standalone)
18
+ BARCODE_EANX = 13 # Legacy
19
+ BARCODE_EANX_CHK = 14 # Legacy
20
+ BARCODE_EAN13 = 15 # EAN-13 (European Article Number) GTIN-13
21
+ BARCODE_GS1_128 = 16 # GS1-128
22
+ BARCODE_EAN128 = 16 # Legacy
23
+ BARCODE_CODABAR = 18 # Codabar
24
+ BARCODE_CODE128 = 20 # Code 128
25
+ BARCODE_DPLEIT = 21 # Deutsche Post Leitcode
26
+ BARCODE_DPIDENT = 22 # Deutsche Post Identcode
27
+ BARCODE_CODE16K = 23 # Code 16k
28
+ BARCODE_CODE49 = 24 # Code 49
29
+ BARCODE_CODE93 = 25 # Code 93
30
+ BARCODE_FLAT = 28 # Flattermarken
31
+ BARCODE_DBAR_OMN = 29 # GS1 DataBar Omnidirectional
32
+ BARCODE_RSS14 = 29 # Legacy
33
+ BARCODE_DBAR_LTD = 30 # GS1 DataBar Limited
34
+ BARCODE_RSS_LTD = 30 # Legacy
35
+ BARCODE_DBAR_EXP = 31 # GS1 DataBar Expanded
36
+ BARCODE_RSS_EXP = 31 # Legacy
37
+ BARCODE_TELEPEN = 32 # Telepen Alpha
38
+ BARCODE_UPCA = 34 # UPC-A
39
+ BARCODE_UPCA_CHK = 35 # UPC-A + Check Digit
40
+ BARCODE_UPCE = 37 # UPC-E
41
+ BARCODE_UPCE_CHK = 38 # UPC-E + Check Digit
42
+ BARCODE_POSTNET = 40 # USPS (U.S. Postal Service) POSTNET
43
+ BARCODE_MSI_PLESSEY = 47 # MSI Plessey
44
+ BARCODE_FIM = 49 # Facing Identification Mark
45
+ BARCODE_LOGMARS = 50 # LOGMARS
46
+ BARCODE_PHARMA = 51 # Pharmacode One-Track
47
+ BARCODE_PZN = 52 # Pharmazentralnummer
48
+ BARCODE_PHARMA_TWO = 53 # Pharmacode Two-Track
49
+ BARCODE_CEPNET = 54 # Brazilian CEPNet Postal Code
50
+ BARCODE_PDF417 = 55 # PDF417
51
+ BARCODE_PDF417COMP = 56 # Compact PDF417 (Truncated PDF417)
52
+ BARCODE_PDF417TRUNC = 56 # Legacy
53
+ BARCODE_MAXICODE = 57 # MaxiCode
54
+ BARCODE_QRCODE = 58 # QR Code
55
+ BARCODE_CODE128AB = 60 # Code 128 (Suppress subset C)
56
+ BARCODE_CODE128B = 60 # Legacy
57
+ BARCODE_AUSPOST = 63 # Australia Post Standard Customer
58
+ BARCODE_AUSREPLY = 66 # Australia Post Reply Paid
59
+ BARCODE_AUSROUTE = 67 # Australia Post Routing
60
+ BARCODE_AUSREDIRECT = 68 # Australia Post Redirection
61
+ BARCODE_ISBNX = 69 # ISBN
62
+ BARCODE_RM4SCC = 70 # Royal Mail 4-State Customer Code
63
+ BARCODE_DATAMATRIX = 71 # Data Matrix (ECC200)
64
+ BARCODE_EAN14 = 72 # EAN-14
65
+ BARCODE_VIN = 73 # Vehicle Identification Number
66
+ BARCODE_CODABLOCKF = 74 # Codablock-F
67
+ BARCODE_NVE18 = 75 # NVE-18 (SSCC-18)
68
+ BARCODE_JAPANPOST = 76 # Japanese Postal Code
69
+ BARCODE_KOREAPOST = 77 # Korea Post
70
+ BARCODE_DBAR_STK = 79 # GS1 DataBar Stacked
71
+ BARCODE_RSS14STACK = 79 # Legacy
72
+ BARCODE_DBAR_OMNSTK = 80 # GS1 DataBar Stacked Omnidirectional
73
+ BARCODE_RSS14STACK_OMNI = 80 # Legacy
74
+ BARCODE_DBAR_EXPSTK = 81 # GS1 DataBar Expanded Stacked
75
+ BARCODE_RSS_EXPSTACK = 81 # Legacy
76
+ BARCODE_PLANET = 82 # USPS PLANET
77
+ BARCODE_MICROPDF417 = 84 # MicroPDF417
78
+ BARCODE_USPS_IMAIL = 85 # USPS Intelligent Mail (OneCode)
79
+ BARCODE_ONECODE = 85 # Legacy
80
+ BARCODE_PLESSEY = 86 # UK Plessey
81
+
82
+ # Tbarcode 8 codes
83
+ BARCODE_TELEPEN_NUM = 87 # Telepen Numeric
84
+ BARCODE_ITF14 = 89 # ITF-14
85
+ BARCODE_KIX = 90 # Dutch Post KIX Code
86
+ BARCODE_AZTEC = 92 # Aztec Code
87
+ BARCODE_DAFT = 93 # DAFT Code
88
+ BARCODE_DPD = 96 # DPD Code
89
+ BARCODE_MICROQR = 97 # Micro QR Code
90
+
91
+ # Tbarcode 9 codes
92
+ BARCODE_HIBC_128 = 98 # HIBC (Health Industry Barcode) Code 128
93
+ BARCODE_HIBC_39 = 99 # HIBC Code 39
94
+ BARCODE_HIBC_DM = 102 # HIBC Data Matrix
95
+ BARCODE_HIBC_QR = 104 # HIBC QR Code
96
+ BARCODE_HIBC_PDF = 106 # HIBC PDF417
97
+ BARCODE_HIBC_MICPDF = 108 # HIBC MicroPDF417
98
+ BARCODE_HIBC_BLOCKF = 110 # HIBC Codablock-F
99
+ BARCODE_HIBC_AZTEC = 112 # HIBC Aztec Code
100
+
101
+ # Tbarcode 10 codes
102
+ BARCODE_DOTCODE = 115 # DotCode
103
+ BARCODE_HANXIN = 116 # Han Xin (Chinese Sensible) Code
104
+
105
+ # Tbarcode 11 codes
106
+ BARCODE_MAILMARK_2D = 119 # Royal Mail 2D Mailmark (CMDM) (Data Matrix)
107
+ BARCODE_UPU_S10 = 120 # Universal Postal Union S10
108
+ BARCODE_MAILMARK_4S = 121 # Royal Mail 4-State Mailmark
109
+ BARCODE_MAILMARK = 121 # Legacy
110
+
111
+ # Zint specific
112
+ BARCODE_AZRUNE = 128 # Aztec Runes
113
+ BARCODE_CODE32 = 129 # Code 32
114
+ BARCODE_EANX_CC = 130 # EAN Composite
115
+ BARCODE_GS1_128_CC = 131 # GS1-128 Composite
116
+ BARCODE_EAN128_CC = 131 # Legacy
117
+ BARCODE_DBAR_OMN_CC = 132 # GS1 DataBar Omnidirectional Composite
118
+ BARCODE_RSS14_CC = 132 # Legacy
119
+ BARCODE_DBAR_LTD_CC = 133 # GS1 DataBar Limited Composite
120
+ BARCODE_RSS_LTD_CC = 133 # Legacy
121
+ BARCODE_DBAR_EXP_CC = 134 # GS1 DataBar Expanded Composite
122
+ BARCODE_RSS_EXP_CC = 134 # Legacy
123
+ BARCODE_UPCA_CC = 135 # UPC-A Composite
124
+ BARCODE_UPCE_CC = 136 # UPC-E Composite
125
+ BARCODE_DBAR_STK_CC = 137 # GS1 DataBar Stacked Composite
126
+ BARCODE_RSS14STACK_CC = 137 # Legacy
127
+ BARCODE_DBAR_OMNSTK_CC = 138 # GS1 DataBar Stacked Omnidirectional Composite
128
+ BARCODE_RSS14_OMNI_CC = 138 # Legacy
129
+ BARCODE_DBAR_EXPSTK_CC = 139 # GS1 DataBar Expanded Stacked Composite
130
+ BARCODE_RSS_EXPSTACK_CC = 139 # Legacy
131
+ BARCODE_CHANNEL = 140 # Channel Code
132
+ BARCODE_CODEONE = 141 # Code One
133
+ BARCODE_GRIDMATRIX = 142 # Grid Matrix
134
+ BARCODE_UPNQR = 143 # UPNQR (Univerzalnega Plačilnega Naloga QR)
135
+ BARCODE_ULTRA = 144 # Ultracode
136
+ BARCODE_RMQR = 145 # Rectangular Micro QR Code (rMQR)
137
+ BARCODE_BC412 = 146 # IBM BC412 (SEMI T1-95)
138
+ BARCODE_DXFILMEDGE = 147 # DX Film Edge Barcode on 35mm and APS films
139
+ BARCODE_EAN8_CC = 148 # EAN-8 Composite
140
+ BARCODE_EAN13_CC = 149 # EAN-13 Composite
141
+ BARCODE_LAST = 149 # Max barcode number marker, not barcode
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,9 @@
1
+ module Zint
2
+ module Constants
3
+ # Warning level (`symbol->warn_level`)
4
+ module WarnLevels
5
+ WARN_DEFAULT = 0 # Default behaviour
6
+ WARN_FAIL_ALL = 2 # Treat warning as error
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ module Zint
2
+ module Constants
3
+ # Warnings (API return values)
4
+ module Warnings
5
+ WARNINGS = {
6
+ warn_invalid_option: 2,
7
+ warn_uses_eci: 3,
8
+ warn_noncompliant: 4
9
+ }
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ module Constants
3
+ # The largest amount of data that can be encoded is 4350 4-byte UTF-8 chars in Han Xin Code
4
+ ZINT_MAX_DATA_LEN = 17400
5
+ # Maximum number of segments allowed for (`seg_count`)
6
+ ZINT_MAX_SEG_COUNT = 256
7
+ end
8
+ end
data/lib/zint/daft.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # DAFT Code
3
+ class Daft < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DAFT, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,19 @@
1
+ module Zint
2
+ # Data Matrix (ECC200)
3
+ class DataMatrix < Barcode
4
+ # Options
5
+ DM_NULL = 0
6
+ DM_ASCII = 1
7
+ DM_C40 = 2
8
+ DM_TEXT = 3
9
+ DM_X12 = 4
10
+ DM_EDIFACT = 5
11
+ DM_BASE256 = 6
12
+
13
+ def initialize(value: nil, input_file: nil, type: Zint::BARCODE_DATAMATRIX, symbology: type, **kwargs)
14
+ raise ArgumentError, "Invalid symbology for DataMatrix code" unless [Zint::BARCODE_DATAMATRIX, Zint::BARCODE_HIBC_DM].include?(symbology)
15
+
16
+ super(value: value, input_file: input_file, symbology: symbology, option_3: Zint::DM_SQUARE, **kwargs)
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # GS1 DataBar Expanded
3
+ class DbarExp < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_EXP, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # GS1 DataBar Expanded Stacked
3
+ class DbarExpstk < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_EXPSTK, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # GS1 DataBar Limited
3
+ class DbarLtd < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_LTD, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # GS1 DataBar Omnidirectional
3
+ class DbarOmn < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_OMN, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # GS1 DataBar Stacked Omnidirectional
3
+ class DbarOmnstk < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_OMNSTK, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # GS1 DataBar Stacked
3
+ class DbarStk < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DBAR_STK, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,15 @@
1
+ module Zint
2
+ LIBZ_VERSION = ENV["LIBZ_VERSION"] || "1.3.2"
3
+ LIBZ_SOURCE_URI = "http://zlib.net/fossils/zlib-#{LIBZ_VERSION}.tar.gz"
4
+ LIBZ_SOURCE_SHA256 = "bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16"
5
+
6
+ ZINT_VERSION = ENV["ZINT_VERSION"] || "2.16.0"
7
+ ZINT_SOURCE_URI = "https://downloads.sourceforge.net/zint/zint-#{ZINT_VERSION}-src.tar.gz"
8
+ ZINT_SOURCE_SHA256 = "37e767afada2403bb9ae49b93a19eb0a9e944a0c278d9f23522746b3d08a3c4b"
9
+
10
+ LIBPNG_VERSION = ENV["LIBPNG_VERSION"] || "1.6.56"
11
+ LIBPNG_SOURCE_URI = "https://download.sourceforge.net/libpng/libpng-#{LIBPNG_VERSION}.tar.xz"
12
+ LIBPNG_SOURCE_SHA256 = "f7d8bf1601b7804f583a254ab343a6549ca6cf27d255c302c47af2d9d36a6f18"
13
+
14
+ MINI_PORTILE_VERSION = "~> 2.1"
15
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # DotCode
3
+ class DotCode < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DOTCODE, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/dpd.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # DPD Code
3
+ class Dpd < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DPD, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Deutsche Post Identcode
3
+ class Dpident < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DPIDENT, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Deutsche Post Leitcode
3
+ class Dpleit < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DPLEIT, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # DX Film Edge Barcode on 35mm and APS films
3
+ class Dxfilmedge < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_DXFILMEDGE, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Legacy
3
+ class Ean128 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EAN128, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/ean13.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # EAN-13 (European Article Number)
3
+ class Ean13 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EAN13, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/ean14.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # EAN-14
3
+ class Ean14 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EAN14, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/ean8.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # EAN-8 (European Article Number)
3
+ class Ean8 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EAN8, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/eanx.rb ADDED
@@ -0,0 +1,15 @@
1
+ module Zint
2
+ # EAN (European Article Number)
3
+ #
4
+ # Deprecated class -> use Ean8 or Ean13 instead.
5
+ class Eanx < Barcode
6
+ called = caller.find do |fn|
7
+ !fn.include?(RbConfig::TOPDIR) && !fn.start_with?(File.expand_path("..", __dir__))
8
+ end
9
+ warn("Zint::Eanx is deprecated. Please use Ean8 or Ean13 instead! Called from #{called}", category: :deprecated)
10
+
11
+ def initialize(value: nil, input_file: nil, **kwargs)
12
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EANX, **kwargs)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module Zint
2
+ # EAN + Check Digit
3
+ #
4
+ # Deprecated class -> use Ean8 or Ean13 instead.
5
+ class EanxChk < Barcode
6
+ called = caller.find do |fn|
7
+ !fn.include?(RbConfig::TOPDIR) && !fn.start_with?(File.expand_path("..", __dir__))
8
+ end
9
+ warn("Zint::EanxChk is deprecated. Please use Ean8 or Ean13 instead! Called from #{called}", category: :deprecated)
10
+
11
+ def initialize(value: nil, input_file: nil, **kwargs)
12
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EANX_CHK, **kwargs)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Extended Code 39
3
+ class Excode39 < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_EXCODE39, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/fim.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Facing Identification Mark
3
+ class Fim < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_FIM, **kwargs)
6
+ end
7
+ end
8
+ end
data/lib/zint/flat.rb ADDED
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Flattermarken
3
+ class Flat < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_FLAT, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Grid Matrix
3
+ class GridMatrix < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_GRIDMATRIX, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ module Zint
2
+ # standard:disable Naming/ClassAndModuleCamelCase
3
+ # GS1-128
4
+ class Gs1_128 < Barcode
5
+ # standard:enable Naming/ClassAndModuleCamelCase
6
+ def initialize(value: nil, input_file: nil, **kwargs)
7
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_GS1_128, **kwargs)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Han Xin (Chinese Sensible) Code
3
+ class Hanxin < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HANXIN, **kwargs)
6
+ end
7
+ end
8
+ end