Parentheses

If the text inside the parentheses is just an aside within or at the end of a sentence (like this one), then the punctuation goes after and outside the closing parenthesis.

If the text inside the parentheses is a complete sentence that starts with a capital letter and ends with a period (or other final mark), then the punctuation belongs inside the parentheses. (This is an example.)

There are no extra spaces surrounding parentheses, other than the normal word space before and after. There is no extra space between the closing parenthesis and any punctuation that might follow.

Meet me under the magnolia at twilight (without the wig), and we will waddle down the trail together.

Notice the comma is directly after the parenthesis, and ...

Get Non-Designer’s Type Book, The, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.