freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype-demos][ftinspect-uiresize] 3 commits: * vms_make


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][ftinspect-uiresize] 3 commits: * vms_make.com: Synchronize with similar changes in the FreeType library.
Date: Wed, 26 Jul 2023 12:29:11 +0000

Charlie Jiang pushed to branch ftinspect-uiresize at FreeType / FreeType Demo Programs

Commits:

  • f290eb04
    by Jouk Jansen at 2023-07-21T21:44:03+02:00
    * vms_make.com: Synchronize with similar changes in the FreeType library.
    
  • 751b0c3d
    by Alexei Podtelezhnikov at 2023-07-25T23:45:07-04:00
    * src/ftdump.c (Print_MM_Info): Fix signedness mismatch.
    
  • 2186a044
    by Charlie Jiang at 2023-07-26T12:29:07+00:00
    [ftinspect] Fix the glyph index selector layout when the window resizes.
    
    Fixes #26. When the window resizes, the invisible tabs don't get notified.
    Therefore, when the active tab changes, we need to trigger a manual
    relayouting of invisible tabs.
    
    * src/ftinspect/widgets/glyphindexselector.hpp,
      src/ftinspect/widgets/glyphindexselector.cpp:
      Extract public method `relayoutNavigation` from `resizeEvent`.
    
    * src/ftinspect/panels/abstracttab.hpp: Add `relayout` virtual method.
    
    * src/ftinspect/maingui.cpp: Call `AbstractTab::relayout` on the new tab
      when the active tab changes.
    
    * src/ftinspect/panels/singular.cpp, src/ftinspect/panels/singular.hpp,
      src/ftinspect/panels/continuous.cpp, src/ftinspect/panels/continuous.hpp:
      Implement `relayout` method and call `relayoutNavigation` of the glyph
      index selector in `relayout`.
    

10 changed files:

