Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ public static float pixelToPoint(float size, int zoom) {
return (size / scaleFactor);
}

public static double pixelToPoint(double size, int zoom) {
if (zoom == 100 || size == SWT.DEFAULT) return size;
double scaleFactor = getScalingFactor (zoom, 100);
return size / scaleFactor;
}


/**
* Auto-scale image with ImageData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public int getAscent() {
* @since 3.107
*/
public double getAverageCharacterWidth() {
return getAverageCharWidth();
return DPIUtil.pixelToPoint((double) handle.tmAveCharWidth, getZoom());
}

/**
Expand Down
Loading