Hi Samuel,

This tool seems to be working fine. However for one of my use cases I was
trying to include Devanagari and English Unicode together in one psf file,
so I modified the gen-psf-block.c (patch is attached), however this doesn't
seem to be working. Could you please verify that changes are correct.

I have also attached the modified gen-psf-block.c



Thanks,

*Vikash Kesarwani*
*Lead Engineer - Software*
*Kritikal Solutions*
p: +91 120 4048633  m: +91-8130526968
e: [email protected]
w: www.kritikalsolutions.com

[image: https://www.linkedin.com/company/kritikal-solutions]
<https://www.linkedin.com/company/kritikal-solutions>
<https://www.facebook.com/KritiKalSolutionsPvtLtd>
<https://twitter.com/KritikalTalk>
<https://plus.google.com/u/0/115610456438545045882>



On Sun, Feb 18, 2018 at 3:39 PM, Vikash Kesarwani <
[email protected]> wrote:

> Thanks a lot!
>
> On Feb 18, 2018 15:37, "Samuel Thibault" <[email protected]>
> wrote:
>
>> Vikash Kesarwani, on dim. 18 févr. 2018 09:02:25 +0530, wrote:
>> > It would be great if you can give some reference to how can I generate
>> these
>> > fonts.
>>
>> I have just uploaded the tool on
>>
>> http://http.debian.net/debian/pool/main/c/console-braille/co
>> nsole-braille_1.7.tar.gz
>>
>> Samuel
>>
>
52c52
<   header(width, height, 256, 1);
---
>   header(width, height, 512, 1);
55c55
<   for (i=0;i<256;i++) {
---
>   for (i=0;i<512;i++) {
69a70,71
>   for (i=0;i<256;i++)
>     sfm(i);
/*
 *  Copyright (C) Samuel Thibault <[email protected]>
 *
 * This program is free software ; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation ; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY ; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the program ; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <stdio.h>
#include <stdlib.h>
#include "psf.h"
int main(int argc, char *argv[]) {
  unsigned base;
  unsigned width, height, mask;
  char *end;

  if (argc != 4) {
    printf("Usage: %s [height] [width] xyz00\n", argv[0]);
    printf("where xyz00 is the hex value for the desired unicode block\n");
    exit(EXIT_FAILURE);
  }

  height = strtol(argv[1], &end, 10);
  if (end == argv[1] || *end != '\0') {
    fprintf(stderr,"Invalid height '%s'\n", argv[1]);
    exit(EXIT_FAILURE);
  }

  width = strtol(argv[2], &end, 10);
  if (end == argv[2] || *end != '\0') {
    fprintf(stderr,"Invalid width '%s'\n", argv[2]);
    exit(EXIT_FAILURE);
  }

  base = strtol(argv[3], &end, 16);
  if (end == argv[3] || *end != '\0') {
    fprintf(stderr,"Invalid block value '%s'\n", argv[3]);
    exit(EXIT_FAILURE);
  }

  int i, j;
  header(width, height, 512, 1);
  mask = ((1U << (width/2)) - 1) << (width/4);

  for (i=0;i<512;i++) {
    for (j=0;j<height;j++) {
      if (j >= height/4 && j < 3*height/4)
	if (width <= 8)
	  printf("%c", mask);
	else
	  printf("%c%c", mask >> 8, mask & 0xff);
      else
	if (width <= 8)
	  printf("%c", 0);
	else
	  printf("%c%c", 0, 0);
    }
  }

  for (i=0;i<256;i++)
    sfm(i);
  for (i=0;i<256;i++)
    sfm(base+i);
  return 0;
}
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to