libptouch: P700/P900 families, optional JSON config, ESC i z and print sequencing

- Add printer_family and profile flags; load overrides from printer_families.json
- Set ESC i z page byte from profile; pass prof into ptouch_fill_esc_iz
- End print with 0x1A only (drop FF prefix); extend Ruby FFI and CLI media info
- Add reference/ptp_raster_ref.adoc; install config under share/ptouch_label

Made-with: Cursor
This commit is contained in:
knb
2026-04-19 12:20:21 +09:00
parent 3f2eb464aa
commit bfd6adda42
18 changed files with 456 additions and 47 deletions

View File

@@ -151,6 +151,7 @@ module Libptouch
def current_media_info
info = Binding::MediaInfo.new
raise_on_error(Binding.libptouch_get_current_media_info(@native, info.pointer))
fam = info[:printer_family]
{
media_width_code: info[:media_width_code],
media_kind_code: info[:media_kind_code],
@@ -161,7 +162,9 @@ module Libptouch
left_margin_dots: info[:left_margin_dots],
right_margin_dots: info[:right_margin_dots],
min_feed_dots: info[:min_feed_dots],
min_feed_mm: info[:min_feed_mm]
min_feed_mm: info[:min_feed_mm],
printer_family: fam,
printer_family_label: Binding.libptouch_printer_family_label(fam)
}
end
end