The electronic properties of one-dimensional graphene nanoribbons, which could be regarded as the polymerized porphyrins, have been investigated using the first-principle methods. The types of the porphyrins have a great influence on the band gaps (Eg) of the graphene nanoribbons. The Eg as large as 1.48eV can be reached, which is large enough for the design of the logic nanoelectronic devices. The results suggest that the design and polymerization of porphyrins could be a promising band gap engineering method for graphene.