"There are a few different scales that measure "hardness", but the Mohs Scale (devised in 1812 by the German mineralogist, Friedrich Mohs) is as good as any. It has 10 levels, ranging from 1 (talc, which is very soft) to 10 (diamond, which is as hard as it gets). And yes, diamond will scratch glass. But crystal quartz (Mohs Hardness of 7) will also scratch glass easily. Topaz (Mohs Hardness of 8) will scratch very easily, while Corundum (rubies and sapphires, Mohs Hardness of 9) will actually cut glass. So all these other natural gems will scratch glass.
A very common "diamond simulant" (fancy talk for "fake diamond") is cubic zirconia - made not from carbon, but from zirconium oxide. It has a Mohs Hardness of 8.5-9, and it can very easily scratch and sometimes cut glass. Another common diamond simulant, moissanite (silicon carbide) has a Mohs Hardness of 8.5-9.25. So yes, here are two synthetic gems that look like diamonds (OK, you can call them "fake diamonds) that can very easily scratch glass."