feat(font): add logger to UnicodeBlockWrapper
package nullengine.client.rendering.gl.font;
import com.google.common.collect.Range;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map;
public class UnicodeBlockWrapper {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(UnicodeBlockWrapper.class);
+
private static final Map<Character.UnicodeBlock, Range<Integer>> map = new HashMap<>();
public static Range<Integer> getRange(Character.UnicodeBlock block) {
@@ -32,15 +37,14 @@ public class UnicodeBlockWrapper {
int rangeEnd;
if (i == blocks.length - 1) { //last block recorded
rangeEnd = 0x10FFFF;
- }
- else{
+ } else {
rangeEnd = blockStarts[i + 1] - 1;
}
var range = Range.closed(rangeStart, rangeEnd);
map.put(blocks[i], range);
}
} catch (NoSuchFieldException | IllegalAccessException e) {
- e.printStackTrace();
+ LOGGER.error("Cannot initialize unicode block.", e);
}
}
}
