-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect label vertical alignment for certain font sizes #2854
Comments
I have tried to reproduce this with no success. Lines up nicely with various sizes, font types... |
This is what I've been using (and variants of it): #!/bin/sh
echo "1|629880|222510|a
2|629882|222510|b
3|629884|222510|c
4|629886|222510|d
5|629888|222510|e
6|629890|222510|f
7|629892|222510|g
8|629894|222510|h
9|629896|222510|i
10|629898|222510|1
11|629900|222510|2
12|629902|222510|3
13|629904|222510|4
14|629906|222510|5
15|629908|222510|6
16|629910|222510|7
17|629912|222510|8
18|629914|222510|9" | v.in.ascii input=- output=labelmap cat=1 x=2 y=3 --overwrite
g.region e=629916 w=629879 s=222508 n=222512 res=1
d.mon start=wx0
d.vect map=labelmap color=0:29:57:255 width=1 \
attribute_column=str_1 label_bcolor=13:0:200:255 \
label_size=21 \
yref=center xref=left I now realise the |
Not to forget which side you woke up on that particular morning :-) I've been testing in nc_spm_full_v2alpha2, this is what it looks like for me: |
Interestingly, there was a ticket related to my particular issue 11 years ago: https://trac.osgeo.org/grass/ticket/1667 |
The logic of alignment in d.vect is totally bogus. If I disable Yoffset, the issue is gone Line 172 in 50815f9
|
I get something similar in Fedora 36. No effect of |
I have now corrected v.in.ascii and g.region in above example script, and now alignment seems to work. |
I referred to the testing script above (#2854 (comment)). Now I have hopefully corrected/updated it in-place. (Initially made some last minute correction without testing when I posted it). Did some further testing, sometimes it works, sometimes not. I even hade the jumpy result as @marisn . But I haven't been able to see some pattern. |
A row of vector points has labels shown next to them. Depending on the font size, some labels will be vertically shifted or all labels will be on the same line (as expected).
See screenshot with only one difference – for one row font size is set to 21px and for other – 22px. Vertical alignment should be identical for all letters but is different for the 21px case.
The text was updated successfully, but these errors were encountered: