Changeset fc1268d


Ignore:
Timestamp:
Feb 21, 2016 10:11:48 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7d35a4e
Parents:
abb5233
Message:

Graphs: Increase font size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryRenderer.java

    rabb5233 rfc1268d  
    22
    33import java.awt.Color;
     4import java.awt.Font;
    45import java.awt.Graphics;
    56import java.awt.image.BufferedImage;
     
    123124        try {
    124125            RrdGraphDef def = new RrdGraphDef();
     126            // improve text legibility
     127            String lang = Messages.getLanguage(_context);
     128            Font small = def.getSmallFont();
     129            Font large = def.getLargeFont();
     130            if ("ar".equals(lang) || "jp".equals(lang) || ("zh".equals(lang) && !IS_WIN)) {
     131                small = small.deriveFont(small.getSize2D() + 2.0f);
     132                large = large.deriveFont(Font.PLAIN, large.getSize2D() + 3.0f);
     133            } else {
     134                small = small.deriveFont(small.getSize2D() + 1.0f);
     135                large = large.deriveFont(large.getSize2D() + 1.0f);
     136            }
     137            def.setSmallFont(small);
     138            def.setLargeFont(large);
     139
    125140            def.setTimeSpan(start/1000, end/1000);
    126141            def.setMinValue(0d);
Note: See TracChangeset for help on using the changeset viewer.