Being able to see your surroundings is useful when cycling. Unfortunately, as any cold weather, glasses-wearing cyclist knows, it is is not always easy. When the temperatures are low enough to require you to cover your face, your scarf, balaclava, etc. directs your moisture laden exhalations up to condense on your glasses, fogging them. Instant white-out! In extremely cold weather (-20C for instance) it is almost impossible to avoid. Last winter, I tried a variety of solutions with varying effects. On the very coldest of days I resorted to finishing my commuting ride without my glasses. This was not ideal. However, this year I have finally solved the problem.
The basic idea is to direct your breath somewhere other than upwards. To do this I am using a half-mask respirator with detachable filters. This is a commonly available bit of safety equipment available at any hardware store. The one I am using is a 3M 6000 series mask. I’m using this model because it’s the one that I already had in the house. It is cheap, with online prices ranging from $6.00 to $16.00. The respirator is designed to snugly hug your face and direct your breath solely through the filter openings. The 3M 6000 has the air intakes on the sides of the mask and the outlet on the front. For our purposes, we want to modify this, making the side openings the outlet, so as to direct your breath away from your glasses. There are cold-weather respirators that are already designed to do this, and would likely work perfectly without modifications. I haven’t tried them. The changes I have made to my mask are reversible, so after the winter I’ll still be able to use it as a respirator.
You will also want to be able to cover the rest of your face. In my case, I have cycled in temperatures as low as-32C, and have a strong motivation to cover every exposed inch of skin. For a face covering I am using a neoprene/fleece mask. It is thin, insulating and stretchy. I bought mine last year at Army & Navy for $10.00. MEC has a slightly better version for $32.00. For the purposes of this project, you could likely use whatever face covering you already have (scarf, balaclava, etc.).

There are little elastomer disks that normally prevent air from exiting the side holes. Remove these. If you are carefull and don't damage them they may be reinstalled if you want to use the mask as a respirator again.

The air normally exits from the front. Block this. I am using a scrap of bubble wrap and packing tape. It's ugly, but it works, and in any case it won't be visible when you are finished.

Next, cut two appropriately placed holes in your face covering and fit it over the respirator, with the side hole exposed.

Twist the locking tab onto the respirator. This will securely attach the face covering to the respirator. It may be a tight squeeze, depending on the thickness of the face covering you are using.
At this point you are pretty much finished. The mask / respirator combo may be used with good results as is. I have tested it at -20C in this state and it worked fine. However, at lower temperatures I found that too much cold air blew in directly though the side holes. To prevent this I made a couple of baffles out of some plastic packaging. This was intended to be a temporary measure until I found a better solution, but it has worked so well that I haven’t bothered to replace them.

I then just hooked them under the locking tab. They quite effectively direct the exhalations backwards while preventing too much in-rushing cold air.
In this configuration I have used the mask on a 45 minute ride when the temperature was -32C with a windchill of -44C. I was perfectly comfortable and enjoyed fog free vision. On those extremely cold days, I wear cheap ski goggles that are allegedly anti-fogging. Last year, they still fogged up somewhat. With this mask there was no fogging. It is possible that at these temperatures your glasses will fog INSIDE the goggles while the goggles themselves remain clear. This is not due to your exhalations and the mask/respirator will not help. What does work is applying a drop of dishwashing liquid on both sides of your glasses lenses. Lightly buff the lenses until they are clear. A thin, invisible film of soap will remain that will prevent fogging.
Finally, the following photos show the arrangement of coverings I use to ensure total skin coverage.