Skip to content

Commit d7a47e6

Browse files
committed
Don't apply layer scalefactor to legend text (#5268)
1 parent e6c480e commit d7a47e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

maplegend.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ int msLegendCalcSize(mapObj *map, int scale_independent, int *size_x, int *size_
523523

524524
if(*text) {
525525
initTextSymbol(&ts);
526-
msPopulateTextSymbolForLabelAndString(&ts,&map->legend.label,msStrdup(text),lp->scalefactor*resolutionfactor,resolutionfactor, 0);
526+
msPopulateTextSymbolForLabelAndString(&ts,&map->legend.label,msStrdup(text),resolutionfactor,resolutionfactor, 0);
527527
if(UNLIKELY(MS_FAILURE == msGetTextSymbolSize(map,&ts,&rect))) {
528528
freeTextSymbol(&ts);
529529
return MS_FAILURE;
@@ -638,7 +638,7 @@ imageObj *msDrawLegend(mapObj *map, int scale_independent, map_hittest *hittest)
638638
cur = (legendlabel*) msSmallMalloc(sizeof(legendlabel));
639639
initTextSymbol(&cur->ts);
640640
if(*text) {
641-
msPopulateTextSymbolForLabelAndString(&cur->ts,&map->legend.label,msStrdup(text),lp->scalefactor*map->resolution/map->defresolution,map->resolution/map->defresolution, 0);
641+
msPopulateTextSymbolForLabelAndString(&cur->ts,&map->legend.label,msStrdup(text),map->resolution/map->defresolution,map->resolution/map->defresolution, 0);
642642
if(UNLIKELY(MS_FAILURE == msComputeTextPath(map,&cur->ts))) {
643643
ret = MS_FAILURE;
644644
goto cleanup;

0 commit comments

Comments
 (0)