Sha256: 16faa9c7398170ddbe64b14d92278d6bfbd519afc46bd1dc76c2a25c694d5c2c

Contents?: true

Size: 372 Bytes

Versions: 9

Compression:

Stored size: 372 Bytes

Contents

package wordcram;

import java.util.Random;

import processing.core.PFont;

public class Fonters {

    public static WordFonter alwaysUse(final PFont pfont) {
        return (Word word) -> pfont;
    }

    public static WordFonter pickFrom(final PFont... fonts) {
        final Random r = new Random();
        return (Word w) -> fonts[r.nextInt(fonts.length)];
    }
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby_wordcram-2.1.1 src/wordcram/Fonters.java
ruby_wordcram-2.1.0 src/wordcram/Fonters.java
ruby_wordcram-2.0.6 src/wordcram/Fonters.java
ruby_wordcram-2.0.5 src/wordcram/Fonters.java
ruby_wordcram-2.0.4 src/wordcram/Fonters.java
ruby_wordcram-2.0.3 src/wordcram/Fonters.java
ruby_wordcram-2.0.2 src/wordcram/Fonters.java
ruby_wordcram-2.0.1 src/wordcram/Fonters.java
ruby_wordcram-2.0.0 src/wordcram/Fonters.java