[library] Apply density on keyline/spacing creation