Can you share h.svg?
My first guess (untested) based on what you are describing is something like this:
void shapeStroke(PShape s, float x, float y, float w, float h, float basewidth, float baseweight){
strokeWeight(baseweight * w/basewidth);
shape(s, x, y, w, h);
}
So that you can call your shape with different dimensions and it will counterbalance the strokeWeight by the same ratio, given an assumed base size and base weight. The idea would be to scale the shape but keep line thicknesses the same.
…although I’m surprised at what you are describing. I wonder if you have a parent and child shape, so disableStyles isn’t actually doing anything…?