A light source device comprising: a laser diode configured to emit laser light, the laser diode being an edge-emission type laser diode having an end surface through which in operation the laser light is emitted; a substrate directly or indirectly supporting the laser diode such that the laser diode in operation emits the laser light in a direction along a principal surface of the substrate; and a cap secured to the substrate and covering the laser diode, the cap comprising: a first glass portion disposed at a position on the substrate such that the first glass portion intersects a path of the laser light to transmit the laser light; and a second glass portion comprising a pair of lateral wall portions that are located at a lateral side of the laser diode, and a cover portion that is located above the laser diode and connects the pair of lateral wall portions together; wherein: at least one of the first glass portion and the second glass portion comprises an alkaline glass region; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with the alkaline glass region; and each one of the first glass portion and the second glass portion has a lower surface bonded to the principle surface of the substrate. a laser diode configured to emit laser light, the laser diode being an edge-emission type laser diode having an end surface through which in operation the laser light is emitted; a substrate directly or indirectly supporting the laser diode such that the laser diode in operation emits the laser light in a direction along a principal surface of the substrate; and a cap secured to the substrate and covering the laser diode, the cap comprising: a first glass portion disposed at a position on the substrate such that the first glass portion intersects a path of the laser light to transmit the laser light; and a second glass portion comprising a pair of lateral wall portions that are located at a lateral side of the laser diode, and a cover portion that is located above the laser diode and connects the pair of lateral wall portions together; wherein: at least one of the first glass portion and the second glass portion comprises an alkaline glass region; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with the alkaline glass region; and each one of the first glass portion and the second glass portion has a lower surface bonded to the principle surface of the substrate. a first glass portion disposed at a position on the substrate such that the first glass portion intersects a path of the laser light to transmit the laser light; and a second glass portion comprising a pair of lateral wall portions that are located at a lateral side of the laser diode, and a cover portion that is located above the laser diode and connects the pair of lateral wall portions together; wherein: at least one of the first glass portion and the second glass portion comprises an alkaline glass region; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with the alkaline glass region; and each one of the first glass portion and the second glass portion has a lower surface bonded to the principle surface of the substrate. at least one of the first glass portion and the second glass portion comprises an alkaline glass region; wherein the first glass portion and the second glass portion are anodically bonded together via an electrically conductive layer that is in contact with the alkaline glass region; and each one of the first glass portion and the second glass portion has a lower surface bonded to the principle surface of the substrate.