Hardness and fracture toughness of brittle materials: A density functional theory study