Skip to content
Commits on Source (3)
......@@ -925,7 +925,7 @@
FT_Fixed* coords;
const char* ps_name;
FT_Long instance_count;
FT_UInt instance_count;
FT_UInt default_named_instance;
FT_Var_Named_Style* named_styles;
......@@ -957,14 +957,14 @@
/* Show named instances. */
instance_count = face->style_flags >> 16;
instance_count = (FT_UInt)face->style_flags >> 16;
named_styles = mm->namedstyle;
FT_Get_Default_Named_Instance( face, &default_named_instance );
default_named_instance--; /* `named_styles` is a zero-based array */
printf( "\n" );
printf( " named instances (%lu)\n", instance_count );
printf( " named instances (%u)\n", instance_count );
for ( i = 0; i < instance_count; i++ )
{
......
......@@ -198,6 +198,8 @@ MainGUI::switchTab()
else
leftWidget_->setVisible(!isComparator);
tabs_[tabWidget_->currentIndex()]->relayout();
reloadCurrentTabFont();
if (current == continuousTab_
......
......@@ -16,6 +16,7 @@ public:
virtual void repaintGlyph() = 0;
virtual void reloadFont() = 0;
virtual void relayout() {}
};
......
......@@ -65,6 +65,13 @@ ContinuousTab::reloadFont()
}
void
ContinuousTab::relayout()
{
indexSelector_->relayoutNavigation();
}
void
ContinuousTab::applySettings()
{
......
......@@ -46,6 +46,7 @@ public:
void repaintGlyph() override;
void reloadFont() override;
void relayout() override;
void highlightGlyph(int index);
void applySettings();
......
......@@ -459,6 +459,13 @@ SingularTab::reloadFont()
}
void
SingularTab::relayout()
{
indexSelector_->relayoutNavigation();
}
void
SingularTab::setCurrentGlyphAndSize(int glyphIndex,
double sizePoint)
......
......@@ -46,6 +46,7 @@ public:
void repaintGlyph() override;
void reloadFont() override;
void relayout() override;
// The size remains unchanged if `sizePoint` <= 0.
void setCurrentGlyphAndSize(int glyphIndex,
double sizePoint);
......
......@@ -20,6 +20,20 @@ GlyphIndexSelector::GlyphIndexSelector(QWidget* parent)
}
void
GlyphIndexSelector::relayoutNavigation()
{
auto minimumWidth = minimumSizeHint().width();
if (toEndButton_->isVisible())
{
if (width() < minimumWidth)
navigationWidget_->setVisible(false);
}
else if (navigationWidget_->minimumSizeHint().width() + minimumWidth <= width())
navigationWidget_->setVisible(true);
}
void
GlyphIndexSelector::setMinMax(int min,
int max)
......@@ -87,15 +101,7 @@ void
GlyphIndexSelector::resizeEvent(QResizeEvent* event)
{
QWidget::resizeEvent(event);
auto minimumWidth = minimumSizeHint().width();
if (toEndButton_->isVisible())
{
if (width() < minimumWidth)
navigationWidget_->setVisible(false);
}
else if (navigationWidget_->minimumSizeHint().width() + minimumWidth
<= width())
navigationWidget_->setVisible(true);
relayoutNavigation();
}
......
......@@ -24,6 +24,8 @@ public:
GlyphIndexSelector(QWidget* parent);
~GlyphIndexSelector() override = default;
void relayoutNavigation();
// Never triggers repaint!
void setMinMax(int min,
int max);
......
......@@ -9,6 +9,12 @@ $!------------------------------------------------------------------------------
$!
$ on error then goto err_exit
$!
$! Get platform
$ vax = f$getsyi("ARCH_NAME").eqs. "VAX"
$ axp = f$getsyi("ARCH_NAME").eqs. "Alpha"
$ ia64 = f$getsyi("ARCH_NAME").eqs. "IA64"
$ x86_64 = f$getsyi("ARCH_NAME").eqs. "x86_64"
$!
$! Just some general constants
$!
$ Make = ""
......@@ -34,16 +40,25 @@ $!
$! Create option file
$!
$ open/write optf 'optfile'
$ If f$getsyi("HW_MODEL") .gt. 1024
$ If .not. vax
$ Then
$ write optf "[-.freetype2.lib]freetype2shr.exe/share"
$ else
$ write optf "[-.freetype2.lib]freetype.olb/lib"
$ endif
$ gosub check_create_vmslib
$ write optf "sys$library:libbz2.olb/lib"
$ write optf "sys$library:libpng.olb/lib"
$ write optf "sys$library:libz.olb/lib"
$!
$!
$! Check external libraries
$!
$ have_png = f$search("sys$library:libpng.olb") .nes. ""
$ have_bz2 = f$search("sys$library:libbz2.olb") .nes. ""
$ have_z = f$search("sys$library:libz.olb") .nes. ""
$ have_harfbuzz = f$search("sys$library:libharfbuzz.olb") .nes. ""
$ if ( have_harfbuzz ) then write optf "sys$library:libharfbuzz.olb/lib"
$ if ( have_bz2 ) then write optf "sys$library:libbz2.olb/lib"
$ if ( have_png ) then write optf "sys$library:libpng.olb/lib"
$ if ( have_z ) then write optf "sys$library:libz.olb/lib"
$ write optf "sys$share:decw$xlibshr.exe/share"
$ close optf
$!
......@@ -122,7 +137,7 @@ GRAPHOBJ64 = $(OBJDIR)grobjs_64.obj, \
# C flags
CFLAGS = $(CCOPT)$(INCLUDES)/obj=$(OBJDIR)/define=("FT2_BUILD_LIBRARY=1")\
/warn=disable=("MACROREDEF","MAYLOSEDATA3")
/warn=(noinfo,disable=("MACROREDEF","MAYLOSEDATA3"))
.c.obj :
cc$(CFLAGS)/point=32/list=$(MMS$TARGET_NAME).lis/show=all $(MMS$SOURCE)
......@@ -286,20 +301,20 @@ $(OBJDIR)gblender.obj : $(GRAPHSRC)gblender.c
$(OBJDIR)gblblit.obj : $(GRAPHSRC)gblblit.c
$(OBJDIR)grinit.obj : $(GRAPHSRC)grinit.c
set def $(GRAPHSRC)
$(CC)$(CCOPT)/include=([.x11],[])/point=32/list/show=all\
$(CC)$(CCOPT)/warn=noinfo/include=([.x11],[])/point=32/list/show=all\
/define=(DEVICE_X11,"FT2_BUILD_LIBRARY=1")/obj=[-.objs] grinit.c
pipe link/map/full/exec=nl: [-.objs]grinit.obj | copy sys$input nl:
mc sys$library:vms_auto64 grinit.map grinit.lis
$(CC)$(CCOPT)/include=([.x11],[])/point=64/obj=[-.objs] grinit_64.c
$(CC)$(CCOPT)/warn=noinfo/include=([.x11],[])/point=64/obj=[-.objs] grinit_64.c
delete grinit_64.c;*
set def [-]
$(OBJDIR)grx11.obj : $(GRX11SRC)grx11.c
set def $(GRX11SRC)
$(CC)$(CCOPT)/include=([-])/point=32/list/show=all\
$(CC)$(CCOPT)/warn=noinfo/include=([-])/point=32/list/show=all\
/define=(DEVICE_X11,"FT2_BUILD_LIBRARY=1")/obj=[--.objs] grx11.c
pipe link/map/full/exec=nl: [--.objs]grx11.obj | copy sys$input nl:
mc sys$library:vms_auto64 grx11.map grx11.lis
$(CC)$(CCOPT)/include=([-])/point=64/obj=[--.objs] grx11_64.c
$(CC)$(CCOPT)/warn=noinfo/include=([-])/point=64/obj=[--.objs] grx11_64.c
delete grx11_64.c;*
set def [--]
$(OBJDIR)grdevice.obj : $(GRAPHSRC)grdevice.c
......