Open Kanahiro opened 11 months ago
No difference when convert point to point in P_districts
Point to point conversion looks not have problem
mm to pt has small gap To be: 2mm = 5.699 pt
Looks to come directly from "extract label" processing tool. Size in point for 4mm should be 11.338582677 pt.
I am suspecting something wrong to extract label algorithm based on dpi, crs and scale...
Dpi looks to vary depending on dpi
here implemented iface.mapCanvas().mapSettings().outputDpi()
is 144
Default dpi is set as 96
Label is set as 4mm which is truely 11.338582677 pt
size may be calculated as below
const double fontSize = static_cast<double>( font.pixelSize() ) * 72 / context.painter()->device()->logicalDpiX();
https://github.com/qgis/QGIS/blob/3a4a9f08bdc7630120ab7a0f55d5f8e68371c50b/src/analysis/processing/qgsalgorithmextractlabels.cpp#L246
We guess why this occurs:
int
. this is discrete
value despite fontsize is countinuous value.IMO, this is QGIS natural behaivior and not bug. Labels rendered in canvas may be sized in pixel. Then there is no problem inside QGIS.
<ラベルのポイント数について> v0.0.9プラグインでエクスポートした際、JSONに書き出されるラベルのサイズが設定値と若干変わってしまうようです。 (例) QGIS設定値 ⇒ JSONの値 7.0pt ⇒ 6.75pt 8.0pt ⇒ 8.25pt 10.0pt ⇒ 9.75pt 2.0mm ⇒ 6.0pt (実際は2mmは約5.7pt) 添付画像は、P_districtsレイヤのラベルが7ptに設定されているところ、JSONでは6.75ptになってしまっているところです。 恐れ入りますが、ご確認をいただけますと幸いです。