Skip to content

Commit

Permalink
Fixes #270 - right to left list items
Browse files Browse the repository at this point in the history
* probably should move text to the left a bit !??!
  • Loading branch information
Ioan Eugen Stan committed Aug 24, 2018
1 parent 0bfc402 commit 724ecbe
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ private static void drawGlyph(RenderingContext c, BlockBox box,
StrutMetrics strutMetrics = box.getMarkerData().getStructMetrics();
MarkerData.GlyphMarker marker = box.getMarkerData().getGlyphMarker();
int x = getReferenceX(c, box);
x += -marker.getLayoutWidth();
int y = getReferenceBaseline(c, box)
if (style.getDirection() == IdentValue.LTR) {
x += -marker.getLayoutWidth();
}
if (style.getDirection() == IdentValue.RTL){
x += box.getMarkerData().getReferenceLine().getWidth() + marker.getLayoutWidth();
}
int y = getReferenceBaseline(c, box)
- (int)strutMetrics.getAscent() / 2 - marker.getDiameter() / 2;
if (listStyle == IdentValue.DISC) {
c.getOutputDevice().fillOval(x, y, marker.getDiameter(), marker.getDiameter());
Expand Down

0 comments on commit 724ecbe

Please sign in to comment.