pt1230 icon indicating copy to clipboard operation
pt1230 copied to clipboard

Fonts are not showing up on textlabel output

Open theniwo opened this issue 1 year ago • 0 comments

I get the folling warning when compiling

CC=/usr/bin/cc make
/usr/bin/cc -Wall -g    pt1230.c   -o pt1230
/usr/bin/cc -Wall -g -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread     textlabel.c  -lfreetype  -lfontconfig -o textlabel
textlabel.c: In function 'line_store':
textlabel.c:52:12: warning: the comparison will always evaluate as 'true' for the pointer operand in '*lines + (sizetype)(size * 8)' must not be NULL [-Waddress]
   52 |         if(!((*lines) + size)){
      |            ^

The Output only shows a square. However some characters like >,",! get rendered

./textlabel --font "Arial" -- "T"
0000000000000011111111111111111111111111111111111111111110000000
0000000000000011111111111111111111111111111111111111111110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011000000000000000000000000000000000000000110000000
0000000000000011111111111111111111111111111111111111111110000000
0000000000000011111111111111111111111111111111111111111110000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000

Fedora 37

rpm -qa | grep -e freetype -e fontconfig -e pkgconf
pkgconf-m4-1.8.0-3.fc37.noarch
libpkgconf-1.8.0-3.fc37.x86_64
pkgconf-1.8.0-3.fc37.x86_64
pkgconf-pkg-config-1.8.0-3.fc37.x86_64
freetype-2.12.1-3.fc37.x86_64
fontconfig-2.14.1-2.fc37.x86_64
freetype-2.12.1-3.fc37.i686
fontconfig-2.14.1-2.fc37.i686
freetype-devel-2.12.1-3.fc37.x86_64
fontconfig-devel-2.14.1-2.fc37.x86_64

theniwo avatar Sep 13 '23 13:09 theniwo