Page 1 of 1
display of fonts used in browses
Posted: Fri Oct 16, 2020 2:04 pm
by plantenkennis
Hello Antonio,
The last day I got some complaints about the sharpness of the fonts used in browses and on buttons. If you look carefully to the sharpness of the font in a browse it is not so sharp as the font in the menu or the statusbar. Is there anything I could do about this.
I have changed the image to show the problem. On the right there is a text editor I use, on the left the program. After reading a lot on the Apple developer site I saw that my program (and all programs made with FiveMac) are not made for the Retina screen. If you rightclick on an app and click on 'show info' you see that the app is forsed to use low resolution.
Re: display of fonts used in browses
Posted: Sat Oct 17, 2020 8:26 am
by Antonio Linares
Dear René,
We are checking it
Re: display of fonts used in browses
Posted: Mon Oct 19, 2020 10:31 am
by Antonio Linares
René,
It seems as it is a Mojave issue:
https://eshop.macsales.com/blog/46527-i ... to-fix-it/
The solution would be to use a font that is standard to Mojave using method SetFont()
Re: display of fonts used in browses
Posted: Wed Oct 21, 2020 6:08 am
by plantenkennis
Hello Antonio,
I don't think that the SetFont is the solution. I have tried several fonts in my browse, but it makes no difference. I als played with the smoothing option as mentioned on you link, but that also makes no difference. Check the images:
No smoothing:
With smoothing:
I still think there should be an option to compile on high resolution because all apps made with FiveMac are standard in Low resolution and you can't change the checkbox.
Re: display of fonts used in browses
Posted: Sun Nov 01, 2020 9:15 pm
by plantenkennis
Thanks to the work of Manuel we have the solution for the blurry fonts.
In the app-folder there should be a file named Info.plist. When building an app with the build.sh command this file is added automatically. But this file needs the next lines:
Code: Select all
echo ' <key>NSHighResolutionCapable</key>' >> $1.app/Contents/Info.plist
echo '<true/>' >> $1.app/Contents/Info.plist
echo ' <key>NSPrincipalClass</key>' >> $1.app/Contents/Info.plist
echo ' <string>NSApplication</string>' >> $1.app/Contents/Info.plist
When these lines are in the Info.plist file the user can (un)check if the program needs to be in lower resolution, needed for non-retina screens.
However, if you build the app with a makefile, so when you have more than one .prg, the Info.plist file is not created. One can copy this file from another app and place it in the app-folder [appfolder/Contents]. After placing this file you need to rebuild your app (just throw away the .o files) and the program runs on Retina-screens with much smoother fonts.
Re: display of fonts used in browses
Posted: Sun Nov 01, 2020 9:25 pm
by Antonio Linares
great work!
many thanks to both of you
Re: display of fonts used in browses
Posted: Fri Nov 06, 2020 2:52 pm
by plantenkennis
Hello group,
Thanks to a lot of great work from Manuel we now can also create the Info.plist with a makefile. And it looks that there are much more options that we can set in the Info.plist. Here is a copy of my makefile that is made by Manuel:
Code: Select all
# makefile for Plantenkennis, sample (c) FiveTech Software 2007-2010
# Use TABs instead of spaces
# just type make to build it
HRBLIBS= -lhbdebug -lhbvm -lhbrtl -lhblang -lhbrdd -lhbrtl -lgtstd -lgttrm -lhbvm -lhbmacro -lhbpp -lrddntx -lrddcdx -lrddfpt -lhbsix -lhbcommon -lhbcplr -lhbcpage -lhbhsx -lrddnsx
FRAMEWORKS= -framework Cocoa -framework WebKit -framework QTkit -framework Quartz -framework ScriptingBridge -framework iokit
HARBOUR_PATH= ./../../harbour
HARBOUR= $(HARBOUR_PATH)/bin/harbour
HARBOUR_INCLUDE= $(HARBOUR_PATH)/include
#FIVEMAC_PATH= ./../../fivemac/
FIVEMAC_PATH= ./../
CONT_PATH= ./Plantenkennis.app/Contents
all : $(CONT_PATH)/MacOS/Plantenkennis
$(CONT_PATH)/MacOS/Plantenkennis
reset
PRG_OBJS = ./Plantenkennis.o \
./Functies.o \
./GetFuncties.o \
./CollectFuncties.o \
./Change.o \
./Selectie.o \
./Print.o \
./ProFuncties.o \
./UpdateProgram.o \
./wildsearch.o \
./TemplateDesign.o \
./Geslacht.o \
$(CONT_PATH)/MacOS/Plantenkennis : $(PRG_OBJS)
$(call create_dirs)
$(call write_plist)
gcc $(PRG_OBJS) -o $(CONT_PATH)/MacOS/Plantenkennis -L$(FIVEMAC_PATH)/lib -lfive -lfivec -L$(HARBOUR_PATH)/lib $(HRBLIBS) $(FRAMEWORKS)
./%.c : ./%.prg
$(HARBOUR) $< -o./$@ -n -I$(HARBOUR_PATH)/include -I$(FIVEMAC_PATH)/include
./%.o : ./%.c
gcc -c -o $@ -I$(HARBOUR_PATH)/include $<
define write_plist
if [ ! -d Plantenkennis.app/Contents/Info.plist ]; then \
echo '<?xml version="1.0" encoding="UTF-8"?>' > Plantenkennis.app/Contents/Info.plist; \
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >> Plantenkennis.app/Contents/Info.plist; \
echo '<plist version="1.0">' >> Plantenkennis.app/Contents/Info.plist; \
echo '<dict>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleExecutable</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>Plantenkennis</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleName</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>Plantenkennis</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleIdentifier</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>com.KSD.Plantenkennis</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundlePackageType</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>APPL</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleInfoDictionaryVersion</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>6.0</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleIconFile</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>plantenkennis.icns</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>NSPrincipalClass</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>NSApplication</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>NSHighResolutionCapable</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <true/>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>NSHumanReadableCopyright</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>Copyright © 2020 Koot Software Design. All rights reserved.</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleShortVersionString</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>3.71</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleSupportedPlatforms</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <array>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>MacOSX</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' </array>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <key>CFBundleVersion</key>' >> Plantenkennis.app/Contents/Info.plist; \
echo ' <string>1</string>' >> Plantenkennis.app/Contents/Info.plist; \
echo '</dict>' >> Plantenkennis.app/Contents/Info.plist; \
echo '</plist>' >> Plantenkennis.app/Contents/Info.plist;\
fi
endef
define create_dirs
if [ ! -d Plantenkennis.app ]; then mkdir Plantenkennis.app; fi
if [ ! -d Plantenkennis.app/Contents ]; then mkdir Plantenkennis.app/Contents; fi
if [ ! -d Plantenkennis.app/Contents/MacOS ]; then mkdir Plantenkennis.app/Contents/MacOS; fi
if [ -d Plantenkennis.app/Contents/Info.plist ]; then rm Plantenkennis.app/Contents/Info.plist; fi
if [ ! -d Plantenkennis.app/Contents/MacOS ]; then mkdir Plantenkennis.app/Contents/MacOS; fi
if [ ! -d Plantenkennis.app/Contents/Resources ]; then mkdir Plantenkennis.app/Contents/Resources; \
cp Plantenkennis.icns Plantenkennis.app/Contents/Resources/ ;\
fi
endef