Skip to content

Commit 1ef4325

Browse files
committed
2 parents 6be0b5d + 1135f47 commit 1ef4325

File tree

16 files changed

+39
-16
lines changed

16 files changed

+39
-16
lines changed

advanced_data/counting_words.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def setup
3131
# Open a file, read its contents, and 'scan' for words using a regex.
3232
# Include words with apostrophe eg Harker's
3333
@tokens = File.read(data_path('dracula.txt')).scan(/[\w'-]+/)
34-
text_font(create_font('Georgia', 24))
34+
text_font(create_font('DejaVu Serif', 24))
3535
end
3636

3737
def draw

advanced_data/noaa_weather.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class NOAAWeather < Processing::App
1111
NOAA = 'KMIA' # NOAA Weather Miami Airport
1212
def setup
1313
sketch_title "NOAA's National Weather Service"
14-
# font = create_font('Times Roman', 26)
14+
font = create_font('DejaVu Sans', 26)
1515
# font = create_font('Merriweather-Light.ttf', 28)
16-
# text_font(font)
16+
text_font(font)
1717
# The URL for the XML document
1818

1919
fo = "https://w1.weather.gov/xml/current_obs/display.php?stid=%s"

advanced_data/regex.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def setup
1313
# Load the links
1414
@links = load_links(url)
1515
links.uniq! # get rid of the duplicates
16-
text_font(create_font('Georgia', 16))
16+
text_font(create_font('DejaVu Serif', 16))
1717
end
1818

1919
def draw

advanced_data/word_frequency.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def setup
3333
load_file(DRACULA)
3434
load_file(FRANKENSTEIN)
3535
# Create the font
36-
text_font(create_font('Georgia', 24))
36+
text_font(create_font('DejaVu Serif', 24))
3737
end
3838

3939
def draw

basics/data/characters_strings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def setup
2222
sketch_title 'Characters Strings'
2323
@words = "Begin..."
2424
# Create the font
25-
text_font create_font("Georgia", 36)
25+
text_font create_font('DejaVu Serif', 36)
2626
end
2727

2828
def draw

basics/typography/font_list.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env jruby
2+
# frozen_string_literal: true
3+
4+
require 'picrate'
5+
6+
# PiCrate Sketch
7+
class FontList < Processing::App
8+
9+
def settings
10+
size(200, 200)
11+
end
12+
13+
def setup
14+
# Uncomment the following two lines to see the available fonts
15+
Java::ProcessingCore::PFont.list.each { |fot| puts fot }
16+
my_font = create_font('Noto Sans', 32)
17+
text_font(my_font)
18+
text_align(CENTER, CENTER)
19+
text('!@#$%', width / 2, height / 2)
20+
end
21+
end
22+
23+
FontList.new

basics/typography/letters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def settings
1515

1616
def setup
1717
sketch_title 'Letters'
18-
@font = create_font 'Georgia', 24
18+
@font = create_font 'DejaVu Serif', 24
1919
text_font @font
2020
text_align CENTER, CENTER
2121
end

basics/typography/words.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def setup
1111
sketch_title 'Words'
1212
@x = 30
1313
Processing::PFont.list.each { |fnt| puts fnt }
14-
@font = create_font('Georgia', 24)
14+
@font = create_font('DejaVu Serif', 24)
1515
text_font @font, 32
1616
no_loop
1717
end

demo/fraction_sums.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class FractionSums < Processing::App
66

77
def setup
88
sketch_title 'Math Blackboard'
9-
@f = createFont('Arial', 24, true)
9+
@f = create_font('Liberation Sans', 24, true)
1010
half = 1 / 2r # since ruby 2.1.0 (and jruby-9.0.0.0)
1111
third = 1 / 3r
1212
quarter = 1 / 4r

demo/fractions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def settings
1010

1111
def setup
1212
sketch_title 'Fraction Sums'
13-
@f = createFont('Arial', 24, true)
13+
@f = create_font('Liberation Sans', 24, true)
1414
third = 1 / 3r # since ruby 2.1.0 (and jruby-9.0.0.0)
1515
quarter = 1 / 4r
1616
format_add = '%s + %s = %s'

0 commit comments

Comments
 (0)