Text this: A new tuning method based on quantitative compensation for uniform and non-uniform travelling-wave accelerating structures