Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
0.2.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
noties committed Apr 30, 2020
1 parent 97f69d9 commit cc2a83d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
org.gradle.configureondemand=true

VERSION_NAME=0.2.0-SNAPSHOT
VERSION_NAME=0.2.0

GROUP=ru.noties
POM_DESCRIPTION=JLatexMath-Android
Expand Down
7 changes: 0 additions & 7 deletions jlatexmath/src/main/java/ru/noties/jlatexmath/awt/Font.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public class Font {

public static final int ITALIC = 2;

public static final int TRUETYPE_FONT = 0;

@Deprecated
public static Font createFont(int truetypeFont, InputStream fontIn) {
return null;
Expand All @@ -28,13 +26,11 @@ public static Font createFont(@NonNull Typeface typeface, float size) {
return new Font(typeface, 0, size);
}

// private final String name;
private final Typeface typeface;
private int style;
private float size;

public Font(String name, int style, int size) {
// throw new RuntimeException(String.format("name: %s, style: %d, size: %d", name, style, size));
this(createTypeface(name, style), style, size);
}

Expand All @@ -46,9 +42,6 @@ private Font(@NonNull Typeface typeface, int style, float size) {

@NonNull
private static Typeface applyStyle(@NonNull Typeface typeface, int style) {

// todo: I have a feeling that BOLD_ITALIC flag might be needed here to be used

final int current = (typeface.isBold() ? BOLD : 0) | (typeface.isItalic() ? ITALIC : 0);
if (current != style) {
// both will be 3 (BOLD_ITALIC)
Expand Down

0 comments on commit cc2a83d

Please sign in to comment.