freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][master] [ftgrid] Make `-f ... -e ...` wor


From: Werner Lemberg
Subject: [Git][freetype/freetype-demos][master] [ftgrid] Make `-f ... -e ...` work.
Date: Wed, 03 Feb 2021 07:58:48 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType Demo Programs

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-02-03  Werner Lemberg  <wl@gnu.org>
    
    2
    +
    
    3
    +	[ftgrid] Make `-f ... -e ...` work.
    
    4
    +
    
    5
    +	* src/ftgrid.c (parse_cmdline): Use flags to set a default character
    
    6
    +	index after option loop.
    
    7
    +
    
    1 8
     2021-01-26  Alexei Podtelezhnikov  <apodtele@gmail.com>
    
    2 9
     
    
    3 10
     	* graph/grblit.c (blit_mono_to_*): Slightly faster variants.
    

  • src/ftgrid.c
    ... ... @@ -97,7 +97,7 @@
    97 97
     
    
    98 98
         int          ptsize;
    
    99 99
         int          res;
    
    100
    -    int          Num;  /* glyph index */
    
    100
    +    int          Num;  /* glyph index or character code */
    
    101 101
         int          font_index;
    
    102 102
     
    
    103 103
         float        scale;
    
    ... ... @@ -1662,6 +1662,8 @@
    1662 1662
       {
    
    1663 1663
         char*  execname;
    
    1664 1664
         int    option;
    
    1665
    +    int    have_encoding = 0;
    
    1666
    +    int    have_index    = 0;
    
    1665 1667
     
    
    1666 1668
     
    
    1667 1669
         execname = ft_basename( (*argv)[0] );
    
    ... ... @@ -1701,11 +1703,12 @@
    1701 1703
     
    
    1702 1704
           case 'e':
    
    1703 1705
             handle->encoding = FTDemo_Make_Encoding_Tag( optarg );
    
    1704
    -        status.Num       = 0x20;
    
    1706
    +        have_encoding    = 1;
    
    1705 1707
             break;
    
    1706 1708
     
    
    1707 1709
           case 'f':
    
    1708 1710
             status.Num = atoi( optarg );
    
    1711
    +        have_index = 1;
    
    1709 1712
             break;
    
    1710 1713
     
    
    1711 1714
           case 'k':
    
    ... ... @@ -1749,6 +1752,9 @@
    1749 1752
         if ( *argc <= 1 )
    
    1750 1753
           usage( execname );
    
    1751 1754
     
    
    1755
    +    if ( have_encoding && !have_index )
    
    1756
    +      status.Num = 0x20;
    
    1757
    +
    
    1752 1758
         status.ptsize = (int)( atof( *argv[0] ) * 64.0 );
    
    1753 1759
         if ( status.ptsize == 0 )
    
    1754 1760
           status.ptsize = 64 * 10;
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]