Changes:

  • src/ftdump.c
    ... ... @@ -925,7 +925,7 @@
    925 925
           FT_Fixed*    coords;
    
    926 926
           const char*  ps_name;
    
    927 927
     
    
    928
    -      FT_Long              instance_count;
    
    928
    +      FT_UInt              instance_count;
    
    929 929
           FT_UInt              default_named_instance;
    
    930 930
           FT_Var_Named_Style*  named_styles;
    
    931 931
     
    
    ... ... @@ -957,14 +957,14 @@
    957 957
     
    
    958 958
           /* Show named instances. */
    
    959 959
     
    
    960
    -      instance_count = face->style_flags >> 16;
    
    960
    +      instance_count = (FT_UInt)face->style_flags >> 16;
    
    961 961
           named_styles   = mm->namedstyle;
    
    962 962
     
    
    963 963
           FT_Get_Default_Named_Instance( face, &default_named_instance );
    
    964 964
           default_named_instance--;   /* `named_styles` is a zero-based array */
    
    965 965
     
    
    966 966
           printf( "\n" );
    
    967
    -      printf( "  named instances (%lu)\n", instance_count );
    
    967
    +      printf( "  named instances (%u)\n", instance_count );
    
    968 968
     
    
    969 969
           for ( i = 0; i < instance_count; i++ )
    
    970 970
           {
    

  • src/ftinspect/maingui.cpp
    ... ... @@ -198,6 +198,8 @@ MainGUI::switchTab()
    198 198
       else
    
    199 199
         leftWidget_->setVisible(!isComparator);
    
    200 200
     
    
    201
    +  tabs_[tabWidget_->currentIndex()]->relayout();
    
    202
    +
    
    201 203
       reloadCurrentTabFont();
    
    202 204
     
    
    203 205
       if (current == continuousTab_
    

  • src/ftinspect/panels/abstracttab.hpp
    ... ... @@ -16,6 +16,7 @@ public:
    16 16
     
    
    17 17
       virtual void repaintGlyph() = 0;
    
    18 18
       virtual void reloadFont() = 0;
    
    19
    +  virtual void relayout() {}
    
    19 20
     };
    
    20 21
     
    
    21 22
     
    

  • src/ftinspect/panels/continuous.cpp
    ... ... @@ -65,6 +65,13 @@ ContinuousTab::reloadFont()
    65 65
     }
    
    66 66
     
    
    67 67
     
    
    68
    +void
    
    69
    +ContinuousTab::relayout()
    
    70
    +{
    
    71
    +  indexSelector_->relayoutNavigation();
    
    72
    +}
    
    73
    +
    
    74
    +
    
    68 75
     void
    
    69 76
     ContinuousTab::applySettings()
    
    70 77
     {
    

  • src/ftinspect/panels/continuous.hpp
    ... ... @@ -46,6 +46,7 @@ public:
    46 46
     
    
    47 47
       void repaintGlyph() override;
    
    48 48
       void reloadFont() override;
    
    49
    +  void relayout() override;
    
    49 50
       void highlightGlyph(int index);
    
    50 51
       void applySettings();
    
    51 52
     
    

  • src/ftinspect/panels/singular.cpp
    ... ... @@ -459,6 +459,13 @@ SingularTab::reloadFont()
    459 459
     }
    
    460 460
     
    
    461 461
     
    
    462
    +void
    
    463
    +SingularTab::relayout()
    
    464
    +{
    
    465
    +  indexSelector_->relayoutNavigation();
    
    466
    +}
    
    467
    +
    
    468
    +
    
    462 469
     void
    
    463 470
     SingularTab::setCurrentGlyphAndSize(int glyphIndex,
    
    464 471
                                         double sizePoint)
    

  • src/ftinspect/panels/singular.hpp
    ... ... @@ -46,6 +46,7 @@ public:
    46 46
     
    
    47 47
       void repaintGlyph() override;
    
    48 48
       void reloadFont() override;
    
    49
    +  void relayout() override;
    
    49 50
       // The size remains unchanged if `sizePoint` <= 0.
    
    50 51
       void setCurrentGlyphAndSize(int glyphIndex,
    
    51 52
                                   double sizePoint);
    

  • src/ftinspect/widgets/glyphindexselector.cpp
    ... ... @@ -20,6 +20,20 @@ GlyphIndexSelector::GlyphIndexSelector(QWidget* parent)
    20 20
     }
    
    21 21
     
    
    22 22
     
    
    23
    +void
    
    24
    +GlyphIndexSelector::relayoutNavigation()
    
    25
    +{
    
    26
    +  auto minimumWidth = minimumSizeHint().width();
    
    27
    +  if (toEndButton_->isVisible())
    
    28
    +  {
    
    29
    +    if (width() < minimumWidth)
    
    30
    +      navigationWidget_->setVisible(false);
    
    31
    +  }
    
    32
    +  else if (navigationWidget_->minimumSizeHint().width() + minimumWidth <= width())
    
    33
    +    navigationWidget_->setVisible(true);
    
    34
    +}
    
    35
    +
    
    36
    +
    
    23 37
     void
    
    24 38
     GlyphIndexSelector::setMinMax(int min,
    
    25 39
                                   int max)
    
    ... ... @@ -87,15 +101,7 @@ void
    87 101
     GlyphIndexSelector::resizeEvent(QResizeEvent* event)
    
    88 102
     {
    
    89 103
       QWidget::resizeEvent(event);
    
    90
    -  auto minimumWidth = minimumSizeHint().width();
    
    91
    -  if (toEndButton_->isVisible())
    
    92
    -  {
    
    93
    -    if (width() < minimumWidth)
    
    94
    -      navigationWidget_->setVisible(false);
    
    95
    -  }
    
    96
    -  else if (navigationWidget_->minimumSizeHint().width() + minimumWidth
    
    97
    -           <= width())
    
    98
    -    navigationWidget_->setVisible(true);
    
    104
    +  relayoutNavigation();
    
    99 105
     }
    
    100 106
     
    
    101 107
     
    

  • src/ftinspect/widgets/glyphindexselector.hpp
    ... ... @@ -24,6 +24,8 @@ public:
    24 24
       GlyphIndexSelector(QWidget* parent);
    
    25 25
       ~GlyphIndexSelector() override = default;
    
    26 26
     
    
    27
    +  void relayoutNavigation();
    
    28
    +
    
    27 29
       // Never triggers repaint!
    
    28 30
       void setMinMax(int min,
    
    29 31
                      int max);
    

  • vms_make.com
    ... ... @@ -9,6 +9,12 @@ $!------------------------------------------------------------------------------
    9 9
     $!
    
    10 10
     $ on error then goto err_exit
    
    11 11
     $!
    
    12
    +$! Get platform
    
    13
    +$ vax      = f$getsyi("ARCH_NAME").eqs. "VAX"
    
    14
    +$ axp      = f$getsyi("ARCH_NAME").eqs. "Alpha"
    
    15
    +$ ia64     = f$getsyi("ARCH_NAME").eqs. "IA64"
    
    16
    +$ x86_64   = f$getsyi("ARCH_NAME").eqs. "x86_64"
    
    17
    +$!
    
    12 18
     $! Just some general constants
    
    13 19
     $!
    
    14 20
     $ Make   = ""
    
    ... ... @@ -34,16 +40,25 @@ $!
    34 40
     $! Create option file
    
    35 41
     $!
    
    36 42
     $ open/write optf 'optfile'
    
    37
    -$ If f$getsyi("HW_MODEL") .gt. 1024
    
    43
    +$ If .not. vax
    
    38 44
     $ Then
    
    39 45
     $  write optf "[-.freetype2.lib]freetype2shr.exe/share"
    
    40 46
     $ else
    
    41 47
     $   write optf "[-.freetype2.lib]freetype.olb/lib"
    
    42 48
     $ endif
    
    43 49
     $ gosub check_create_vmslib
    
    44
    -$ write optf "sys$library:libbz2.olb/lib"
    
    45
    -$ write optf "sys$library:libpng.olb/lib"
    
    46
    -$ write optf "sys$library:libz.olb/lib"
    
    50
    +$!
    
    51
    +$!
    
    52
    +$! Check external libraries
    
    53
    +$!
    
    54
    +$ have_png = f$search("sys$library:libpng.olb") .nes. ""
    
    55
    +$ have_bz2 = f$search("sys$library:libbz2.olb") .nes. ""
    
    56
    +$ have_z = f$search("sys$library:libz.olb") .nes. ""
    
    57
    +$ have_harfbuzz = f$search("sys$library:libharfbuzz.olb") .nes. ""
    
    58
    +$ if ( have_harfbuzz ) then write optf "sys$library:libharfbuzz.olb/lib"
    
    59
    +$ if ( have_bz2 ) then write optf "sys$library:libbz2.olb/lib"
    
    60
    +$ if ( have_png ) then write optf "sys$library:libpng.olb/lib"
    
    61
    +$ if ( have_z ) then write optf "sys$library:libz.olb/lib"
    
    47 62
     $ write optf "sys$share:decw$xlibshr.exe/share"
    
    48 63
     $ close optf
    
    49 64
     $!
    
    ... ... @@ -122,7 +137,7 @@ GRAPHOBJ64 = $(OBJDIR)grobjs_64.obj, \
    122 137
     
    
    123 138
     # C flags
    
    124 139
     CFLAGS = $(CCOPT)$(INCLUDES)/obj=$(OBJDIR)/define=("FT2_BUILD_LIBRARY=1")\
    
    125
    -	/warn=disable=("MACROREDEF","MAYLOSEDATA3")
    
    140
    +	/warn=(noinfo,disable=("MACROREDEF","MAYLOSEDATA3"))
    
    126 141
     
    
    127 142
     .c.obj :
    
    128 143
     	cc$(CFLAGS)/point=32/list=$(MMS$TARGET_NAME).lis/show=all $(MMS$SOURCE)
    
    ... ... @@ -286,20 +301,20 @@ $(OBJDIR)gblender.obj : $(GRAPHSRC)gblender.c
    286 301
     $(OBJDIR)gblblit.obj   : $(GRAPHSRC)gblblit.c
    
    287 302
     $(OBJDIR)grinit.obj    : $(GRAPHSRC)grinit.c
    
    288 303
             set def $(GRAPHSRC)
    
    289
    -        $(CC)$(CCOPT)/include=([.x11],[])/point=32/list/show=all\
    
    304
    +        $(CC)$(CCOPT)/warn=noinfo/include=([.x11],[])/point=32/list/show=all\
    
    290 305
     	/define=(DEVICE_X11,"FT2_BUILD_LIBRARY=1")/obj=[-.objs] grinit.c
    
    291 306
     	pipe link/map/full/exec=nl: [-.objs]grinit.obj | copy sys$input nl:
    
    292 307
     	mc sys$library:vms_auto64 grinit.map grinit.lis
    
    293
    -	$(CC)$(CCOPT)/include=([.x11],[])/point=64/obj=[-.objs] grinit_64.c
    
    308
    +	$(CC)$(CCOPT)/warn=noinfo/include=([.x11],[])/point=64/obj=[-.objs] grinit_64.c
    
    294 309
     	delete grinit_64.c;*
    
    295 310
             set def [-]
    
    296 311
     $(OBJDIR)grx11.obj     : $(GRX11SRC)grx11.c
    
    297 312
             set def $(GRX11SRC)
    
    298
    -        $(CC)$(CCOPT)/include=([-])/point=32/list/show=all\
    
    313
    +        $(CC)$(CCOPT)/warn=noinfo/include=([-])/point=32/list/show=all\
    
    299 314
     	/define=(DEVICE_X11,"FT2_BUILD_LIBRARY=1")/obj=[--.objs] grx11.c
    
    300 315
     	pipe link/map/full/exec=nl: [--.objs]grx11.obj | copy sys$input nl:
    
    301 316
     	mc sys$library:vms_auto64 grx11.map grx11.lis
    
    302
    -	$(CC)$(CCOPT)/include=([-])/point=64/obj=[--.objs] grx11_64.c
    
    317
    +	$(CC)$(CCOPT)/warn=noinfo/include=([-])/point=64/obj=[--.objs] grx11_64.c
    
    303 318
     	delete grx11_64.c;*
    
    304 319
             set def [--]
    
    305 320
     $(OBJDIR)grdevice.obj  : $(GRAPHSRC)grdevice.c
    


  • reply via email to

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