* [Printing-architecture] Contributing braille embosser support
@ 2015-12-09 10:27 Samuel Thibault
2015-12-09 16:04 ` Michael Sweet
` (2 more replies)
0 siblings, 3 replies; 26+ messages in thread
From: Samuel Thibault @ 2015-12-09 10:27 UTC (permalink / raw)
To: printing-architecture
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Hello,
I have been working on braille embosser support for CUPS, so that
embossing a document can be as easy as printing it. I have attached the
result.
The principle I have followed is to use the cups architecture to
separate on one hand frontends which turn documents into braille text
(text/vnd.cups-brf) or braille graphics (image/vnd.cups-brf), notably
based on liblouis, and on the other hand backends which emboss braille
text or braille graphics (I have implemented a generic driver which
should work on all embossers, and a driver for the Index embosser which
I can actually test).
For now, I have made a separate package, so it is easy to test it
already, but ideally, I would like to see this work integrated into CUPS
filters, so that blind people don't need to install a separate package,
but just configure CUPS for their embosser. How should we proceed?
Perhaps first iterate over the packaged version, until the code is fine
for integration, and then I'll submit a patch against cups-filters?
Samuel
[-- Attachment #2: cups-braille_0.1.tar.gz --]
[-- Type: application/x-tar-gz, Size: 14216 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [Printing-architecture] Contributing braille embosser support 2015-12-09 10:27 [Printing-architecture] Contributing braille embosser support Samuel Thibault @ 2015-12-09 16:04 ` Michael Sweet 2015-12-10 20:29 ` Till Kamppeter 2016-11-27 18:54 ` Samuel Thibault 2 siblings, 0 replies; 26+ messages in thread From: Michael Sweet @ 2015-12-09 16:04 UTC (permalink / raw) To: Samuel Thibault; +Cc: printing-architecture@lists.linux-foundation.org Samuel, This is very cool, thank you! > On Dec 9, 2015, at 5:27 AM, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote: > > Hello, > > I have been working on braille embosser support for CUPS, so that > embossing a document can be as easy as printing it. I have attached the > result. > > The principle I have followed is to use the cups architecture to > separate on one hand frontends which turn documents into braille text > (text/vnd.cups-brf) or braille graphics (image/vnd.cups-brf), notably > based on liblouis, and on the other hand backends which emboss braille > text or braille graphics (I have implemented a generic driver which > should work on all embossers, and a driver for the Index embosser which > I can actually test). > > For now, I have made a separate package, so it is easy to test it > already, but ideally, I would like to see this work integrated into CUPS > filters, so that blind people don't need to install a separate package, > but just configure CUPS for their embosser. How should we proceed? > Perhaps first iterate over the packaged version, until the code is fine > for integration, and then I'll submit a patch against cups-filters? > > Samuel > <cups-braille_0.1.tar.gz>_______________________________________________ > Printing-architecture mailing list > Printing-architecture@lists.linux-foundation.org > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.linuxfoundation.org_mailman_listinfo_printing-2Darchitecture&d=BQICAg&c=Hw-EJUFt2_D9PK5csBJ29kRV40HqSDXWTLPyZ6W8u84&r=celVg12QtW5bvoWXWyIdeQ&m=jeSlmoaZFovntwF_U0gp292XY4VsyoMEUfKz0PUGsAg&s=3XIbVXdJdTkphd6bQFfESaGPKGkmo-h4RVOy2MW_slQ&e= _________________________________________________________ Michael Sweet, Senior Printing System Engineer ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-09 10:27 [Printing-architecture] Contributing braille embosser support Samuel Thibault 2015-12-09 16:04 ` Michael Sweet @ 2015-12-10 20:29 ` Till Kamppeter 2015-12-10 20:45 ` Samuel Thibault 2016-11-27 18:54 ` Samuel Thibault 2 siblings, 1 reply; 26+ messages in thread From: Till Kamppeter @ 2015-12-10 20:29 UTC (permalink / raw) To: Samuel Thibault, printing-architecture Hi, Thank you very much for this great effort. This is really missing in the Linux operating system. I am looking into integrating it into cups-filters, but I would like to have the following improvements on it: 1. PPD files: If there are different options, like LibLouis2, libLouis3, ... their name translations/long names should also be different, not having "Additional Braille transcription" for all of them, but rather "Additional Braille transcription (2)" for LibLouis2, "Additional Braille transcription (3)" for LibLouis3, ... Otherwise it is rather confusing having several options showing with the same name in a print dialog. 2. Cluttering of /usr/lib/cups/filter/: This directory should only contain the actual CUPS filters (executables called by CUPS in the filter chain for a job. The auxiliary files should go into a separate directory, like /usr/share/cups/braille/ (if there are no architecture-dependent executables or libraries) or /usr/lib/cups/braille (if there are architecture-dependent executables or libraries). 3. Binary bytes in shell scripts: Some scripts, like drivers/index/textbrftoindexv3 contain binary bytes. This leads to problems with version control systems like GIT or BZR. Please avoid any binary bytes in scripts or source files, generally in any file contained in the source tarball. There are ways to express this with pure text. Or do everything in C (this is even better), there are for sure ways to avoid binary bytes. I am grateful if you could fix that. Till On 12/09/2015 08:27 AM, Samuel Thibault wrote: > Hello, > > I have been working on braille embosser support for CUPS, so that > embossing a document can be as easy as printing it. I have attached the > result. > > The principle I have followed is to use the cups architecture to > separate on one hand frontends which turn documents into braille text > (text/vnd.cups-brf) or braille graphics (image/vnd.cups-brf), notably > based on liblouis, and on the other hand backends which emboss braille > text or braille graphics (I have implemented a generic driver which > should work on all embossers, and a driver for the Index embosser which > I can actually test). > > For now, I have made a separate package, so it is easy to test it > already, but ideally, I would like to see this work integrated into CUPS > filters, so that blind people don't need to install a separate package, > but just configure CUPS for their embosser. How should we proceed? > Perhaps first iterate over the packaged version, until the code is fine > for integration, and then I'll submit a patch against cups-filters? > > Samuel > > > > _______________________________________________ > Printing-architecture mailing list > Printing-architecture@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/printing-architecture > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-10 20:29 ` Till Kamppeter @ 2015-12-10 20:45 ` Samuel Thibault 2015-12-10 21:02 ` Till Kamppeter 0 siblings, 1 reply; 26+ messages in thread From: Samuel Thibault @ 2015-12-10 20:45 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture Hello, Till Kamppeter, on Thu 10 Dec 2015 18:29:40 -0200, wrote: > I am looking into integrating it into cups-filters, Cool :) > 1. PPD files: If there are different options, like LibLouis2, libLouis3, ... > their name translations/long names should also be different, Sure, easy :) > 2. Cluttering of /usr/lib/cups/filter/: This directory should only contain > the actual CUPS filters > The auxiliary files should go into a separate directory, like > /usr/share/cups/braille/ Sure, easy :) > 3. Binary bytes in shell scripts: Some scripts, like > drivers/index/textbrftoindexv3 contain binary bytes. Right. I'll use bash's $'\015' then. > Or do everything in C (this is even better), I had been wondering about turning these into C indeed, but the shell version seems to me easier to read and maintain actually. Samuel ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-10 20:45 ` Samuel Thibault @ 2015-12-10 21:02 ` Till Kamppeter 2015-12-10 21:31 ` Samuel Thibault 0 siblings, 1 reply; 26+ messages in thread From: Till Kamppeter @ 2015-12-10 21:02 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/10/2015 06:45 PM, Samuel Thibault wrote: > Hello, > > Till Kamppeter, on Thu 10 Dec 2015 18:29:40 -0200, wrote: >> I am looking into integrating it into cups-filters, > > Cool :) > >> 1. PPD files: If there are different options, like LibLouis2, libLouis3, ... >> their name translations/long names should also be different, > > Sure, easy :) > >> 2. Cluttering of /usr/lib/cups/filter/: This directory should only contain >> the actual CUPS filters > >> The auxiliary files should go into a separate directory, like >> /usr/share/cups/braille/ > > Sure, easy :) > >> 3. Binary bytes in shell scripts: Some scripts, like >> drivers/index/textbrftoindexv3 contain binary bytes. > > Right. I'll use bash's $'\015' then. > >> Or do everything in C (this is even better), > > I had been wondering about turning these into C indeed, but the shell > version seems to me easier to read and maintain actually. > OK, thanks. So please go ahead with the fixes. And I am also grateful if you do the maintenance of your code when it is in cups-filters as I do not know much about Braille embossers and also do not have such a device available to me. How are Braille embossers connected and how do they appear for the computer? Do they work with the standard usb/parallel/socket/ipp backends of CUPS? Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-10 21:02 ` Till Kamppeter @ 2015-12-10 21:31 ` Samuel Thibault 2015-12-11 0:19 ` Till Kamppeter 0 siblings, 1 reply; 26+ messages in thread From: Samuel Thibault @ 2015-12-10 21:31 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture [-- Attachment #1: Type: text/plain, Size: 1036 bytes --] Till Kamppeter, on Thu 10 Dec 2015 19:02:03 -0200, wrote: > OK, thanks. So please go ahead with the fixes. Here is an updated tarball. BTW, which licence would it be better to release this code under? I'm fine with most free software licences. > And I am also grateful if you do the maintenance of your code when it is in > cups-filters as I do not know much about Braille embossers and also do not > have such a device available to me. Sure! That's what I planned. I'll probably try to contact other braille embossers manufacturers to get protocol or even devices. Index is very common in Europe, so it is good enough for a start. > How are Braille embossers connected and how do they appear for the computer? > Do they work with the standard usb/parallel/socket/ipp backends of CUPS? Yes, they really look like usual printers. Just configuring them as generic text printers would work for instance. In the case of Index embossers, they have serial, USB (line-printer interface), and network (HP JetDirect) support. Samuel [-- Attachment #2: cups-braille_0.1.tar.gz --] [-- Type: application/x-tar-gz, Size: 14272 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-10 21:31 ` Samuel Thibault @ 2015-12-11 0:19 ` Till Kamppeter 2015-12-11 0:31 ` Samuel Thibault 0 siblings, 1 reply; 26+ messages in thread From: Till Kamppeter @ 2015-12-11 0:19 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/10/2015 07:31 PM, Samuel Thibault wrote: > Till Kamppeter, on Thu 10 Dec 2015 19:02:03 -0200, wrote: >> OK, thanks. So please go ahead with the fixes. > > Here is an updated tarball. > Thank you very much. I will look into it. > BTW, which licence would it be better to release this code under? I'm > fine with most free software licences. > I think MIT would be best. >> And I am also grateful if you do the maintenance of your code when it is in >> cups-filters as I do not know much about Braille embossers and also do not >> have such a device available to me. > > Sure! That's what I planned. I'll probably try to contact other > braille embossers manufacturers to get protocol or even devices. Index > is very common in Europe, so it is good enough for a start. > Great. >> How are Braille embossers connected and how do they appear for the computer? >> Do they work with the standard usb/parallel/socket/ipp backends of CUPS? > > Yes, they really look like usual printers. Just configuring them as > generic text printers would work for instance. In the case of Index > embossers, they have serial, USB (line-printer interface), and network > (HP JetDirect) support. > OK, then no new backends are needed. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-11 0:19 ` Till Kamppeter @ 2015-12-11 0:31 ` Samuel Thibault 2015-12-11 1:17 ` Till Kamppeter 2015-12-12 2:28 ` Till Kamppeter 0 siblings, 2 replies; 26+ messages in thread From: Samuel Thibault @ 2015-12-11 0:31 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture [-- Attachment #1: Type: text/plain, Size: 249 bytes --] Till Kamppeter, on Thu 10 Dec 2015 22:19:54 -0200, wrote: > I think MIT would be best. Here is a tarball with fixed copyrights. I have also moved the shell helpers to /usr/share instead of /usr/lib since they are architecture-independent. Samuel [-- Attachment #2: cups-braille_0.1.tar.gz --] [-- Type: application/x-tar-gz, Size: 15236 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-11 0:31 ` Samuel Thibault @ 2015-12-11 1:17 ` Till Kamppeter 2015-12-12 2:28 ` Till Kamppeter 1 sibling, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-11 1:17 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/10/2015 10:31 PM, Samuel Thibault wrote: > Till Kamppeter, on Thu 10 Dec 2015 22:19:54 -0200, wrote: >> I think MIT would be best. > > Here is a tarball with fixed copyrights. I have also moved the shell > helpers to /usr/share instead of /usr/lib since they are > architecture-independent. > > Samuel > All OK now, I will integrate your software in cups-filters 1.4.0. Thank you very much. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-11 0:31 ` Samuel Thibault 2015-12-11 1:17 ` Till Kamppeter @ 2015-12-12 2:28 ` Till Kamppeter 2015-12-12 3:53 ` Till Kamppeter 2015-12-12 8:36 ` Samuel Thibault 1 sibling, 2 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-12 2:28 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/10/2015 10:31 PM, Samuel Thibault wrote: > Till Kamppeter, on Thu 10 Dec 2015 22:19:54 -0200, wrote: >> I think MIT would be best. > > Here is a tarball with fixed copyrights. I have also moved the shell > helpers to /usr/share instead of /usr/lib since they are > architecture-independent. > > Samuel > Thank you very much for the tarball. I have integrated your software in cups-filters now and committed it to the BZR repository. Please download and try, and tell me whether everything is working. I have the following remarks: - I have integrated your files into the build system of cups-filters following all free software standards. Especially the configure script of cups-filters checks the presence of liblouis and also takes an "--enable-braille"/"--disable-braille" command line option pair. with Braille support being enabled by default if liblouis is present. Paths in the scripts are fitted to the system by configure, therefore the scripts in the source are *.in files with "@...@" placeholders. - PPD files are not pre-built by the Makefile. The *.drv and *.defs files are put into the standard places in the CUPS directories, so that PPDs are generated on-the-fly. - Documentation of the README and TODO files is joined to the README file of cups-filters. - Your name is in the COPYING file now. - There are three files which I have dropped as they do not get used (no reference to them in the other files): drivers/generic/fr.po, drivers/index/fr.po, and drivers/index/ubrlto4dot.c. For what are these files used, especially what does drivers/index/ubrlto4dot.c do? - I have dropped the debian/ directory. Upstream packages should never ship a debian/ directory, independent if it contains the files for generating Debian packages or something else. - The Generic embosser PPD file passes cupstestppd, the files for the Index printers not. The error message is: **FAIL** Multiple occurrences of option IndexTable choice name 24. and indeed the option "IndexTable" has two choices with "24" as short name. As I do not have the printers, I do not know how to fix this correctly. Can you fix this? (Found by running the command "/usr/lib/cups/daemon/cups-driverd cat drv:///indexv4.drv/ibrlbox4.ppd | cupstestppd -" on a system with the current state of the cups-filters BZR installed). Thanks again for your great contribution. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 2:28 ` Till Kamppeter @ 2015-12-12 3:53 ` Till Kamppeter 2015-12-12 8:36 ` Samuel Thibault 1 sibling, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-12 3:53 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/12/2015 12:28 AM, Till Kamppeter wrote: > - There are three files which I have dropped as they do not get used (no > reference to them in the other files): drivers/generic/fr.po, > drivers/index/fr.po, and drivers/index/ubrlto4dot.c. For what are these > files used, especially what does drivers/index/ubrlto4dot.c do? > I have found out for what the fr.po files are good for: If I put them into /usr/share/cups/ppdc/ directory, the on-the-fly-generated PPD files get a French locale added. Only problem is that only one fr.po can be placed in /usr/share/cups/ppdc/, so I will look into renaming them and add the two renamed files to cups-filter. I assume I have to rename the references in the *.drv files appropriately then. Is this correct? So the only file staying unclear to me is drivers/index/ubrlto4dot.c. For what does this file serve? Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 2:28 ` Till Kamppeter 2015-12-12 3:53 ` Till Kamppeter @ 2015-12-12 8:36 ` Samuel Thibault 2015-12-12 9:50 ` Samuel Thibault ` (2 more replies) 1 sibling, 3 replies; 26+ messages in thread From: Samuel Thibault @ 2015-12-12 8:36 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture [-- Attachment #1: Type: text/plain, Size: 2747 bytes --] Till Kamppeter, on Sat 12 Dec 2015 00:28:34 -0200, wrote: > I have integrated your software in cups-filters now and committed it to the > BZR repository. Great! Thank you very much for the integration work! > Please download and try, and tell me whether everything is > working. I'll give it a try as soon as I get time. > - I have integrated your files into the build system of cups-filters > following all free software standards. Especially the configure script of > cups-filters checks the presence of liblouis and also takes an > "--enable-braille"/"--disable-braille" command line option pair. with > Braille support being enabled by default if liblouis is present. Good :) I was lazy to do it in my prototype cups-braille package :) > - PPD files are not pre-built by the Makefile. The *.drv and *.defs files > are put into the standard places in the CUPS directories, so that PPDs are > generated on-the-fly. Oh, I didn't know cups was able to do this. Even better then. > If I put them into /usr/share/cups/ppdc/ directory, the > on-the-fly-generated PPD files get a French locale added. Yes; that's very useful. > Only problem is that only one fr.po can be placed in > /usr/share/cups/ppdc/, so I will look into renaming them and add the two > renamed files to cups-filter. I assume I have to rename the references in > the *.drv files appropriately then. Yes, please do. Actually I was suprised that the documentation tells to use "fr.po" name, since as seen by this conflict they have to *not* have that name :) Actually they could even be merged, that'd be better since otherwise there would be a lot of duplication. I have attached the resulting merge. > and drivers/index/ubrlto4dot.c. For what are these > files used, especially what does drivers/index/ubrlto4dot.c do? This file is used to generate the translation table in drivers/index/imageubrltoindexv[34]. I felt it was good to integrate it as "source code" for them, even if actually running the generation in Makefile is more tedious than really useful. > - I have dropped the debian/ directory. Upstream packages should never ship > a debian/ directory, independent if it contains the files for generating > Debian packages or something else. Sure, no problem. > - The Generic embosser PPD file passes cupstestppd, the files for the Index > printers not. The error message is: > > **FAIL** Multiple occurrences of option IndexTable choice name 24. > > and indeed the option "IndexTable" has two choices with "24" as short name. Oops... I must admit I didn't test polish & dutch braille since I speak them and don't have an index4 device :) I have attached a patch. > Thanks again for your great contribution. Thanks for your reactivity! Samuel [-- Attachment #2: fr-braille.po --] [-- Type: text/plain, Size: 4368 bytes --] # # Copyright (c) 2015 Samuel Thibault <samuel.thibault@ens-lyon.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # msgid "Generic" msgstr "Generique" msgid "Braille embosser" msgstr "Embosseuse braille" msgid "A4 Tractor Feed" msgstr "A4 Traction papier" msgid "Yes" msgstr "Oui" msgid "No" msgstr "Non" msgid "Braille transcription" msgstr "Transcription Braille" msgid "None" msgstr "Aucune" msgid "Additional Braille transcription" msgstr "Transcription Braille additionnelle" msgid "Text dot distance" msgstr "Distance points texte" msgid "Text dots" msgstr "Points text" msgid "8 dots" msgstr "8 points" msgid "6 dots" msgstr "6 points" msgid "Graphic dot distance" msgstr "Distance points graphique" msgid "Line spacing" msgstr "Espacement de ligne" msgid "Image conversion" msgstr "Conversion d'image" msgid "Rotation" msgstr "Rotation" msgid "No rotation" msgstr "Pas de rotation" msgid "Rotate clockwise to portrait" msgstr "Rotation horaire vers portrait" msgid "Rotate clockwise to landscape" msgstr "Rotation horaire vers paysage" msgid "Rotate counter clockwise to portrait" msgstr "Rotation anti-horaire vers portrait" msgid "Rotate counter clockwise to landscape" msgstr "Rotation anti-horaire vers paysage" msgid "Clockwise" msgstr "Horaire" msgid "Counter clockwise" msgstr "Anti-horaire" msgid "Upside Down" msgstr "Retourner" msgid "Edge detection" msgstr "Détection de contour" msgid "Simple" msgstr "Simple" msgid "Canny" msgstr "Canny" msgid "Negate" msgstr "Inversion" msgid "EdgeFactor" msgstr "Facteur de contour" msgid "CannyRadius" msgstr "Radius Canny" msgid "CannySigma" msgstr "Sigma Canny" msgid "CannyLower" msgstr "Lower Canny" msgid "CannyUpper" msgstr "Upper Canny" msgid "Index support" msgstr "Support Index" msgid "Installed firmware version" msgstr "Version de firmware installée" msgid "10.20 or above" msgstr "10.20 ou supérieur" msgid "10.30 or above" msgstr "10.30 ou supérieur" msgid "11.02.1 or above" msgstr "11.02.1 ou supérieur" msgid "11.03.2 or above" msgstr "11.03.2 ou supérieur" msgid "12.01.3 or above" msgstr "12.01.3 ou supérieur" msgid "Page folding" msgstr "Recto-Verso" msgid "Single-sided" msgstr "Recto seul" msgid "Double-sided" msgstr "Recto-Verso" msgid "Single-sided z-folding" msgstr "Recto seul, pliage Z" msgid "Double-sided z-folding" msgstr "Recto-Verso, pliage Z" msgid "Single-sided sideways z-folding" msgstr "Recto seul paysage, pliage Z" msgid "Double-sided sideways z-folding" msgstr "Recto-Verso paysage, pliage Z" msgid "Double-sided saddle stitch 4 pages" msgstr "Recto-Verso cahier 4 pages" msgid "Single-sided saddle stitch 4 pages" msgstr "Recto cahier 4 pages" msgid "Firmware Braille Table" msgstr "Table Braille Firmware" msgid "6-dot MIT table" msgstr "Table MIT 6 points" msgid "User-defined Table 1" msgstr "Table 1 définie par l'utilisateur" msgid "User-defined Table 2" msgstr "Table 2 définie par l'utilisateur" msgid "User-defined Table 3" msgstr "Table 3 définie par l'utilisateur" msgid "User-defined Table 4" msgstr "Table 4 définie par l'utilisateur" msgid "Multiple impact" msgstr "Impact multiple" [-- Attachment #3: patch --] [-- Type: text/plain, Size: 447 bytes --] === modified file 'drv/indexv4.drv' --- drv/indexv4.drv 2015-12-12 02:11:10 +0000 +++ drv/indexv4.drv 2015-12-12 08:27:00 +0000 @@ -74,8 +74,8 @@ Group "Braille" Choice "22/Polish literal with capital" "" Choice "23/Polish own table 03" "" Choice "24/Polish own table 04" "" - Choice "24/Dutch computer 6 dots" "" - Choice "25/Dutch own table 02" "" + Choice "25/Dutch computer 6 dots" "" + Choice "26/Dutch own table 02" "" // ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 8:36 ` Samuel Thibault @ 2015-12-12 9:50 ` Samuel Thibault 2015-12-12 11:53 ` Till Kamppeter 2015-12-12 15:00 ` Till Kamppeter 2 siblings, 0 replies; 26+ messages in thread From: Samuel Thibault @ 2015-12-12 9:50 UTC (permalink / raw) To: Till Kamppeter, printing-architecture Samuel Thibault, on Sat 12 Dec 2015 09:36:05 +0100, wrote: > Till Kamppeter, on Sat 12 Dec 2015 00:28:34 -0200, wrote: > > Please download and try, and tell me whether everything is > > working. > > I'll give it a try as soon as I get time. A graphical test seems to be working, I'll do more thorough tests. Samuel ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 8:36 ` Samuel Thibault 2015-12-12 9:50 ` Samuel Thibault @ 2015-12-12 11:53 ` Till Kamppeter 2015-12-12 12:04 ` Till Kamppeter 2015-12-13 2:40 ` Samuel Thibault 2015-12-12 15:00 ` Till Kamppeter 2 siblings, 2 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-12 11:53 UTC (permalink / raw) To: Samuel Thibault, printing-architecture Thanks, the problems I mentioned are solved by the patches, but the new fr-braille.po file has some problems (output of cupstestppd): **FAIL** Bad UTF-8 "fr" translation string for option Edge. **FAIL** Bad UTF-8 "fr" translation string for option IndexFirmwareVersio n. **FAIL** Bad UTF-8 "fr" translation string for option IndexFirmwareVersio n, choice 102000. **FAIL** Bad UTF-8 "fr" translation string for option IndexFirmwareVersio n, choice 103000. **FAIL** Bad UTF-8 "fr" translation string for option IndexTable, choice 1. **FAIL** Bad UTF-8 "fr" translation string for option IndexTable, choice 2. **FAIL** Bad UTF-8 "fr" translation string for option IndexTable, choice 3. **FAIL** Bad UTF-8 "fr" translation string for option IndexTable, choice 4. Can you fix that? Till On 12/12/2015 06:36 AM, Samuel Thibault wrote: > Actually they could even be merged, that'd be better since otherwise > there would be a lot of duplication. I have attached the resulting > merge. > [...] >> - The Generic embosser PPD file passes cupstestppd, the files for the Index >> printers not. The error message is: >> >> **FAIL** Multiple occurrences of option IndexTable choice name 24. >> >> and indeed the option "IndexTable" has two choices with "24" as short name. > > Oops... I must admit I didn't test polish & dutch braille since I speak > them and don't have an index4 device :) I have attached a patch. > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 11:53 ` Till Kamppeter @ 2015-12-12 12:04 ` Till Kamppeter 2015-12-13 2:40 ` Samuel Thibault 1 sibling, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-12 12:04 UTC (permalink / raw) To: Samuel Thibault, printing-architecture I have committed your changes now, but pleas fix the translations. Thanks. Till On 12/12/2015 09:53 AM, Till Kamppeter wrote: > Thanks, the problems I mentioned are solved by the patches, but the new > fr-braille.po file has some problems (output of cupstestppd): > > **FAIL** Bad UTF-8 "fr" translation string for option Edge. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexFirmwareVersio > n. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexFirmwareVersio > n, choice 102000. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexFirmwareVersio > n, choice 103000. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexTable, choice > 1. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexTable, choice > 2. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexTable, choice > 3. > **FAIL** Bad UTF-8 "fr" translation string for option > IndexTable, choice 4. > > Can you fix that? > > Till > > > On 12/12/2015 06:36 AM, Samuel Thibault wrote: >> Actually they could even be merged, that'd be better since otherwise >> there would be a lot of duplication. I have attached the resulting >> merge. >> > > [...] > >>> - The Generic embosser PPD file passes cupstestppd, the files for the >>> Index >>> printers not. The error message is: >>> >>> **FAIL** Multiple occurrences of option IndexTable choice name 24. >>> >>> and indeed the option "IndexTable" has two choices with "24" as short >>> name. >> >> Oops... I must admit I didn't test polish & dutch braille since I speak >> them and don't have an index4 device :) I have attached a patch. >> > > ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 11:53 ` Till Kamppeter 2015-12-12 12:04 ` Till Kamppeter @ 2015-12-13 2:40 ` Samuel Thibault 2015-12-13 11:07 ` Till Kamppeter 2015-12-13 18:59 ` Samuel Thibault 1 sibling, 2 replies; 26+ messages in thread From: Samuel Thibault @ 2015-12-13 2:40 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture [-- Attachment #1: Type: text/plain, Size: 344 bytes --] Hello, Till Kamppeter, on Sat 12 Dec 2015 09:53:49 -0200, wrote: > Thanks, the problems I mentioned are solved by the patches, but the new > fr-braille.po file has some problems (output of cupstestppd): It seems my mailer simplified the encoding of the attachment, thus turning the file into latin1 instead of utf-8. Here is a patch. Samuel [-- Attachment #2: patch.gz --] [-- Type: application/x-gunzip, Size: 519 bytes --] ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-13 2:40 ` Samuel Thibault @ 2015-12-13 11:07 ` Till Kamppeter 2015-12-21 0:11 ` Samuel Thibault 2015-12-21 0:12 ` Samuel Thibault 2015-12-13 18:59 ` Samuel Thibault 1 sibling, 2 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-13 11:07 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/13/2015 12:40 AM, Samuel Thibault wrote: > Hello, > > Till Kamppeter, on Sat 12 Dec 2015 09:53:49 -0200, wrote: >> Thanks, the problems I mentioned are solved by the patches, but the new >> fr-braille.po file has some problems (output of cupstestppd): > > It seems my mailer simplified the encoding of the attachment, thus > turning the file into latin1 instead of utf-8. Here is a patch. > > Samuel > Thank you very much. The patch works and I have applied and committed it. Now please download the BZR of cups-filters and check whether everything is OK. Thanks. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-13 11:07 ` Till Kamppeter @ 2015-12-21 0:11 ` Samuel Thibault 2015-12-21 0:12 ` Samuel Thibault 1 sibling, 0 replies; 26+ messages in thread From: Samuel Thibault @ 2015-12-21 0:11 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture [-- Attachment #1: Type: text/plain, Size: 417 bytes --] Hello, Till Kamppeter, on Sun 13 Dec 2015 09:07:45 -0200, wrote: > Now please download the BZR of cups-filters and check whether everything is > OK. Thanks. It seems I didn't test enough the case where the user didn't select any braille translation to let the embosser do it. The attached patch fixes that case: since we just use fmt to render the text, we need to make converters emit pure text, not xml. Samuel [-- Attachment #2: patch --] [-- Type: text/plain, Size: 4506 bytes --] === modified file 'filter/braille/filters/cups-braille.sh.in' --- filter/braille/filters/cups-braille.sh.in 2015-12-12 02:11:10 +0000 +++ filter/braille/filters/cups-braille.sh.in 2015-12-21 00:03:08 +0000 @@ -224,7 +224,7 @@ echo "DEBUG: Table2 $LIBLOUIS2" >&2 echo "DEBUG: Table3 $LIBLOUIS3" >&2 echo "DEBUG: Table4 $LIBLOUIS4" >&2 -LIBLOUIS_TABLES="$LIBLOUIS1" -[ -n "$LIBLOUIS2" ] && LIBLOUIS_TABLES="${LIBLOUIS_TABLES:+$LIBLOUIS_TABLES,}$LIBLOUIS2" -[ -n "$LIBLOUIS3" ] && LIBLOUIS_TABLES="${LIBLOUIS_TABLES:+$LIBLOUIS_TABLES,}$LIBLOUIS3" -[ -n "$LIBLOUIS4" ] && LIBLOUIS_TABLES="${LIBLOUIS_TABLES:+$LIBLOUIS_TABLES,}$LIBLOUIS4" +[ "$LIBLOUIS1" != None ] && LIBLOUIS_TABLES="$LIBLOUIS1" +[ "$LIBLOUIS2" != None ] && LIBLOUIS_TABLES="${LIBLOUIS_TABLES:+$LIBLOUIS_TABLES,}$LIBLOUIS2" +[ "$LIBLOUIS3" != None ] && LIBLOUIS_TABLES="${LIBLOUIS_TABLES:+$LIBLOUIS_TABLES,}$LIBLOUIS3" +[ "$LIBLOUIS4" != None ] && LIBLOUIS_TABLES="${LIBLOUIS_TABLES:+$LIBLOUIS_TABLES,}$LIBLOUIS4" === modified file 'filter/braille/filters/texttobrf.in' --- filter/braille/filters/texttobrf.in 2015-12-12 02:11:10 +0000 +++ filter/braille/filters/texttobrf.in 2015-12-20 18:08:37 +0000 @@ -36,9 +36,6 @@ FILE=$6 . @CUPS_DATADIR@/braille/cups-braille.sh -# Default rendering without translation: just reformat paragraphs -RENDER_CALL="fmt -$TEXTWIDTH" - #################### # Liblouis options # #################### @@ -57,47 +54,77 @@ fi echo "DEBUG: Input content type: $CONTENT_TYPE" >&2 -# Tool to be used for the conversion -# FIXME CONTENT_TYPE contains original document, not document passed as parameter ?!! -case $CONTENT_TYPE in - text/plain) - LIBLOUIS_TOOL="file2brl" - CONVERT="" - ;; - text/html) - LIBLOUIS_TOOL="file2brl -t" - CONVERT="" - ;; - text/xml|application/xml|application/xhtml+xml) - LIBLOUIS_TOOL="file2brl" - CONVERT="" - ;; - application/msword) - LIBLOUIS_TOOL="file2brl" - CONVERT="antiword -x db /dev/stdin" - ;; - application/vnd.openxmlformats-officedocument.wordprocessingml.document) - LIBLOUIS_TOOL="file2brl" - CONVERT="docx2txt" - ;; - text/rtf|application/rtf) - LIBLOUIS_TOOL="file2brl" - CONVERT="rtf2xml /dev/stdin" - ;; - application/pdf) - LIBLOUIS_TOOL="file2brl -p" - CONVERT="pdftotext -raw /dev/stdin /dev/stdout" - ;; - *) - echo "ERROR: unsupported content type $CONTENT_TYPE" >&2 - exit 1 - ;; -esac - # Selected braille table if [ -n "$LIBLOUIS_TABLES" ] then + # Tool to be used for the conversion + # FIXME CONTENT_TYPE contains original document, not document passed as parameter ?!! + case $CONTENT_TYPE in + text/plain) + LIBLOUIS_TOOL="file2brl" + CONVERT="" + ;; + text/html) + LIBLOUIS_TOOL="file2brl -t" + CONVERT="" + ;; + text/xml|application/xml|application/xhtml+xml) + LIBLOUIS_TOOL="file2brl" + CONVERT="" + ;; + application/msword) + LIBLOUIS_TOOL="file2brl" + CONVERT="antiword -x db /dev/stdin" + ;; + application/vnd.openxmlformats-officedocument.wordprocessingml.document) + LIBLOUIS_TOOL="file2brl" + CONVERT="docx2txt" + ;; + text/rtf|application/rtf) + LIBLOUIS_TOOL="file2brl" + CONVERT="rtf2xml /dev/stdin" + ;; + application/pdf) + LIBLOUIS_TOOL="file2brl -p" + CONVERT="pdftotext -raw /dev/stdin /dev/stdout" + ;; + *) + echo "ERROR: unsupported content type $CONTENT_TYPE" >&2 + exit 1 + ;; + esac RENDER_CALL="$LIBLOUIS_TOOL -CliteraryTextTable=$LIBLOUIS_TABLES,braille-patterns.cti $LIBLOUIS_CONFIG" +else + # Default rendering without translation: just reformat paragraphs + RENDER_CALL="fmt -$TEXTWIDTH" + + # Tool to be used for the conversion + # FIXME CONTENT_TYPE contains original document, not document passed as parameter ?!! + case $CONTENT_TYPE in + text/plain) + CONVERT="" + ;; + text/html) + CONVERT="" + RENDER_CALL="lynx -width=$TEXTWIDTH -dump -stdin" + ;; + application/msword) + CONVERT="antiword /dev/stdin" + ;; + application/vnd.openxmlformats-officedocument.wordprocessingml.document) + CONVERT="docx2txt" + ;; + text/rtf|application/rtf) + CONVERT="rtf2txt /dev/stdin" + ;; + application/pdf) + CONVERT="pdftotext -raw /dev/stdin /dev/stdout" + ;; + *) + echo "ERROR: unsupported content type $CONTENT_TYPE" >&2 + exit 1 + ;; + esac fi # Now proceeed ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-13 11:07 ` Till Kamppeter 2015-12-21 0:11 ` Samuel Thibault @ 2015-12-21 0:12 ` Samuel Thibault 2015-12-21 13:56 ` Till Kamppeter 1 sibling, 1 reply; 26+ messages in thread From: Samuel Thibault @ 2015-12-21 0:12 UTC (permalink / raw) To: Till Kamppeter; +Cc: printing-architecture [-- Attachment #1: Type: text/plain, Size: 443 bytes --] Till Kamppeter, on Sun 13 Dec 2015 09:07:45 -0200, wrote: > Now please download the BZR of cups-filters and check whether everything is > OK. Thanks. A second change which will be useful is as attached: for now imagemagick introduces some header in the produced braille-formatted images. We will however probably want to remove it in the future. The attached patch makes cups-filters cope with both the header being present or not. Samuel [-- Attachment #2: patch2 --] [-- Type: text/plain, Size: 550 bytes --] --- filter/braille/filters/imagetobrf.in 2015-12-12 02:11:10 +0000 +++ filter/braille/filters/imagetobrf.in 2015-12-20 12:45:08 +0000 @@ -86,9 +86,9 @@ echo "INFO: Converting image" 1>&2 if [ -z "$FILE" ] then printf "DEBUG: Calling $RENDER_CALL from stdin\n" 1>&2 - $RENDER_CALL | tail -n +4 + $RENDER_CALL | sed -e '/^Width: [0-9]*$/,/^$/d' else printf "DEBUG: Calling $RENDER_CALL on '%s'\n" "$FILE" 1>&2 - $RENDER_CALL < "$FILE" | tail -n +4 + $RENDER_CALL < "$FILE" | sed -e '/^Width: [0-9]*$/,/^$/d' fi echo "INFO: Ready" >&2 ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-21 0:12 ` Samuel Thibault @ 2015-12-21 13:56 ` Till Kamppeter 0 siblings, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-21 13:56 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/20/2015 10:12 PM, Samuel Thibault wrote: > Till Kamppeter, on Sun 13 Dec 2015 09:07:45 -0200, wrote: >> Now please download the BZR of cups-filters and check whether everything is >> OK. Thanks. > > A second change which will be useful is as attached: for now imagemagick > introduces some header in the produced braille-formatted images. We > will however probably want to remove it in the future. The attached > patch makes cups-filters cope with both the header being present or not. > > Samuel > Thank you very much for the two patches I have applied them to the cups-filters BZR repository now. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-13 2:40 ` Samuel Thibault 2015-12-13 11:07 ` Till Kamppeter @ 2015-12-13 18:59 ` Samuel Thibault 2015-12-13 19:42 ` Till Kamppeter 1 sibling, 1 reply; 26+ messages in thread From: Samuel Thibault @ 2015-12-13 18:59 UTC (permalink / raw) To: Till Kamppeter, printing-architecture [-- Attachment #1: Type: text/plain, Size: 104 bytes --] Hello, One thing I forgot to document about Index embossers firmware version, here is a patch. Samuel [-- Attachment #2: patch --] [-- Type: text/plain, Size: 585 bytes --] === modified file 'README' --- README 2015-12-12 14:57:57 +0000 +++ README 2015-12-13 18:58:29 +0000 @@ -1628,6 +1628,11 @@ lp -o "GraphicDotDistance=160" file.png to select 1.6mm dots spacing +Troubleshooting: if your embosser starts every document with spurious +"TM0,BM0,IM0,OM0" or "TM0,BI0", your embosser is most probably still using an +old 10.20 firmware. Please either reflash the embosser with a firmware version +10.30 or above, or select the 10.20 firmware version in the "index" panel of the +cups printer options. ---------------------- Braille output options ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-13 18:59 ` Samuel Thibault @ 2015-12-13 19:42 ` Till Kamppeter 0 siblings, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-13 19:42 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/13/2015 04:59 PM, Samuel Thibault wrote: > Hello, > > One thing I forgot to document about Index embossers firmware version, > here is a patch. > > Samuel > Committed. Thank you very much. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-12 8:36 ` Samuel Thibault 2015-12-12 9:50 ` Samuel Thibault 2015-12-12 11:53 ` Till Kamppeter @ 2015-12-12 15:00 ` Till Kamppeter 2 siblings, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2015-12-12 15:00 UTC (permalink / raw) To: Samuel Thibault, printing-architecture On 12/12/2015 06:36 AM, Samuel Thibault wrote: >> >and drivers/index/ubrlto4dot.c. For what are these >> >files used, especially what does drivers/index/ubrlto4dot.c do? > This file is used to generate the translation table in > drivers/index/imageubrltoindexv[34]. I felt it was good to integrate it > as "source code" for them, even if actually running the generation in > Makefile is more tedious than really useful. > Added the drivers/index/ubrlto4dot.c to cups-filters now and documented the fact in README. Till ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2015-12-09 10:27 [Printing-architecture] Contributing braille embosser support Samuel Thibault 2015-12-09 16:04 ` Michael Sweet 2015-12-10 20:29 ` Till Kamppeter @ 2016-11-27 18:54 ` Samuel Thibault 2016-11-27 19:22 ` Till Kamppeter 2016-11-29 19:30 ` Samuel Thibault 2 siblings, 2 replies; 26+ messages in thread From: Samuel Thibault @ 2016-11-27 18:54 UTC (permalink / raw) To: printing-architecture [-- Attachment #1: Type: text/plain, Size: 284 bytes --] Hello, I haven't had time to work on braille embossing support in the past months, I thought I should just write down my remaining TODO ideas, so they don't get lost :) Could the attached file be put in the following directory? cups-filters/filter/braille/filters/ Thanks, Samuel [-- Attachment #2: TODO.txt --] [-- Type: text/plain, Size: 102 bytes --] Add title option for pictures In addition to drawing contour, use textures to render colors of areas ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2016-11-27 18:54 ` Samuel Thibault @ 2016-11-27 19:22 ` Till Kamppeter 2016-11-29 19:30 ` Samuel Thibault 1 sibling, 0 replies; 26+ messages in thread From: Till Kamppeter @ 2016-11-27 19:22 UTC (permalink / raw) To: Samuel Thibault, printing-architecture Done. Till On 11/27/2016 04:54 PM, Samuel Thibault wrote: > Hello, > > I haven't had time to work on braille embossing support in the past > months, I thought I should just write down my remaining TODO ideas, so > they don't get lost :) > > Could the attached file be put in the following directory? > > cups-filters/filter/braille/filters/ > > Thanks, > Samuel ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [Printing-architecture] Contributing braille embosser support 2016-11-27 18:54 ` Samuel Thibault 2016-11-27 19:22 ` Till Kamppeter @ 2016-11-29 19:30 ` Samuel Thibault 1 sibling, 0 replies; 26+ messages in thread From: Samuel Thibault @ 2016-11-29 19:30 UTC (permalink / raw) To: printing-architecture [-- Attachment #1: Type: text/plain, Size: 97 bytes --] Hello, This is an update for the Index braille driver, to add support for text margins. Samuel [-- Attachment #2: patch --] [-- Type: text/plain, Size: 7787 bytes --] === modified file 'filter/braille/drivers/index/index.defs' --- filter/braille/drivers/index/index.defs 2015-12-12 02:11:10 +0000 +++ filter/braille/drivers/index/index.defs 2016-11-27 20:30:23 +0000 @@ -1,5 +1,5 @@ // -// Copyright (c) 2015 Samuel Thibault <samuel.thibault@ens-lyon.org> +// Copyright (c) 2015-2016 Samuel Thibault <samuel.thibault@ens-lyon.org> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -56,3 +56,70 @@ Group "Braille" Choice "3/User-defined Table 3" "" Choice "4/User-defined Table 4" "" +Option "TopMargin/Top margin" PickOne AnySetup 10 + Choice "0" "" + Choice "1" "" + *Choice "2" "" + Choice "3" "" + Choice "4" "" + Choice "5" "" + Choice "6" "" + Choice "7" "" + Choice "8" "" + Choice "9" "" + Choice "10" "" + +Option "BottomMargin/Bottom margin" PickOne AnySetup 10 + Choice "0" "" + Choice "1" "" + *Choice "2" "" + Choice "3" "" + Choice "4" "" + Choice "5" "" + Choice "6" "" + Choice "7" "" + Choice "8" "" + Choice "9" "" + Choice "10" "" + +Option "InnerMargin/Inner margin" PickOne AnySetup 10 + Choice "0" "" + Choice "1" "" + *Choice "2" "" + Choice "3" "" + Choice "4" "" + Choice "5" "" + Choice "6" "" + Choice "7" "" + Choice "8" "" + Choice "9" "" + Choice "10" "" + +Option "OuterMargin/Outer margin" PickOne AnySetup 10 + Choice "0" "" + Choice "1" "" + *Choice "2" "" + Choice "3" "" + Choice "4" "" + Choice "5" "" + Choice "6" "" + Choice "7" "" + Choice "8" "" + Choice "9" "" + Choice "10" "" + +Option "PageNumber/Page Number" PickOne AnySetup 10 + Choice "None/None" "" + Choice "Top/Top-middle" "" + Choice "TopLeft/Top-left" "" + Choice "TopRight/Top-right" "" + Choice "Bottom/Bottom-middle" "" + Choice "BottomLeft/Bottom-left" "" + Choice "BottomRight/Bottom-right" "" + +UIConstraints "*TopMargin 0 *PageNumber Top" +UIConstraints "*TopMargin 0 *PageNumber TopLeft" +UIConstraints "*TopMargin 0 *PageNumber TopRight" +UIConstraints "*BottomMargin 0 *PageNumber Bottom" +UIConstraints "*BottomMargin 0 *PageNumber BottomLeft" +UIConstraints "*BottomMargin 0 *PageNumber BottomRight" === modified file 'filter/braille/drivers/index/index.sh.in' --- filter/braille/drivers/index/index.sh.in 2015-12-12 02:11:10 +0000 +++ filter/braille/drivers/index/index.sh.in 2016-11-27 20:47:11 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015 Samuel Thibault <samuel.thibault@ens-lyon.org> +# Copyright (c) 2015-2016 Samuel Thibault <samuel.thibault@ens-lyon.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -28,6 +28,7 @@ FIRMWARE=$(getOptionNumber IndexFirmware FOLDING=$(getOption IndexFolding) TABLE=$(getOptionNumber IndexTable) MULTIPLEIMPACT=$(getOptionNumber IndexMultipleImpact) +PAGENUMBER=$(getOption PageNumber) # Convert from 100th of mm to Inch fraction mmToIndexIn () { @@ -71,7 +72,7 @@ mmToIndexIn () { commonOptions() { INIT= # Disable options we don't want: first line offset and page numbering - INIT+=,FO0,PN0 + INIT+=,FO0 # Support hardware-assisted multiple copies if [ $NB != 1 ] @@ -82,7 +83,7 @@ commonOptions() { INIT+=,MI$MULTIPLEIMPACT # Support page folding - case $FOLDING in + case "$FOLDING" in Single) INIT+=,DP1 ;; Double) INIT+=,DP2 ;; SingleZ) INIT+=,DP5 ;; @@ -101,11 +102,22 @@ commonOptions() { 320) INIT+=,TD2 ;; *) printf "ERROR: unsupported '%s' text dot distance\n" "$TEXTDOTDISTANCE" >&2 ; exit 1 ;; esac - case $GRAPHICDOTDISTANCE in + case "$GRAPHICDOTDISTANCE" in 160) INIT+=,GD2 ;; 200) INIT+=,GD0 ;; 250) INIT+=,GD1 ;; - *) printf "ERROR: unsupported '%s'graphic dot distance\n" "$GRAPHICDOTDISTANCE" >&2 ; exit 1 ;; + *) printf "ERROR: unsupported '%s' graphic dot distance\n" "$GRAPHICDOTDISTANCE" >&2 ; exit 1 ;; + esac + + case "$PAGENUMBER" in + None) INIT+=,PN0 ;; + Top) INIT+=,PN1 ;; + TopLeft) INIT+=,PN2 ;; + TopRight) INIT+=,PN3 ;; + Bottom) INIT+=,PN4 ;; + BottomLeft) INIT+=,PN5 ;; + BottomRight) INIT+=,PN6 ;; + *) echo "ERROR: unsupported $PAGENUMBER page number" >&2 ; exit 1 ;; esac echo "$INIT" === modified file 'filter/braille/drivers/index/indexv3.sh.in' --- filter/braille/drivers/index/indexv3.sh.in 2015-12-12 02:11:10 +0000 +++ filter/braille/drivers/index/indexv3.sh.in 2016-11-29 19:29:11 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015 Samuel Thibault <samuel.thibault@ens-lyon.org> +# Copyright (c) 2015-2016 Samuel Thibault <samuel.thibault@ens-lyon.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -33,7 +33,7 @@ then INIT=$'\033'D # Disable margins - INIT+=TM0,BM0,IM0,OM0 + INIT+=TM$TOPMARGIN,BM$BOTTOMMARGIN,IM$INNERMARGIN,OM$OUTERMARGIN # Trying to disable banner page seems to pose problems #INIT+=,BP === modified file 'filter/braille/drivers/index/indexv4.sh.in' --- filter/braille/drivers/index/indexv4.sh.in 2015-12-12 02:11:10 +0000 +++ filter/braille/drivers/index/indexv4.sh.in 2016-11-29 19:29:12 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015 Samuel Thibault <samuel.thibault@ens-lyon.org> +# Copyright (c) 2015-2016 Samuel Thibault <samuel.thibault@ens-lyon.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -30,7 +30,7 @@ then INIT=$'\033'D # Disable margins - INIT+=TM0,BI0 + INIT+=TM$TOPMARGIN,BI$INNERMARGIN # Common options INIT+="$(setCommonOptions)" === modified file 'filter/braille/filters/cups-braille.sh.in' --- filter/braille/filters/cups-braille.sh.in 2016-04-10 17:20:32 +0000 +++ filter/braille/filters/cups-braille.sh.in 2016-11-27 20:35:31 +0000 @@ -144,7 +144,7 @@ case "$PAGESIZE" in ;; esac -# TODO: hardcoded margin +# TODO: hardcoded embosser margin PRINTABLEWIDTH=$((PAGEWIDTH - 1000)) PRINTABLEHEIGHT=$((PAGEHEIGHT - 1000)) @@ -167,9 +167,30 @@ esac TEXTDOTS=$(getOptionNumber TextDots) LINESPACING=$(getOptionNumber LineSpacing) +# Cell dimension, including spacing +TEXTCELLWIDTH=$(( $TEXTDOTDISTANCE + $TEXTCELLDISTANCE )) +TEXTCELLHEIGHT=$(( $TEXTDOTDISTANCE * ($TEXTDOTS / 2 - 1) + $LINESPACING )) + +if [ "$(getOption TopMargin)" = "" ] +then + # No margin + TEXTAREAWIDTH=$PRINTABLEWIDTH + TEXTAREAHEIGHT=$PRINTABLEHEIGHT +else + # Margins in cells + TOPMARGIN=$(getOptionNumber TopMargin) + BOTTOMMARGIN=$(getOptionNumber BottomMargin) + INNERMARGIN=$(getOptionNumber InnerMargin) + OUTERMARGIN=$(getOptionNumber OuterMargin) + + # Subtract margins from printable area + TEXTAREAWIDTH=$(( $PRINTABLEWIDTH - ($INNERMARGIN + $OUTERMARGIN) * $TEXTCELLWIDTH )) + TEXTAREAHEIGHT=$(( $PRINTABLEHEIGHT - ($TOPMARGIN + $BOTTOMMARGIN) * $TEXTCELLHEIGHT )) +fi + # Compute number of printable cells according to page width and height -TEXTWIDTH=$(( ($PRINTABLEWIDTH + $TEXTCELLDISTANCE) / ($TEXTDOTDISTANCE + $TEXTCELLDISTANCE) )) -TEXTHEIGHT=$(( ($PRINTABLEHEIGHT + $LINESPACING) / ($TEXTDOTDISTANCE * ($TEXTDOTS / 2 - 1) + $LINESPACING) )) +TEXTWIDTH=$(( ($TEXTAREAWIDTH + $TEXTCELLDISTANCE) / $TEXTCELLWIDTH )) +TEXTHEIGHT=$(( ($TEXTAREAHEIGHT + $LINESPACING) / $TEXTCELLHEIGHT )) # # Graphic spacing ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2016-11-29 19:30 UTC | newest] Thread overview: 26+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-09 10:27 [Printing-architecture] Contributing braille embosser support Samuel Thibault 2015-12-09 16:04 ` Michael Sweet 2015-12-10 20:29 ` Till Kamppeter 2015-12-10 20:45 ` Samuel Thibault 2015-12-10 21:02 ` Till Kamppeter 2015-12-10 21:31 ` Samuel Thibault 2015-12-11 0:19 ` Till Kamppeter 2015-12-11 0:31 ` Samuel Thibault 2015-12-11 1:17 ` Till Kamppeter 2015-12-12 2:28 ` Till Kamppeter 2015-12-12 3:53 ` Till Kamppeter 2015-12-12 8:36 ` Samuel Thibault 2015-12-12 9:50 ` Samuel Thibault 2015-12-12 11:53 ` Till Kamppeter 2015-12-12 12:04 ` Till Kamppeter 2015-12-13 2:40 ` Samuel Thibault 2015-12-13 11:07 ` Till Kamppeter 2015-12-21 0:11 ` Samuel Thibault 2015-12-21 0:12 ` Samuel Thibault 2015-12-21 13:56 ` Till Kamppeter 2015-12-13 18:59 ` Samuel Thibault 2015-12-13 19:42 ` Till Kamppeter 2015-12-12 15:00 ` Till Kamppeter 2016-11-27 18:54 ` Samuel Thibault 2016-11-27 19:22 ` Till Kamppeter 2016-11-29 19:30 ` Samuel Thibault
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.