source code typography

25
Dumb quotes (also known as straight quotes) are straight and vertical. " '

Upload: vaclav-vancura

Post on 15-Apr-2017

973 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Source Code Typography

Dumb quotes (also known as straight quotes) are straight and vertical.

"'

Page 2: Source Code Typography

Dumb Quote

"

"Mac:

Windows:

"C# source:

“For once, maybe someone will call me ‘sir’ without adding, ‘you’re making a scene’.” "Don't be dumb" “You’re smart!”

"

Page 3: Source Code Typography

Dumb Apostrophe

'

'Mac:

Windows:

'C# source:

“For once, maybe someone will call me ‘sir’ without adding, ‘you’re making a scene’.” "Don't be dumb" “You’re smart!”

'

Page 4: Source Code Typography

When is it appropriate to use straight quotes?

"

Proper typography never uses straight quotes.

They are left over from the age of typewriters and their only modern use is for coding.

Page 5: Source Code Typography

Smart quotes (also known as curly quotes, typographer’s quotes or proper quotation marks) are either curved or sloped.

’‘ ”“

Page 6: Source Code Typography

Opening Single Quote

⌥ ]Mac:

alt 0Windows: 1 4 5

\\U2018C# source:

“For once, maybe someone will call me ‘sir’ without adding, ‘you’re making a scene’.” "Don't be dumb" “You’re smart!”

Page 7: Source Code Typography

Closing Single Quote & Apostrophe

⌥ ]Mac:

alt 0Windows: 1 4 6

\\U2019C# source:

“For once, maybe someone will call me ‘sir’ without adding, ‘you’re making a scene’.” "Don't be dumb" “You’re smart!”

Page 8: Source Code Typography

When should it’s contain an apostrophe?

The only time it’s should have an apostrophe is when it replaces it is or it has.

The possessive form of its should not contain an apostrophe, just like possessive pronouns such as hers don’t require apostrophes.

Page 9: Source Code Typography

Opening Double Quote

⌥ [Mac:

alt 0Windows: 1 4 7

\\U201CC# source:

“For once, maybe someone will call me ‘sir’ without adding, ‘you’re making a scene’.” "Don't be dumb" “You’re smart!”

Page 10: Source Code Typography

Closing Double Quote

⌥ [Mac:

alt 0Windows: 1 4 8

\\U201DC# source:

“For once, maybe someone will call me ‘sir’ without adding, ‘you’re making a scene’.” "Don't be dumb" “You’re smart!”

Page 11: Source Code Typography

When should I use a single quote versus a double quote?

In American English, single quotes are used for quotes inside of quotes.

In British English, this is usually reversed.

Page 12: Source Code Typography

Dash is not minus.

–-

Page 13: Source Code Typography

En Dash

⌥ -Mac:

alt 0Windows: 1 5 0

\\U2013C# source:

May 28–June 4 It takes 2 to lie – one to lie and one to listen.

Page 14: Source Code Typography

When should I use an en dash?

An unspaced en dash can be used in place of the word “through” when indicating a range of values, such as numbers, times and dates.

It’s also used to show relationships between two things, such as a Boston–London flight.

Page 15: Source Code Typography

Other Useful Typographic Characters

•… ← © ™ ° ½ ± ×

Page 16: Source Code Typography

Ellipsis

⌥ ;Mac:

alt 0Windows: 1 3 3

\\U2026C# source:

Running generator '{0}' on file '{1}'... Running generator '{0}' on file '{1}'\\U2026

Page 17: Source Code Typography

Bullet

⌥ 8Mac:

alt 0Windows: 1 4 9

\\U2022C# source:

Categories to be generated: • iPhone: iOS 7.0 and Later \\U2022 CarPlay: All

Page 18: Source Code Typography

Left Arrow

\\U2190C# source:

monitor.Log (description.AddinId + "(" + description.Domain + ") ← " + path); monitor.Log (description.AddinId + "(" + description.Domain + ") \U2022 " + path);

Page 19: Source Code Typography

Right Arrow

\\U2192C# source:

Log ("[METHOD] Registering {0}[0x{1:x}|{2}] on {3} → ", ea.selector); Log ("[METHOD] Registering {0}[0x{1:x}|{2}] on {3} \\U2192 ", ea.selector);

Page 20: Source Code Typography

Copyright

©

about.VBox.PackStart (new Label ("Copyright © 2007 Novell, Inc."), false, false, 6); about.VBox.PackStart (new Label ("Copyright \\U00A9 2007 Novell, Inc."), false, false, 6);

⌥ gMac:

alt 0Windows: 1 6 9

\\U00A9C# source:

Page 21: Source Code Typography

Trademark

// this extra [End|Begin]Update is brought to you by Vista™ // this extra [End|Begin]Update is brought to you by Vista(\\U2122)

⌥ 2Mac:

alt 0Windows: 1 5 3

\\U2122C# source:

Page 22: Source Code Typography

One Half

½

\\U00BDC# source:

"enter visual line mode, move down once -> lines 1/2 selected -> delete" "enter visual line mode, move down once → lines ½ selected → delete"

Page 23: Source Code Typography

One Quarter

¼

\\U00BCC# source:

"¼ second"; // main/external/libgit-binary/external/libssh2/include/libssh2.h

Page 24: Source Code Typography

Multiplication Sign

×

\\U00D7C# source:

string txt = name + "\n<span foreground='darkgrey' size='x-small'>" + pix.Width + " × " + pix.Height + "</span>";

Page 25: Source Code Typography

Where’s the list?

http://vncr.in/dWi3