mirror of
https://github.com/labwc/labwc.git
synced 2025-11-06 13:29:58 -05:00
Base rc.title_height on font vertical extents
This commit is contained in:
parent
4d1363dcae
commit
2297e43cc0
11 changed files with 123 additions and 26 deletions
2
tools/pango/.gitignore
vendored
Normal file
2
tools/pango/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.o
|
||||
font-height
|
||||
15
tools/pango/Makefile
Normal file
15
tools/pango/Makefile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
CFLAGS += -g -Wall -O0 -std=c11
|
||||
CFLAGS += `pkg-config cairo pango pangocairo --cflags`
|
||||
CFLAGS += -I../../include
|
||||
LIBS += `pkg-config cairo pango pangocairo --libs`
|
||||
LDFLAGS += $(LIBS)
|
||||
|
||||
PROGS = font-height
|
||||
|
||||
all: $(PROGS)
|
||||
|
||||
font-height: font-height.c ../../src/common/font.c
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS) *.o
|
||||
13
tools/pango/font-height.c
Normal file
13
tools/pango/font-height.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "common/font.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc < 2) {
|
||||
printf("Usage: %s <font-description> (e.g. 'sans 10')\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
printf("height=%d\n", font_height(argv[1]));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue