The horizontal visibility graph algorithm is a powerful tool to study time series. In this paper, we use this algorithm maps Sturmian sequences to complex networks and find that the degree sequences partly inherit the Sturmian character. Firstly, we prove that Sturmian sequences and their horizontal visibility graph (HVG) degree sequences can be generated separately by coding sequences. Then, using coding factors, we divide the Sturmian sequences of type 1 into six types and calculate the complexity functions of their HVG-degree sequences. Moreover, we show that the HVG-degree sequences of Sturmian sequences of type 0 are the same Sturmian sequence. Finally, we use the complexity functions of HVG-degree sequences to uniquely characterize the Sturmian sequences.