Changeset 662


Ignore:
Timestamp:
01/07/14 16:59:55 (10 years ago)
Author:
ngw8
Message:

Made webparser line height/spacing work far better, with no magic number needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/io/WebParser.java

    r659 r662  
    371371                                                                               
    372372                                                                                try {
    373                                                                                         lineSpacingInt = ((Float.parseFloat(lineHeight.substring(0, lineHeight.length() - 2)) - (fontSizeFloat * 1.22f)));
     373                                                                                        lineSpacingInt = (Float.parseFloat(lineHeight.substring(0, lineHeight.length() - 2)));
    374374                                                                                } catch (NumberFormatException nfe) {
    375375                                                                                        // Use default value as set above
     
    394394                                                                                t.setLetterSpacing(letterSpacingFloat);
    395395
    396                                                                                 t.setSpacing(lineSpacingInt);
     396                                                                                t.setSpacing(0);
     397                                                                                t.setSpacing(lineSpacingInt - t.getLineHeight());
    397398
    398399                                                                                if (align.equals("left")) {
Note: See TracChangeset for help on using the changeset viewer.